summaryrefslogtreecommitdiffhomepage
path: root/modules/luci-base/htdocs
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2016-02-09 16:10:55 +0100
committerJo-Philipp Wich <jow@openwrt.org>2016-02-09 16:12:02 +0100
commitcd85ef388cfb9134e3de490ff5d395f593783f8c (patch)
tree1722d7ddd880dcfd3a461cdae09f1e2f1f3391dd /modules/luci-base/htdocs
parent84de513a79c1714ffa8e51009b7aa97ef975961d (diff)
luci-base: fix dependency handling of optionals (#645)
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'modules/luci-base/htdocs')
-rw-r--r--modules/luci-base/htdocs/luci-static/resources/cbi.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/cbi.js b/modules/luci-base/htdocs/luci-static/resources/cbi.js
index 2274610705..a8d323d6a8 100644
--- 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) {