projects
/
project
/
luci2
/
ui.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
luci2: use custom object merge in LuCI2.ui.menu.firstChildView() to avoid overwriting...
[project/luci2/ui.git]
/
luci2
/
htdocs
/
luci2
/
luci2.js
diff --git
a/luci2/htdocs/luci2/luci2.js
b/luci2/htdocs/luci2/luci2.js
index
1725059
..
2bf73c8
100644
(file)
--- a/
luci2/htdocs/luci2/luci2.js
+++ b/
luci2/htdocs/luci2/luci2.js
@@
-2152,7
+2152,7
@@
function LuCI2()
break;
case 'add':
break;
case 'add':
- log.push('uci add %s
(= <ins><strong>%s</strong></ins>)'.format(config
, c[1]));
+ log.push('uci add %s
<ins>%s</ins> (= <ins><strong>%s</strong></ins>)'.format(config, c[2]
, c[1]));
break;
case 'list-add':
break;
case 'list-add':
@@
-2333,7
+2333,10
@@
function LuCI2()
var child = this.firstChildView(nodes[i]);
if (child)
{
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;
}
}
return node;
}
}
@@
-3612,12
+3615,10
@@
function LuCI2()
if (chg)
{
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
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;
}
return chg;