summaryrefslogtreecommitdiff
path: root/prefs.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2010-11-17 16:21:49 +0300
committerAndrew Dolgov <[email protected]>2010-11-17 16:21:49 +0300
commit556e5b46d8fdcf341b7255df5a3f9196c03f67a3 (patch)
tree8e42d29923e3d7651f68244dd131f6dc3b760ded /prefs.js
parentc19dd6b7dccbcc00ecc7ee21e3e1cd4beed29237 (diff)
fix startup tab handling
Diffstat (limited to 'prefs.js')
-rw-r--r--prefs.js24
1 files changed, 16 insertions, 8 deletions
diff --git a/prefs.js b/prefs.js
index de19eaeb9..2f8240926 100644
--- a/prefs.js
+++ b/prefs.js
@@ -1107,29 +1107,37 @@ function selectTab(id, noupdate, subop) {
function init_second_stage() {
try {
- var active_tab = getInitParam("prefs_active_tab");
- if (!$(active_tab+"Tab")) active_tab = "genConfig";
- if (!active_tab || active_tab == '0') active_tab = "genConfig";
document.onkeydown = pref_hotkey_handler;
document.onmousedown = mouse_down_handler;
document.onmouseup = mouse_up_handler;
- var tab = getURLParam('tab');
-
caller_subop = getURLParam('subop');
if (getURLParam("subopparam")) {
caller_subop = caller_subop + ":" + getURLParam("subopparam");
}
- if (tab) active_tab = tab;
-
loading_set_progress(60);
- selectTab(active_tab, true);
notify("");
+ dojo.addOnLoad(function() {
+
+ var active_tab = getInitParam("prefs_active_tab");
+ if (!$(active_tab+"Tab")) active_tab = "genConfig";
+ if (!active_tab || active_tab == '0') active_tab = "genConfig";
+
+ var http_tab = getURLParam('tab');
+
+ if (http_tab) active_tab = http_tab;
+
+ var tab = dijit.byId(active_tab + "Tab");
+
+ if (tab) dijit.byId("pref-tabs").selectChild(tab);
+
+ });
+
setTimeout("hotkey_prefix_timeout()", 5*1000);
remove_splash();