X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=blobdiff_plain;f=modules%2Fluci-base%2Fhtdocs%2Fluci-static%2Fresources%2Fcbi.js;fp=modules%2Fluci-base%2Fhtdocs%2Fluci-static%2Fresources%2Fcbi.js;h=a8d323d6a8fcb8831df1e425c44fa96dc3d2f617;hp=227461070565607c1186321c5c8ce1262ddc95b7;hb=cd85ef388cfb9134e3de490ff5d395f593783f8c;hpb=84de513a79c1714ffa8e51009b7aa97ef975961d 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) {