mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-31 01:34:09 +02:00
Apply history also on page load
This commit is contained in:
parent
e291974e55
commit
e0be89a1dc
@ -49,6 +49,7 @@
|
|||||||
) {
|
) {
|
||||||
this.enabled = true;
|
this.enabled = true;
|
||||||
this.icinga.logger.debug('History API enabled');
|
this.icinga.logger.debug('History API enabled');
|
||||||
|
this.applyLocationBar();
|
||||||
$(window).on('popstate', { self: this }, this.onHistoryChange);
|
$(window).on('popstate', { self: this }, this.onHistoryChange);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,9 +99,7 @@
|
|||||||
|
|
||||||
var self = event.data.self,
|
var self = event.data.self,
|
||||||
icinga = self.icinga,
|
icinga = self.icinga,
|
||||||
onload,
|
onload;
|
||||||
main,
|
|
||||||
parts;
|
|
||||||
|
|
||||||
icinga.logger.debug('Got a history change');
|
icinga.logger.debug('Got a history change');
|
||||||
|
|
||||||
@ -117,6 +116,15 @@
|
|||||||
icinga.logger.debug('History state', event.originalEvent.state);
|
icinga.logger.debug('History state', event.originalEvent.state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.applyLocationBar();
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
applyLocationBar: function () {
|
||||||
|
var icinga = this.icinga,
|
||||||
|
main,
|
||||||
|
parts;
|
||||||
|
|
||||||
// TODO: Still hardcoding col1/col2, shall be dynamic soon
|
// TODO: Still hardcoding col1/col2, shall be dynamic soon
|
||||||
main = document.location.pathname + document.location.search;
|
main = document.location.pathname + document.location.search;
|
||||||
if ($('#col1').data('icingaUrl') !== main) {
|
if ($('#col1').data('icingaUrl') !== main) {
|
||||||
@ -145,7 +153,6 @@
|
|||||||
// TODO: Replace with dynamic columns
|
// TODO: Replace with dynamic columns
|
||||||
icinga.ui.layout1col();
|
icinga.ui.layout1col();
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user