4 * Copyright(c) 2006-2007, Ext JS, LLC.
6 * Originally Released Under LGPL - original licence link has changed is not relivant.
9 * <script type="text/javascript">
12 Roo.BLANK_IMAGE_URL = "../../images/default/s.gif";
17 // some data yanked off the web
21 this.grid = new Roo.grid.Calendar('grid-example', {
27 beforeload : function (_self, o){
28 o.params = o.params || {};
29 //var d = new Date().format('Y-m-d');
31 // d = typeof(_this.cal.activeDate) == 'string' ? _this.cal.activeDate : _this.cal.activeDate.format("Y-m-d");
33 //o.params._activeDate = d
37 sortInfo : { direction : 'ASC', field: 'start_dt' },
42 url : 'http://roojs.com/admin.php/Roo/mtrack_ticket?_dc=1396967515369&_future_schedule=1&query%5Bviewtype%5D=active&limit=999&sort=summary&dir=ASC'
49 totalProperty : 'total',
50 fields : [{"name":"id","type":"int"},{"name":"title","type":"string"}]
55 var gpanel = new Roo.GridPanel(this.grid);
56 var layout = Roo.BorderLayout.create({
58 margins:{left:3,top:3,right:3,bottom:3},
66 var gridHead = this.grid.getView().getHeaderPanel(true);
67 var tb = new Roo.Toolbar(gridHead, [ {
71 click : function (_self, e)
73 var sd = Date.parseDate(_this.monthField.getValue(), "Y-m-d");
74 sd.setMonth(sd.getMonth()-1);
75 _this.monthField.setValue(sd.format('Y-m-d'));
76 _this.grid.ds.load({});
89 render : function (_self)
91 _this.monthField = _self;
92 // _this.monthField.set today
94 select : function (combo, date)
96 _this.grid.ds.load({});
99 value : (function() { return new Date(); })()
108 text : "Blue: in-active, green: in-active sup-event, red: de-active, purple: de-active sup-event"
118 click : function (_self, e)
120 var sd = Date.parseDate(_this.monthField.getValue(), "Y-m-d");
121 sd.setMonth(sd.getMonth()+1);
122 _this.monthField.setValue(sd.format('Y-m-d'));
123 _this.grid.ds.load({});
132 //grid.getSelectionModel().selectFirstRow();
135 Roo.onReady(Example.init, Example);