aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2016-11-18 15:07:33 +0800
committerAaron LI <aaronly.me@outlook.com>2016-11-18 15:07:33 +0800
commit0bf4bf3c068dfc5c0e64b5950de89d0c4bab2f2a (patch)
treec2c956254a98d7f6b0e4ab1f934a7465db5b001d
parent381550871001f9fa037014efe1b361d072983bcd (diff)
downloadfg21sim-0bf4bf3c068dfc5c0e64b5950de89d0c4bab2f2a.tar.bz2
webui: configs.js: Fix two bugs
* Fix the wrong "action=reset" in "setServerConfigs()" * Add the missing "return" in the jQuery AJAX chain
-rw-r--r--fg21sim/webui/static/js/configs.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/fg21sim/webui/static/js/configs.js b/fg21sim/webui/static/js/configs.js
index 67fe032..e1e9a93 100644
--- a/fg21sim/webui/static/js/configs.js
+++ b/fg21sim/webui/static/js/configs.js
@@ -386,7 +386,7 @@ var resetConfigs = function (url) {
*/
var setServerConfigs = function (url, data) {
data = typeof data !== "undefined" ? data : {};
- return $.postJSON(url, {action: "reset", data: data},
+ return $.postJSON(url, {action: "set", data: data},
function (response) {
setFormConfigs({}, response.errors);
})
@@ -594,7 +594,7 @@ $(document).ready(function () {
var data = {};
data[name] = value;
setServerConfigs(ajax_url, data)
- .then(function () { validateServerConfigs(ajax_url); })
+ .then(function () { return validateServerConfigs(ajax_url); })
.done(function () { updateFormConfigStatus(); });
});
});