Commit 0e192cee authored by Nigel Kukard's avatar Nigel Kukard
Browse files

* Misc code cleanups

parent fbabae6b
......@@ -108,11 +108,11 @@ Ext.ux.GenericFormWindow = function(windowConfig,formConfig,submitAjaxConfig) {
params: ajaxParams,
// Close window on success
success: function() {
win.close();
// Check if we have a custom function to execute on success
if (submitAjaxConfig.onSuccess) {
submitAjaxConfig.onSuccess();
}
win.close();
}
});
}
......@@ -163,7 +163,6 @@ Ext.ux.GenericGridWindow = function(windowConfig,gridConfig,storeConfig,filtersC
var panelID = Ext.id();
var windowID = Ext.id();
// Setup data store
storeConfig = Ext.apply({
autoLoad: false
......@@ -217,8 +216,6 @@ Ext.ux.GenericGridWindow = function(windowConfig,gridConfig,storeConfig,filtersC
pageSize: 25,
store: store,
displayInfo: true,
displayMsg: 'Displaying items {0} - {1} of {2}',
emptyMsg: "No data to display",
plugins: filters
})
......@@ -265,7 +262,7 @@ Ext.extend(Ext.ux.GenericGridWindow, Ext.Window, {
// Generic ajax request
uxAjaxRequest = function(parent,config) {
uxAjaxRequest = function(theWindow,config) {
var requestConfig = Ext.apply({
url: 'ajax.php',
......@@ -276,9 +273,9 @@ uxAjaxRequest = function(parent,config) {
if (config.customSuccess) {
config.customSuccess(response,options);
}
// Lastly unmask parent window if we have one
if (parent) {
parent.getEl().unmask();
// Lastly unmask theWindow window if we have one
if (theWindow) {
theWindow.getEl().unmask();
}
},
......@@ -289,8 +286,8 @@ uxAjaxRequest = function(parent,config) {
msg: response.responseText,
icon: Ext.MessageBox.ERROR,
fn: function() {
if (parent) {
parent.getEl().unmask();
if (theWindow) {
theWindow.getEl().unmask();
}
}
});
......
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