1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-02-10 16:01:33 +00:00

fix preferences for opera

This commit is contained in:
Andrew Dolgov
2006-06-01 15:48:46 +01:00
parent a6c3f28c4a
commit b2caf812fb
+65 -48
View File
@@ -1112,58 +1112,68 @@ function selectTab(id, noupdate) {
// alert(id); // alert(id);
if (!xmlhttp_ready(xmlhttp)) { if (!id) id = active_tab;
printLockingError();
return
}
if (!noupdate) { try {
notify("Loading, please wait...", true); if (!xmlhttp_ready(xmlhttp)) {
printLockingError();
// close active infobox if needed return
closeInfoBox();
// clean up all current selections, just in case
active_feed_cat = false;
active_label = false;
if (id == "feedConfig") {
updateFeedList();
} else if (id == "filterConfig") {
updateFilterList();
} else if (id == "labelConfig") {
updateLabelList();
} else if (id == "genConfig") {
updatePrefsList();
} else if (id == "userConfig") {
updateUsersList();
} else if (id == "feedBrowser") {
updateBigFeedBrowser();
} }
}
var tab = document.getElementById(active_tab + "Tab"); if (!noupdate) {
if (tab) { debug("selectTab: " + id + "(NU: " + noupdate + ")");
if (tab.className.match("Selected")) {
tab.className = "prefsTab"; notify("Loading, please wait...", true);
// close active infobox if needed
closeInfoBox();
// clean up all current selections, just in case
active_feed_cat = false;
active_label = false;
if (id == "feedConfig") {
updateFeedList();
} else if (id == "filterConfig") {
updateFilterList();
} else if (id == "labelConfig") {
updateLabelList();
} else if (id == "genConfig") {
updatePrefsList();
} else if (id == "userConfig") {
updateUsersList();
} else if (id == "feedBrowser") {
updateBigFeedBrowser();
}
} }
}
var tab = document.getElementById(active_tab + "Tab");
tab = document.getElementById(id + "Tab");
if (tab) {
if (tab) { if (tab.className.match("Selected")) {
if (!tab.className.match("Selected")) { tab.className = "prefsTab";
tab.className = tab.className + "Selected"; }
} }
}
tab = document.getElementById(id + "Tab");
if (tab) {
if (!tab.className.match("Selected")) {
tab.className = tab.className + "Selected";
}
}
if (active_tab != id) {
storeInitParam("prefs_active_tab", id);
}
active_tab = id;
if (active_tab != id) { } catch (e) {
storeInitParam("prefs_active_tab", id); exception_error("selectTab", e);
} }
active_tab = id;
} }
function backend_sanity_check_callback() { function backend_sanity_check_callback() {
@@ -1217,12 +1227,19 @@ function backend_sanity_check_callback() {
function init_second_stage() { function init_second_stage() {
active_tab = getInitParam("prefs_active_tab"); try {
if (!active_tab) active_tab = "genConfig"; active_tab = getInitParam("prefs_active_tab");
selectTab(active_tab); if (!active_tab) active_tab = "genConfig";
notify("");
if (navigator.userAgent.match("Opera")) {
setTimeout("selectTab()", 500);
} else {
selectTab(active_tab);
}
notify("");
} catch (e) {
exception_error("init_second_stage", e);
}
} }
function init() { function init() {