projects
/
project
/
luci2
/
ui.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9946be7
)
luci2: Introduce 'add' option to LuCI2.cbi.AbstractValue.depends() to support increme...
author
Jo-Philipp Wich
<jow@openwrt.org>
Sat, 1 Feb 2014 17:59:06 +0000
(17:59 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Sat, 1 Feb 2014 17:59:06 +0000
(17:59 +0000)
luci2/htdocs/luci2/luci2.js
patch
|
blob
|
history
diff --git
a/luci2/htdocs/luci2/luci2.js
b/luci2/htdocs/luci2/luci2.js
index 6e66128d8fb23d367d3ac0dda2126d2a376f1447..00365ae2cc593533ad3b1115a92cfcf469494e31 100644
(file)
--- a/
luci2/htdocs/luci2/luci2.js
+++ b/
luci2/htdocs/luci2/luci2.js
@@
-5240,7
+5240,7
@@
function LuCI2()
return (i.disabled || i.error.text() == '');
},
- depends: function(d, v)
+ depends: function(d, v
, add
)
{
var dep;
@@
-5285,7
+5285,11
@@
function LuCI2()
if ($.isEmptyObject(dep))
return this;
- this.dependencies.push(dep);
+ if (!add || !this.dependencies.length)
+ this.dependencies.push(dep);
+ else
+ for (var i = 0; i < this.dependencies.length; i++)
+ $.extend(this.dependencies[i], dep);
return this;
},