aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aaronly.me@outlook.com>2016-11-08 16:18:29 +0800
committerAaron LI <aaronly.me@outlook.com>2016-11-08 16:18:29 +0800
commitdf37352e973a4769b1a5c967686f95f6e8bf8cb8 (patch)
tree833c1f478aaa2c24d44fb581f9bb92983206db15
parent40017dc8af4a4f46bc376b2f8561c75416424cbb (diff)
downloadfg21sim-df37352e973a4769b1a5c967686f95f6e8bf8cb8.tar.bz2
webui: websocket.js: Fix the bug for sending data to the server
-rw-r--r--fg21sim/webui/static/js/websocket.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/fg21sim/webui/static/js/websocket.js b/fg21sim/webui/static/js/websocket.js
index 968a3de..0c566c6 100644
--- a/fg21sim/webui/static/js/websocket.js
+++ b/fg21sim/webui/static/js/websocket.js
@@ -208,7 +208,8 @@ $(document).ready(function () {
var name = $(e.target).attr("name");
var value = getFormConfigSingle(name);
// Sync form configuration to the server
- setServerConfigs(g_ws, {name: value});
+ // NOTE: Use the "computed property names" available in ECMAScript 6
+ setServerConfigs(g_ws, {[name]: value});
});
} else {