diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2016-02-09 16:10:55 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2016-02-09 16:12:02 +0100 |
commit | cd85ef388cfb9134e3de490ff5d395f593783f8c (patch) | |
tree | 1722d7ddd880dcfd3a461cdae09f1e2f1f3391dd /modules/luci-base/htdocs/luci-static | |
parent | 84de513a79c1714ffa8e51009b7aa97ef975961d (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/luci-static')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/cbi.js | 4 |
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 227461070..a8d323d6a 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) { |