mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2026-03-14 17:27:23 +01:00
Improve control panel panel switching behaviour by using the URL fragment (#2252)
This commit is contained in:
@@ -168,7 +168,18 @@ function do_login() {
|
||||
// Open the next panel the user wants to go to. Do this after the XHR response
|
||||
// is over so that we don't start a new XHR request while this one is finishing,
|
||||
// which confuses the loading indicator.
|
||||
setTimeout(function() { show_panel(!switch_back_to_panel || switch_back_to_panel == "login" ? 'welcome' : switch_back_to_panel) }, 300);
|
||||
setTimeout(function() {
|
||||
if (window.location.hash) {
|
||||
var panelid = window.location.hash.substring(1);
|
||||
show_panel(panelid);
|
||||
} else {
|
||||
show_panel(
|
||||
!switch_back_to_panel || switch_back_to_panel == "login"
|
||||
? 'welcome'
|
||||
: switch_back_to_panel)
|
||||
}
|
||||
}, 300);
|
||||
|
||||
}
|
||||
},
|
||||
undefined,
|
||||
|
||||
Reference in New Issue
Block a user