Commit b25a665c authored by Robert Anderson's avatar Robert Anderson
Browse files

Added support for custom success function

parent 286dce23
......@@ -241,10 +241,17 @@ Ext.extend(Ext.ux.GenericGridWindow, Ext.Window, {
// Generic ajax request
uxAjaxRequest = function(parent,config) {
config = Ext.apply({
var requestConfig = Ext.apply({
url: 'ajax.php',
// Success function
success: function(response,options) {
// if we have a custom success function, run it
if (config.customSuccess) {
config.customSuccess(response,options);
}
// Lastly unmask parent window if we have one
if (parent) {
parent.getEl().unmask();
}
......@@ -265,7 +272,7 @@ uxAjaxRequest = function(parent,config) {
}
}, config);
Ext.Ajax.request(config);
Ext.Ajax.request(requestConfig);
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment