diff options
author | Aaron LI <aaronly.me@outlook.com> | 2016-11-17 18:58:27 +0800 |
---|---|---|
committer | Aaron LI <aaronly.me@outlook.com> | 2016-11-17 18:58:27 +0800 |
commit | 4967e163f4ae6b1d679e14821096f2617c954c8e (patch) | |
tree | 19e9639af638d18a175c0046286ffdd51d4bb0ef /fg21sim/webui/static/js/configs.js | |
parent | 627f3164d8826609e9e6819e02d0b450db1239cd (diff) | |
download | fg21sim-4967e163f4ae6b1d679e14821096f2617c954c8e.tar.bz2 |
webui: Support IE11; Fix a missing quotation.
* IE11 does NOT support most of the ECMAScript 6 features, such as the
"computed property names" which used in "configs.js".
* Do not use the "computed property names" feature to support IE11
* Fix a missing quotation in "index.html"
Diffstat (limited to 'fg21sim/webui/static/js/configs.js')
-rw-r--r-- | fg21sim/webui/static/js/configs.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/fg21sim/webui/static/js/configs.js b/fg21sim/webui/static/js/configs.js index 87919e2..ed1e177 100644 --- a/fg21sim/webui/static/js/configs.js +++ b/fg21sim/webui/static/js/configs.js @@ -587,8 +587,13 @@ $(document).ready(function () { var name = $(e.target).attr("name"); var value = getFormConfigSingle(name); // Synchronize the changed form configuration to the server - // NOTE: Use the "computed property names" available in ECMAScript 6 - setServerConfigs(ajax_url, {[name]: value}) + // NOTE: + // Use the "computed property names" available in ECMAScript 6 + // (IE 11 not support this!) + // var data = {[name]: value}; + var data = {}; + data[name] = value; + setServerConfigs(ajax_url, data) .then(function () { validateServerConfigs(ajax_url); }) .done(function () { updateFormConfigStatus(); }); }); |