roojs-calendar.js
[roojs1] / roojs-calendar.js
index b4a6d20..fb1e08a 100644 (file)
@@ -22,7 +22,7 @@ Roo.each(this.cells.elements,function(c){c.rows=0;});Roo.each(this.calevents,fun
 this.renderEvents();}});
 //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.on('activate',function(){Roo.log('activate');this.render();},this);this.addEvents({'select':true,'monthchange':true,'evententer':true,'eventleave':true,'eventclick':true});};Roo.extend(Roo.CalendarPanel,Roo.ContentPanel,{getId:function(){return this.id;},destroy:function(){Roo.GridPanel.superclass.destroy.call(this);},render:function(){this.onRender(this.el,false)},onRender:function(ct,A){if(this.rendered){return;}
+this.on('activate',function(){Roo.log('activate');this.render();},this);this.addEvents({'select':true,'monthchange':true,'evententer':true,'eventleave':true,'eventclick':true,'rendered':true});};Roo.extend(Roo.CalendarPanel,Roo.ContentPanel,{getId:function(){return this.id;},destroy:function(){Roo.GridPanel.superclass.destroy.call(this);},render:function(){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.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.el=ct.createChild(B,A);if(this.tabIndex!==undefined){this.el.dom.setAttribute('tabIndex',this.tabIndex);}
-this.initEvents();},getAutoCreate:Roo.bootstrap.Calendar.prototype.getAutoCreate,initEvents:Roo.bootstrap.Calendar.prototype.initEvents});Roo.each(['getAutoCreate','initEvents','resize','showPrevMonth','showToday','showNextMonth','showPrevYear','showNextYear','update','findCell','findCells','findBestRow','addItem','clearEvents','renderEvents','onEventEnter','onEventLeave','onEventClick','onMonthChange','onLoad'],function(p){Roo.log('add'+p);Roo.CalendarPanel.prototype[p]=Roo.bootstrap.Calendar.prototype[p];});
+this.initEvents();this.fireEvent('rendered');},getAutoCreate:Roo.bootstrap.Calendar.prototype.getAutoCreate,initEvents:Roo.bootstrap.Calendar.prototype.initEvents});Roo.each(['getAutoCreate','initEvents','resize','showPrevMonth','showToday','showNextMonth','showPrevYear','showNextYear','update','findCell','findCells','findBestRow','addItem','clearEvents','renderEvents','onEventEnter','onEventLeave','onEventClick','onMonthChange','onLoad'],function(p){Roo.log('add'+p);Roo.CalendarPanel.prototype[p]=Roo.bootstrap.Calendar.prototype[p];});