+ xtype : 'Grid',
+ autoExpandColumn : 'event_when',
+ loadMask : true,
+ listeners : {
+ render : function()
+ {
+ _this.grid = this;
+
+ if (_this.panel.active) {
+ this.footer.onClick('first');
+ }
+ }
+ },
+ xns : Roo.grid,
+ '|xns' : 'Roo.grid',
+ footer : {
+ xtype : 'PagingToolbar',
+ displayInfo : false,
+ pageSize : 25,
+ xns : Roo,
+ '|xns' : 'Roo'
+ },
+ dataSource : {
+ xtype : 'Store',
+ remoteSort : true,
+ sortInfo : { field : 'event_when', direction: 'DESC' },
+ listeners : {
+ beforeload : function (_self, o)
+ {
+ o.params = o.params || {};
+
+ if(typeof(_this.data) == 'undefined'){
+ this.removeAll();
+ return false;
+ }
+
+ var d = Roo.apply({}, _this.data);
+ delete d.successFn;
+
+ Roo.apply(o.params, d);
+
+ },
+ load : function (_self, records, options)
+ {
+ var sm = _this.grid.getSelectionModel();
+ if (!sm.getSelections().length) {
+ sm.selectFirstRow();
+
+ sm.fireEvent('afterselectionchange', sm);
+ }
+ }
+ },
+ xns : Roo.data,
+ '|xns' : 'Roo.data',
+ proxy : {
+ xtype : 'HttpProxy',
+ method : 'GET',
+ url : baseURL + '/Roo/Events.php',
+ xns : Roo.data,
+ '|xns' : 'Roo.data'
+ },
+ reader : {
+ xtype : 'JsonReader',
+ fields : [
+ {
+ 'name': 'id',
+ 'type': 'int'
+ },
+ {
+ 'name': 'event_when',
+ 'type': 'string'
+ }
+ ],
+ id : 'id',
+ root : 'data',
+ totalProperty : 'total',
+ xns : Roo.data,
+ '|xns' : 'Roo.data'
+ }
+ },