projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
luci-base: fix dependency handling of optionals (#645)
[project/luci.git]
/
modules
/
luci-base
/
htdocs
/
luci-static
/
resources
/
cbi.js
diff --git
a/modules/luci-base/htdocs/luci-static/resources/cbi.js
b/modules/luci-base/htdocs/luci-static/resources/cbi.js
index
2274610
..
a8d323d
100644
(file)
--- a/
modules/luci-base/htdocs/luci-static/resources/cbi.js
+++ b/
modules/luci-base/htdocs/luci-static/resources/cbi.js
@@
-490,6
+490,10
@@
function cbi_d_update() {
state = true;
}
+
+ // hide optionals widget if no choices remaining
+ if (parent.parentNode && parent.getAttribute('data-optionals'))
+ parent.parentNode.style.display = (parent.options.length <= 1) ? 'none' : '';
}
if (entry && entry.parent) {