From 4967e163f4ae6b1d679e14821096f2617c954c8e Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Thu, 17 Nov 2016 18:58:27 +0800 Subject: 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" --- fg21sim/webui/static/js/configs.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'fg21sim/webui/static') 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(); }); }); -- cgit v1.2.2