if(typeof(_this.data) != 'undefined'){
_this.grid.footer.onClick('first');
}
+
}
},
background : false,
fitContainer : true,
fitToframe : true,
region : 'west',
- tableName : 'Images',
- title : "Images",
+ tableName : 'Events',
+ title : "Events",
grid : {
xtype: 'Grid',
xns: Roo.grid,
{
var selected = this.getSelected();
- if (!selected) {
- _this.viewPanel.setContent("Nothing Selected");
- return;
+ _this.source = '';
+
+ if(!selected){
+ _this.viewPanel.setContent("Please select an saved version on the left");
}
_this.viewPanel.load( { url : baseURL + "/Roo/Events", method : 'GET' }, {_id : selected.data.id, _retrieve_source : 1}, function(oElement, bSuccess, oResponse){
- _this.source = '';
-
var res = Roo.decode(oResponse.responseText);
if(!bSuccess || !res.success){
return false;
}
- var d = _this.data;
+ 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);
+ }
}
},
remoteSort : true,
_this.dialog.hide();
- if (_this.callback) {
+ if (_this.callback && _this.source != '') {
_this.callback.call(this, _this.source);
}
}