X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fluci2%2Fui.git;a=blobdiff_plain;f=luci2%2Fhtdocs%2Fluci2%2Fluci2.js;h=2bf73c82772295b0491a78344aff1c6e545f9cb7;hp=172505949d43dd27c0302b0350944152a8575c1a;hb=dcf972f1fb013fe63425e6de48ff3aa7ab7c044c;hpb=040ed60573605041313680e51b285cecff45f8cf diff --git a/luci2/htdocs/luci2/luci2.js b/luci2/htdocs/luci2/luci2.js index 1725059..2bf73c8 100644 --- a/luci2/htdocs/luci2/luci2.js +++ b/luci2/htdocs/luci2/luci2.js @@ -2152,7 +2152,7 @@ function LuCI2() break; case 'add': - log.push('uci add %s (= %s)'.format(config, c[1])); + log.push('uci add %s %s (= %s)'.format(config, c[2], c[1])); break; case 'list-add': @@ -2333,7 +2333,10 @@ function LuCI2() var child = this.firstChildView(nodes[i]); if (child) { - $.extend(node, child); + for (var key in child) + if (!node.hasOwnProperty(key) && child.hasOwnProperty(key)) + node[key] = child[key]; + return node; } } @@ -3612,12 +3615,10 @@ function LuCI2() if (chg) { - val = val ? this.options.enabled : this.options.disabled; - if (this.options.optional && val == this.options.initial) this.map.set(uci.config, uci.section, uci.option, undefined); else - this.map.set(uci.config, uci.section, uci.option, val); + this.map.set(uci.config, uci.section, uci.option, val ? this.options.enabled : this.options.disabled); } return chg;