diff options
author | Aaron LI <aaronly.me@outlook.com> | 2016-11-18 14:38:12 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@outlook.com> | 2016-11-18 14:38:12 +0800 |
commit | 381550871001f9fa037014efe1b361d072983bcd (patch) | |
tree | f377795b25164b493d791f13495928d018c7a888 /fg21sim/webui/static/js/configs.js | |
parent | dc59c7d18975a744ceac484eccf25225ef4ab583 (diff) | |
download | fg21sim-381550871001f9fa037014efe1b361d072983bcd.tar.bz2 |
webui: Rename jQuery ".fail()" callback argument "error" to "jqxhr"
Diffstat (limited to 'fg21sim/webui/static/js/configs.js')
-rw-r--r-- | fg21sim/webui/static/js/configs.js | 30 |
1 files changed, 15 insertions, 15 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); }); }; |