examples/grid/calendar.js
authorAlan Knowles <alan@roojs.com>
Thu, 10 Apr 2014 01:34:42 +0000 (09:34 +0800)
committerAlan Knowles <alan@roojs.com>
Thu, 10 Apr 2014 01:34:42 +0000 (09:34 +0800)
examples/grid/calendar.js

index e2c1120..8709c01 100644 (file)
@@ -21,35 +21,43 @@ 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.title = rec.data.person_id_name + ' ' + rec.data.project_id_name;
+                    rec.data.qtip  = rec.data.summary;
+                    rec.data.cls = "fixme";
+                    
+                }
+            }
         });
         
         var gpanel = new Roo.GridPanel(this.grid);