// Roo/bootstrap/Component.js Roo.bootstrap=Roo.bootstrap||{};Roo.bootstrap.Component=function(A){Roo.bootstrap.Component.superclass.constructor.call(this,A);this.addEvents({"childrenrendered":true});};Roo.extend(Roo.bootstrap.Component,Roo.BoxComponent,{allowDomMove:false,cls:false,style:false,autoCreate:false,tooltip:null,initEvents:function(){} ,xattr:false,parentId:false,can_build_overlaid:true,container_method:false,dataId:false,name:false,parent:function(){return Roo.ComponentMgr.get(this.parentId)},onRender:function(ct,A){Roo.bootstrap.Component.superclass.onRender.call(this,ct,A);if(this.el){if(this.el.attr('xtype')){this.el.attr('xtypex',this.el.attr('xtype')); this.el.dom.removeAttribute('xtype');this.initEvents();}return;}var B=Roo.apply({},this.getAutoCreate());B.id=this.id||Roo.id();if(this.xattr&&typeof(this.xattr)=='object'){for(var i in this.xattr){B[i]=this.xattr[i];}}if(this.dataId){B.dataId=this.dataId; }if(this.cls){B.cls=(typeof(B.cls)=='undefined'?this.cls:B.cls)+' '+this.cls;}if(this.style){B.style=(typeof(B.style)=='undefined'?this.style:B.style)+'; '+this.style;}if(this.name){B.name=this.name;}this.el=ct.createChild(B,A);if(this.tooltip){this.tooltipEl().attr('tooltip',this.tooltip); }if(this.tabIndex!==undefined){this.el.dom.setAttribute('tabIndex',this.tabIndex);}this.initEvents();},getChildContainer:function(){return this.el;},getDocumentBody:function(){return Roo.get(document.body);},tooltipEl:function(){return this.el;},addxtype:function(A,B){var cn=this; cn=Roo.factory(A);cn.parentType=this.xtype;cn.parentId=this.id;B=(typeof(B)=='undefined')?'getChildContainer':B;if(typeof(cn.container_method)=='string'){B=cn.container_method;}var C=(typeof(A['flexy:foreach'])!='undefined');var D=(typeof(A['flexy:if'])!='undefined'); var E=Roo.XComponent.build_from_html;var F=(A.xtype=='Body');var G=(Roo.get(document.body).attr('xtype')=='Roo.bootstrap.Body');var H=Roo.get(this[B](false));if((C||D||this.can_build_overlaid==false)&&E){return false;}if(!C||!E||F||!G){if(!D||typeof(A.name)=='undefined'||!E||F||!G){return this.addxtypeChild(A,B,F); }var I=H?H.child('>*[name='+A.name+']'):false;if(I){return this.addxtypeChild(Roo.apply({},A),B);}Roo.log('skipping render');return cn;}var J=false;if(!E){return false;}while(true){var I=H?H.child('>*[xtype]'):false;if(!I){break;}if(I&&I.attr('xtype').split('.').pop()!=cn.xtype){break; }J=this.addxtypeChild(Roo.apply({},A),B);}return J;},addxtypeChild:function(A,B,C){Roo.debug&&Roo.log('addxtypeChild:'+B);var cn=this;B=(typeof(B)=='undefined')?'getChildContainer':B;var D=(typeof(A['flexy:if'])!='undefined')||(typeof(A['flexy:foreach'])!='undefined'); skip_children=false;if(!C){if(!this[B](true)){A.items=[];return A;}cn=Roo.factory(A);cn.parentType=this.xtype;cn.parentId=this.id;var E=Roo.XComponent.build_from_html;if(E&&Roo.get(document.body).attr('xtype')=='Roo.bootstrap.Body'){var F=Roo.get(this[B](false)); var G=F?F.child('>*[xtype]'):false;if(G){}if(G&&G.attr('xtype').split('.').pop()==cn.xtype){cn.el=G;}else{Roo.debug&&Roo.log("MISSING "+cn.xtype+" on child of "+(this.el?this.el.attr('xbuilderid'):'no parent'));Roo.debug&&Roo.log(F);Roo.debug&&Roo.log(G); Roo.debug&&Roo.log(cn);}}if(E&&D&&!cn.el&&cn.can_build_overlaid){Roo.debug&&Roo.log('skipping render');Roo.debug&&Roo.log(A);if(!cn.el){Roo.debug&&Roo.log('skipping all children');skip_children=true;}}else{cn.render&&cn.render(this[B](true));}}var H=[];if(!A.items||!A.items.length){cn.items=H; return cn;}var I=A.items;delete A.items;if(!skip_children){for(var i=0;i'+K+'',unselectable:'on'});};var B={};if(!this.header){B={tag:'table',cls:'fc-header',style:'width:100%',cn:[{tag:'tr',cn:[{tag:'td',cls:'fc-header-left',cn:[A('prev','left','arrow','‹'),A('next','right','arrow','›'),{tag:'span',cls:'fc-header-space'} ,A('today','left right','','today')]},{tag:'td',cls:'fc-header-center',cn:[{tag:'span',cls:'fc-header-title',cn:{tag:'H2',html:'month / year'}}]},{tag:'td',cls:'fc-header-right',cn:[]}]}]};}B=this.header;var C=function(){var H=[];for(var i=0;iL){W.className=" fc-state-disabled";W.title=V.maxText;return;}if(O){if(O.indexOf(d.getDay())!=-1){W.title=P;W.className=" fc-state-disabled"; }}if(M&&Q){var X=d.dateFormat(Q);if(M.test(X)){W.title=N.replace("%0",X);W.className=" fc-state-disabled";}}if(!W.initialClassName){W.initialClassName=W.dom.className;}W.dom.className=W.initialClassName+' '+W.className;};var i=0;for(;ie){return;}if(c.dateValue0){this.store.data.each(function(d){A.addItem({id:d.data.id,start:(typeof(d.data.start_dt)==='string')?new Date.parseDate(d.data.start_dt,'Y-m-d H:i:s'):d.data.start_dt,end:(typeof(d.data.end_dt)==='string')?new Date.parseDate(d.data.end_dt,'Y-m-d H:i:s'):d.data.end_dt,time:d.data.start_time,title:d.data.title,description:d.data.description,venue:d.data.venue} );});}this.renderEvents();if(this.calevents.length&&this.loadMask){this.maskEl.hide();}},onBeforeLoad:function(){this.clearEvents();if(this.loadMask){this.maskEl.show();}}}); // Roo/CalendarPanel.js Roo.CalendarPanel=function(A){Roo.log("cal panel ctr");this.wrapper=Roo.DomHelper.append(document.body,{tag:"div",cls:"x-layout-grid-wrapper x-layout-inactive-content"},true);Roo.CalendarPanel.superclass.constructor.call(this,this.wrapper,A);Roo.log(this.el); if(this.toolbar){this.toolbar.el.insertBefore(this.wrapper.dom.firstChild);}if(this.footer&&!this.footer.el&&this.footer.xtype){}this.view=new Roo.calendar.View(Roo.apply({skipNavHeader:true,skipMonthHeader:false},A));this.on('activate',function(){Roo.log('activate'); this.render();},this);this.addEvents({'select':true,'monthchange':true,'evententer':true,'eventleave':true,'eventclick':true,'rendered':true});this.relayEvents(this.view,["select","monthchange","evententer","eventleave","rendered"]);};Roo.extend(Roo.CalendarPanel,Roo.ContentPanel,{render:function(){var ct=this.el.appendChild(document.createElement("div")); this.onRender(this.el,false)},onRender:function(ct,A){if(this.rendered){return;}this.rendered=true;Roo.log("render calendar");var B=Roo.apply({},this.view.getAutoCreate());B.id=Roo.id();if(this.xattr&&typeof(this.xattr)=='object'){for(var i in this.xattr){B[i]=this.xattr[i]; }}if(this.dataId){B.dataId=this.dataId;}if(this.cls){B.cls=(typeof(B.cls)=='undefined')?this.cls:B.cls+' '+this.cls;}if(this.style){B.style=this.style;}if(this.name){B.name=this.name;}this.view.el=ct.createChild(B,A);this.view.initEvents();this.fireEvent('rendered'); }});