projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7a7120a
)
libs/web: fix tab highlighting with multiple tabs
author
Jo-Philipp Wich
<jow@openwrt.org>
Wed, 20 Oct 2010 22:43:29 +0000
(22:43 +0000)
committer
Jo-Philipp Wich
<jow@openwrt.org>
Wed, 20 Oct 2010 22:43:29 +0000
(22:43 +0000)
libs/web/htdocs/luci-static/resources/cbi.js
patch
|
blob
|
history
diff --git
a/libs/web/htdocs/luci-static/resources/cbi.js
b/libs/web/htdocs/luci-static/resources/cbi.js
index
a00254c
..
7c5dd4e
100644
(file)
--- a/
libs/web/htdocs/luci-static/resources/cbi.js
+++ b/
libs/web/htdocs/luci-static/resources/cbi.js
@@
-437,6
+437,8
@@
function cbi_t_switch(section, tab) {
}
function cbi_t_update() {
}
function cbi_t_update() {
+ var hl_tabs = [ ];
+
for( var sid in cbi_t )
for( var tid in cbi_t[sid] )
if( cbi_c[cbi_t[sid][tid].cid] == 0 ) {
for( var sid in cbi_t )
for( var tid in cbi_t[sid] )
if( cbi_c[cbi_t[sid][tid].cid] == 0 ) {
@@
-446,9
+448,15
@@
function cbi_t_update() {
cbi_t[sid][tid].tab.style.display = '';
var t = cbi_t[sid][tid].tab;
cbi_t[sid][tid].tab.style.display = '';
var t = cbi_t[sid][tid].tab;
-
window.setTimeout(function() { t.className = t.className.replace(/ cbi-tab-highlighted/g, '') }, 750)
;
-
cbi_t[sid][tid].tab.className += ' cbi-tab-highlighted'
;
+
t.className += ' cbi-tab-highlighted'
;
+
hl_tabs.push(t)
;
}
}
+
+ if( hl_tabs.length > 0 )
+ window.setTimeout(function() {
+ for( var i = 0; i < hl_tabs.length; i++ )
+ hl_tabs[i].className = hl_tabs[i].className.replace(/ cbi-tab-highlighted/g, '');
+ }, 750);
}
}