Skip to content

Commit

Permalink
js/history: no additional container at login
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Thomas-Gelf committed Aug 19, 2014
1 parent 4cfbb1f commit 3ccfbec
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions public/js/icinga/history.js
Expand Up @@ -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
Expand Down

0 comments on commit 3ccfbec

Please sign in to comment.