mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 20:38:52 +00:00
[ticket/11562] Use jQuery in subPanels
PHPBB-11562
This commit is contained in:
parent
d091c4f829
commit
2624d1ea14
1 changed files with 3 additions and 17 deletions
|
@ -117,29 +117,15 @@ jQuery(document).ready(function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function subPanels(p) {
|
function subPanels(p) {
|
||||||
var i, e, t;
|
var i;
|
||||||
|
|
||||||
if (typeof(p) === 'string') {
|
if (typeof(p) === 'string') {
|
||||||
show_panel = p;
|
show_panel = p;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < panels.length; i++) {
|
for (i = 0; i < panels.length; i++) {
|
||||||
e = document.getElementById(panels[i]);
|
jQuery('#' + panels[i]).css('display', panels[i] === show_panel ? 'block' : 'none');
|
||||||
t = document.getElementById(panels[i] + '-tab');
|
jQuery('#' + panels[i] + '-tab').toggleClass('activetab', panels[i] === show_panel);
|
||||||
|
|
||||||
if (e) {
|
|
||||||
if (panels[i] === show_panel) {
|
|
||||||
e.style.display = 'block';
|
|
||||||
if (t) {
|
|
||||||
t.className = 'activetab';
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
e.style.display = 'none';
|
|
||||||
if (t) {
|
|
||||||
t.className = '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Reference in a new issue