js/history: no additional container at login

History tries to load additional URLs separated by #! on page load. This
makes no sense on login page. However we need to preserve them when logging
in.

refs #6935
This commit is contained in:
Thomas Gelf 2014-08-19 09:22:10 +02:00
parent 4cfbb1f006
commit 3ccfbec53c
1 changed files with 12 additions and 5 deletions

View File

@ -162,11 +162,18 @@
parts = document.location.hash.split(/#!/);
if ($('#col2').data('icingaUrl') !== main) {
icinga.loader.loadUrl(
parts[1],
$('#col2')
).historyTriggered = true;
if ($('#layout > #login').length) {
// We are on the login page!
$('#login form #redirect').val(
$('#login form #redirect').val() + '#!' + parts[1]
);
} else {
if ($('#col2').data('icingaUrl') !== main) {
icinga.loader.loadUrl(
parts[1],
$('#col2')
).historyTriggered = true;
}
}
// TODO: Replace with dynamic columns