summaryrefslogtreecommitdiff
path: root/prefs.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2006-06-01 15:48:46 +0100
committerAndrew Dolgov <[email protected]>2006-06-01 15:48:46 +0100
commitb2caf812fbefca175dc60176084eb296cc0b9aa2 (patch)
treed952d1bb8b4da03ef617f7be6f5ee21140159b17 /prefs.js
parenta6c3f28c4a7987d2731f1cee94b6ce4be2aef0c8 (diff)
fix preferences for opera
Diffstat (limited to 'prefs.js')
-rw-r--r--prefs.js113
1 files changed, 65 insertions, 48 deletions
diff --git a/prefs.js b/prefs.js
index eed755d5a..d73967313 100644
--- a/prefs.js
+++ b/prefs.js
@@ -1112,58 +1112,68 @@ function selectTab(id, noupdate) {
// alert(id);
- if (!xmlhttp_ready(xmlhttp)) {
- printLockingError();
- return
- }
-
- if (!noupdate) {
-
- notify("Loading, please wait...", true);
+ if (!id) id = active_tab;
- // close active infobox if needed
- closeInfoBox();
+ try {
- // 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();
+ if (!xmlhttp_ready(xmlhttp)) {
+ printLockingError();
+ return
}
- }
- var tab = document.getElementById(active_tab + "Tab");
+ if (!noupdate) {
- if (tab) {
- if (tab.className.match("Selected")) {
- tab.className = "prefsTab";
+ debug("selectTab: " + id + "(NU: " + noupdate + ")");
+
+ 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();
+ }
}
- }
-
- tab = document.getElementById(id + "Tab");
-
- if (tab) {
- if (!tab.className.match("Selected")) {
- tab.className = tab.className + "Selected";
+
+ var tab = document.getElementById(active_tab + "Tab");
+
+ if (tab) {
+ if (tab.className.match("Selected")) {
+ tab.className = "prefsTab";
+ }
}
- }
+
+ 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) {
- storeInitParam("prefs_active_tab", id);
+ } catch (e) {
+ exception_error("selectTab", e);
}
-
- active_tab = id;
}
function backend_sanity_check_callback() {
@@ -1217,12 +1227,19 @@ function backend_sanity_check_callback() {
function init_second_stage() {
- active_tab = getInitParam("prefs_active_tab");
- if (!active_tab) active_tab = "genConfig";
- selectTab(active_tab);
-
- notify("");
+ try {
+ active_tab = getInitParam("prefs_active_tab");
+ if (!active_tab) active_tab = "genConfig";
+ if (navigator.userAgent.match("Opera")) {
+ setTimeout("selectTab()", 500);
+ } else {
+ selectTab(active_tab);
+ }
+ notify("");
+ } catch (e) {
+ exception_error("init_second_stage", e);
+ }
}
function init() {