roojs-calendar.js
authorAlan Knowles <alan@roojs.com>
Tue, 8 Apr 2014 14:11:01 +0000 (22:11 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 8 Apr 2014 14:11:01 +0000 (22:11 +0800)
roojs-calendar-debug.js

roojs-calendar-debug.js
roojs-calendar.js

index 651f250..3efeda3 100644 (file)
@@ -1093,7 +1093,15 @@ Roo.CalendarPanel = function(config){
             * @param {Calendar} this
             * @param {event}
             */
-        'eventclick': true
+        'eventclick': true,
+        /**
+            * @event rendered
+            * Fires when the grid is rendered
+            * @param {Calendar} this
+           
+            */
+        'rendered': true
+        
         
     });
     
@@ -1178,7 +1186,10 @@ Roo.extend(Roo.CalendarPanel, Roo.ContentPanel, {
         if(this.tabIndex !== undefined){
             this.el.dom.setAttribute('tabIndex', this.tabIndex);
         }
+        
+        
         this.initEvents();
+        this.fireEvent('rendered');
     },
     
     
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];});