From: Jo-Philipp Wich Date: Tue, 28 Apr 2020 07:51:54 +0000 (+0200) Subject: luci-base: form.js: toggle inactive CSS class on unsatisfied field cells X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=428e3bd6dc0afcc1ff1c2a62506d66bebc59976f;hp=daa318c1b2cde1be9df370b1794d660902feab6b;p=oweals%2Fluci.git luci-base: form.js: toggle inactive CSS class on unsatisfied field cells Signed-off-by: Jo-Philipp Wich --- diff --git a/modules/luci-base/htdocs/luci-static/resources/form.js b/modules/luci-base/htdocs/luci-static/resources/form.js index f9a9c5df7..8525937f0 100644 --- a/modules/luci-base/htdocs/luci-static/resources/form.js +++ b/modules/luci-base/htdocs/luci-static/resources/form.js @@ -1777,6 +1777,10 @@ var CBIAbstractValue = CBIAbstractElement.extend(/** @lends LuCI.form.AbstractVa if (field && field.classList.contains('hidden') == active) { field.classList[active ? 'remove' : 'add']('hidden'); + + if (dom.matches(field.parentNode, '.td.cbi-value-field')) + field.parentNode.classList[active ? 'remove' : 'add']('inactive'); + return true; }