this.dialog = Roo.factory({
xtype: 'LayoutDialog',
xns: Roo,
+ listeners : {
+ show : function (_self)
+ {
+ if(typeof(_this.data) != 'undefined'){
+ _this.grid.footer.onClick('first');
+ }
+ }
+ },
background : false,
closable : false,
collapsible : false,
loadMask : true,
sm : {
xtype: 'RowSelectionModel',
- xns: Roo.grid
+ xns: Roo.grid,
+ listeners : {
+ afterselectionchange : function (_self)
+ {
+ var selected = this.getSelected();
+
+ if (!selected) {
+ _this.viewPanel.setContent("Nothing Selected");
+ return;
+ }
+ Roo.log(selected);
+ _this.viewPanel.load( { url : baseURL + "/Roo/Events/" + id + ".html" });
+ }
+ },
+ singleSelect : true
},
dataSource : {
xtype: 'Store',
xns: Roo.data,
+ listeners : {
+ beforeload : function (_self, o)
+ {
+ o.params = o.params || {};
+
+ if(typeof(_this.data) == 'undefined'){
+ this.removeAll();
+ return false;
+ }
+ Roo.log(_this.data);
+ o.params.action = 'AUTOSAVE';
+ }
+ },
remoteSort : true,
- sortInfo : { field : 'filename', direction: 'ASC' },
+ sortInfo : { field : 'event_when', direction: 'DESC' },
proxy : {
xtype: 'HttpProxy',
xns: Roo.data,
method : 'GET',
- url : baseURL + '/Roo/Images.php'
+ url : baseURL + '/Roo/Events.php'
},
reader : {
xtype: 'JsonReader',