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:
18
prefs.js
18
prefs.js
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user