fix #7318 - rename upload cropbox and panel tree
[roojs1] / examples / grid / calendar.js
index c98c2b3..8f0e6f7 100644 (file)
@@ -21,38 +21,54 @@ var Example = {
         this.grid = new Roo.grid.Calendar('grid-example', {
             background: false,
             eventStore : {
-                        xtype: 'Store',
-                        xns: Roo.data,
-                        listeners : {
-                            beforeload : function (_self, o){
-                                o.params = o.params || {};
-                                //var d = new Date().format('Y-m-d');
-                                //if(_this.cal){
-                                //    d = typeof(_this.cal.activeDate) == 'string' ? _this.cal.activeDate : _this.cal.activeDate.format("Y-m-d");
-                                //}
-                                //o.params._activeDate = d
-                            }
-                        },
-                        remoteSort : true,
-                        sortInfo : { direction : 'ASC', field: 'start_dt' },
-                        proxy : {
-                            xtype: 'HttpProxy',
-                            xns: Roo.data,
-                            method : 'GET',
-                            url : 'http://roojs.com/admin.php/Roo/mtrack_ticket?_dc=1396967515369&_future_schedule=1&query%5Bviewtype%5D=active&limit=999&sort=summary&dir=ASC'
-                        },
-                        reader : {
-                            xtype: 'JsonReader',
-                            xns: Roo.data,
-                            id : 'id',
-                            root : 'data',
-                            totalProperty : 'total',
-                            fields : [{"name":"id","type":"int"},{"name":"title","type":"string"}]
-                        }
+                xtype: 'Store',
+                xns: Roo.data,
+                listeners : {
+                    beforeload : function (_self, o){
+                        o.params = o.params || {};
+                        //var d = new Date().format('Y-m-d');
+                        //if(_this.cal){
+                        //    d = typeof(_this.cal.activeDate) == 'string' ? _this.cal.activeDate : _this.cal.activeDate.format("Y-m-d");
+                        //}
+                        //o.params._activeDate = d
+                    }
+                },
+                remoteSort : true,
+                sortInfo : { direction : 'ASC', field: 'start_dt' },
+                proxy : {
+                    xtype: 'HttpProxy',
+                    xns: Roo.data,
+                    method : 'GET',
+                    url : 'http://roojs.com/admin.php/Roo/mtrack_ticket?_dc=1396967515369&_future_schedule=1&query%5Bviewtype%5D=active&limit=999&sort=summary&dir=ASC'
+                },
+                reader : {
+                    xtype: 'JsonReader',
+                    xns: Roo.data,
+                    id : 'id',
+                    root : 'data',
+                    totalProperty : 'total',
+                    fields : [{"name":"id","type":"int"},{"name":"title","type":"string"}]
+                }
+            },
+            listeners : {
+                eventrender : function(c, rec) {
+                    rec.data.time = ''; // not needed
+                    rec.data.title = rec.data.developer_id_name + ' ' + rec.data.project_id_name;
+                    rec.data.qtip  = '#' + rec.data.id + ' ' + rec.data.summary;
+                    
+                    if (rec.data.estimated) {
+                        rec.data.cls = "Greys-q3-6"; // grey...
+                    } else {
+                        rec.data.cls = 'RdYlGn-q' + rec.data.priority_id_seqid +'-7'
                     }
+                    
+                    
+                    
+                }
+            }
         });
         
-        var gpanel = new Roo.GridPanel(this.grid);
+        var gpanel = new Roo.panel.Grid(this.grid);
         var layout = Roo.BorderLayout.create({
             center: {
                 margins:{left:3,top:3,right:3,bottom:3},
@@ -102,11 +118,7 @@ var Example = {
                             xtype: 'Separator',
                             xns: Roo.Toolbar
                         },
-                        {
-                            xtype: 'TextItem',
-                            xns: Roo.Toolbar,
-                            text : "Blue: in-active, green: in-active sup-event, red: de-active, purple: de-active sup-event"
-                        },
+                         
                         {
                             xtype: 'Fill',
                             xns: Roo.Toolbar