},
rowdblclick : function (_self, rowIndex, e)
{
-
+ _this.dialog.hide();
+
+ if (_this.callback) {
+ _this.callback.call(this, _this.source);
+ }
}
},
autoExpandColumn : 'filename',
_this.viewPanel.setContent("Nothing Selected");
return;
}
- Roo.log(selected);
- _this.viewPanel.load( { url : baseURL + "/Roo/Events", method : 'GET' }, {_id : selected.data.id, _retrieve_source : 1}, function(res){
- Roo.log('res is here after load');
- Roo.log(res);
+ _this.viewPanel.load( { url : baseURL + "/Roo/Events", method : 'GET' }, {_id : selected.data.id, _retrieve_source : 1}, function(oElement, bSuccess, oResponse){
+
+ var res = Roo.decode(oResponse.responseText);
+
+ if(!bSuccess || !res.success){
+ _this.viewPanel.setContent("Load data failed?!");
+ }
+
+ if(typeof(res.data) === 'string'){
+ _this.viewPanel.setContent(res.data);
+ return;
+ }
+
+ _this.source = res.data.POST.source;
+
+ _this.viewPanel.setContent(_this.source);
+
});
}
},
xns: Roo,
listeners : {
click : function() {
+
_this.dialog.hide();
+
+ if (_this.callback) {
+ _this.callback.call(this, _this.source);
+ }
}
},
text : "OK"