aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2016-11-18 14:38:12 +0800
committerAaron LI <aaronly.me@outlook.com>2016-11-18 14:38:12 +0800
commit381550871001f9fa037014efe1b361d072983bcd (patch)
treef377795b25164b493d791f13495928d018c7a888
parentdc59c7d18975a744ceac484eccf25225ef4ab583 (diff)
downloadfg21sim-381550871001f9fa037014efe1b361d072983bcd.tar.bz2
webui: Rename jQuery ".fail()" callback argument "error" to "jqxhr"
-rw-r--r--fg21sim/webui/static/js/configs.js30
-rw-r--r--fg21sim/webui/static/js/console.js12
2 files changed, 21 insertions, 21 deletions
diff --git a/fg21sim/webui/static/js/configs.js b/fg21sim/webui/static/js/configs.js
index ed1e177..67fe032 100644
--- a/fg21sim/webui/static/js/configs.js
+++ b/fg21sim/webui/static/js/configs.js
@@ -361,12 +361,12 @@ var resetConfigs = function (url) {
showModalConfigs(modalData);
});
})
- .fail(function (error) {
+ .fail(function (jqxhr) {
var modalData = {};
modalData.icon = "times-circle";
modalData.message = "Failed to reset the configurations!";
- modalData.code = error.status;
- modalData.reason = error.statusText;
+ modalData.code = jqxhr.status;
+ modalData.reason = jqxhr.statusText;
showModalConfigs(modalData);
});
};
@@ -390,12 +390,12 @@ var setServerConfigs = function (url, data) {
function (response) {
setFormConfigs({}, response.errors);
})
- .fail(function (error) {
+ .fail(function (jqxhr) {
var modalData = {};
modalData.icon = "times-circle";
modalData.message = "Failed to update/set the configuration data!";
- modalData.code = error.status;
- modalData.reason = error.statusText;
+ modalData.code = jqxhr.status;
+ modalData.reason = jqxhr.statusText;
showModalConfigs(modalData);
});
};
@@ -414,12 +414,12 @@ var loadServerConfigFile = function (url, userconfig) {
userconfig = getFormConfigSingle("userconfig");
}
return $.postJSON(url, {action: "load", userconfig: userconfig})
- .fail(function (error) {
+ .fail(function (jqxhr) {
var modalData = {};
modalData.icon = "times-circle";
modalData.message = "Failed to load the user configuration file!";
- modalData.code = error.status;
- modalData.reason = error.statusText;
+ modalData.code = jqxhr.status;
+ modalData.reason = jqxhr.statusText;
showModalConfigs(modalData);
});
};
@@ -452,12 +452,12 @@ var saveServerConfigFile = function (url, clobber) {
}
showModalConfigs(modalData);
})
- .fail(function (error) {
+ .fail(function (jqxhr) {
var modalData = {};
modalData.icon = "times-circle";
modalData.message = "Failed to save the configurations!";
- modalData.code = error.status;
- modalData.reason = error.statusText;
+ modalData.code = jqxhr.status;
+ modalData.reason = jqxhr.statusText;
showModalConfigs(modalData);
});
};
@@ -470,13 +470,13 @@ var existsServerFile = function (url, filepath, callback) {
var data = {action: "exists",
filepath: JSON.stringify(filepath)};
return $.getJSON(url, data, callback)
- .fail(function (error) {
+ .fail(function (jqxhr) {
var modalData = {};
modalData.icon = "times-circle";
modalData.message = ("Failed to check the existence " +
"of the user configuration file!");
- modalData.code = error.status;
- modalData.reason = error.statusText;
+ modalData.code = jqxhr.status;
+ modalData.reason = jqxhr.statusText;
showModalConfigs(modalData);
});
};
diff --git a/fg21sim/webui/static/js/console.js b/fg21sim/webui/static/js/console.js
index 86062a7..4417b6f 100644
--- a/fg21sim/webui/static/js/console.js
+++ b/fg21sim/webui/static/js/console.js
@@ -146,12 +146,12 @@ var deleteLogMessages = function () {
*/
var getServerTaskStatus = function (url) {
return $.getJSON(url)
- .fail(function (error) {
+ .fail(function (jqxhr) {
var modalData = {};
modalData.icon = "times-circle";
modalData.message = "Failed to get the task status!";
- modalData.code = error.status;
- modalData.reason = error.statusText;
+ modalData.code = jqxhr.status;
+ modalData.reason = jqxhr.statusText;
showModalConsole(modalData);
});
};
@@ -169,12 +169,12 @@ var startServerTask = function (url, task, kwargs) {
kwargs = typeof kwargs !== "undefined" ? kwargs : {};
var data = {action: "start", task: task, kwargs: kwargs};
return $.postJSON(url, data)
- .fail(function (error) {
+ .fail(function (jqxhr) {
var modalData = {};
modalData.icon = "times-circle";
modalData.message = "Failed to start the task!";
- modalData.code = error.status;
- modalData.reason = error.statusText;
+ modalData.code = jqxhr.status;
+ modalData.reason = jqxhr.statusText;
showModalConsole(modalData);
});
};