allow string based values for comboboxarray
[roojs1] / Roo / grid / Calendar.js
index 62bdd2b..43cb036 100644 (file)
@@ -779,21 +779,35 @@ Roo.extend(Roo.grid.Calendar, Roo.grid.Grid, {
         });
         
         this.eventStore.each(function(e) {
-            Roo.each(e.els, function(el) {
+            this.clearEvent(e);
+        },this);
+        
+    },
+    
+    clearEvent : function(ev)
+    {
+        if (ev.els) {
+            Roo.each(ev.els, function(el) {
                 el.un('mouseenter' ,this.onEventEnter, this);
                 el.un('mouseleave' ,this.onEventLeave, this);
                 el.remove();
             },this);
-            e.els = [];
-        },this);
-        
+            ev.els = [];
+        }
     },
     
     
-    renderEvent : function(args,ctr) {
+    renderEvent : function(ev,ctr) {
         if (!ctr) {
              ctr = this.view.el.select('.fc-event-container',true).first();
         }
+        
+         
+        this.clearEvent(ev);
+            //code
+       
+        
+        
         ev.els = [];
         var cells = ev.cells;
         var rows = ev.rows;
@@ -809,7 +823,7 @@ Roo.extend(Roo.grid.Calendar, Roo.grid.Grid, {
                 cls += ' fc-event-end';
             }
             
-            Roo.log(ev.data);
+            //Roo.log(ev.data);
             // how many rows should it span..
             var cg = this.eventTmpl.append(ctr,Roo.apply({
                 fccls : cls
@@ -830,7 +844,7 @@ Roo.extend(Roo.grid.Calendar, Roo.grid.Grid, {
             cg.setXY([sbox.x +2, sbox.y +(ev.row * 20)]);    
             cg.setWidth(ebox.right - sbox.x -2);
         }
-    }
+    },
     
     renderEvents: function()
     {   
@@ -852,7 +866,7 @@ Roo.extend(Roo.grid.Calendar, Roo.grid.Grid, {
         
         
         this.cells.each(function(c) {
-            Roo.log(c.select('.fc-day-content div',true).first());
+            //Roo.log(c.select('.fc-day-content div',true).first());
             c.select('.fc-day-content div',true).first().setHeight(Math.max(34, (c.rows || 1) * 20));
         });
         
@@ -863,8 +877,7 @@ Roo.extend(Roo.grid.Calendar, Roo.grid.Grid, {
             
             this.renderEvent(ev);
              
-            
-            
+             
         }, this);
         this.view.layout();