1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2025-12-13 21:45:55 +00:00

use multiple classes to mark statuses, JS code cleanup

This commit is contained in:
Andrew Dolgov
2010-11-14 15:55:51 +03:00
parent 7d12b6c8be
commit ca8e3d75f4
9 changed files with 231 additions and 431 deletions

View File

@@ -1111,25 +1111,11 @@ function selectTab(id, noupdate, subop) {
/* clean selection from all tabs */
var tabs_holder = $("prefTabs");
var tab = tabs_holder.firstChild;
while (tab) {
if (tab.className && tab.className.match("prefsTabSelected")) {
tab.className = "prefsTab";
}
tab = tab.nextSibling;
}
$$("#prefTabs div").invoke('removeClassName', 'Selected');
/* mark new tab as selected */
tab = $(id + "Tab");
if (tab) {
if (!tab.className.match("Selected")) {
tab.className = tab.className + "Selected";
}
}
$(id + "Tab").addClassName("Selected");
active_tab = id;