diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2016-01-18 11:04:15 +0100 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2016-01-18 11:04:15 +0100 |
commit | aa12e53333b47800e85fcc2acc16b5c10af8a91f (patch) | |
tree | fb01028d5265b5c934427efa86b7f83fa9771db1 /modules/luci-base/htdocs/luci-static/resources | |
parent | 879804f1d4716a61ad3cfff3b610b6c25db22a6c (diff) |
luci-base: add extra css class for map level tabs, don't track tab child count
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
Diffstat (limited to 'modules/luci-base/htdocs/luci-static/resources')
-rw-r--r-- | modules/luci-base/htdocs/luci-static/resources/cbi.js | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/modules/luci-base/htdocs/luci-static/resources/cbi.js b/modules/luci-base/htdocs/luci-static/resources/cbi.js index 1c4123bdad..15645d902c 100644 --- a/modules/luci-base/htdocs/luci-static/resources/cbi.js +++ b/modules/luci-base/htdocs/luci-static/resources/cbi.js @@ -475,7 +475,7 @@ function cbi_d_update() { if (node && node.parentNode && !cbi_d_check(entry.deps)) { node.parentNode.removeChild(node); state = true; - if( entry.parent ) + if( entry.parent && typeof(cbi_c[entry.parent]) == 'number') cbi_c[entry.parent]--; } else if ((!node || !node.parentNode) && cbi_d_check(entry.deps)) { if (!next) { @@ -484,7 +484,7 @@ function cbi_d_update() { next.parentNode.insertBefore(entry.node, next); } state = true; - if( entry.parent ) + if( entry.parent && typeof(cbi_c[entry.parent]) == 'number' ) cbi_c[entry.parent]++; } } @@ -935,7 +935,10 @@ function cbi_t_update() { for( var sid in cbi_t ) for( var tid in cbi_t[sid] ) { - if( cbi_c[cbi_t[sid][tid].cid] == 0 ) { + if (typeof(cbi_c[cbi_t[sid][tid].cid]) !== 'number') { + continue; + } + else if( cbi_c[cbi_t[sid][tid].cid] == 0 ) { cbi_t[sid][tid].tab.style.display = 'none'; } else if( cbi_t[sid][tid].tab && cbi_t[sid][tid].tab.style.display == 'none' ) { |