Trigger 'rendered' event also on page loads
This commit is contained in:
parent
14ed3b6fe2
commit
758fd06cfe
|
@ -76,6 +76,9 @@
|
|||
// We catch resize events
|
||||
$(window).on('resize', { self: this.icinga.ui }, this.icinga.ui.onWindowResize);
|
||||
|
||||
// Trigger 'rendered' event also on page loads
|
||||
$(window).on('load', { self: this }, this.onLoad);
|
||||
|
||||
// Destroy Icinga, clean up and interrupt pending requests on unload
|
||||
$( window ).on('unload', { self: this }, this.onUnload);
|
||||
$( window ).on('beforeunload', { self: this }, this.onUnload);
|
||||
|
@ -192,6 +195,10 @@
|
|||
}
|
||||
},
|
||||
|
||||
onLoad: function (event) {
|
||||
$('.container').trigger('rendered');
|
||||
},
|
||||
|
||||
onUnload: function (event) {
|
||||
var icinga = event.data.self.icinga;
|
||||
icinga.logger.info('Unloading Icinga');
|
||||
|
@ -397,6 +404,7 @@
|
|||
|
||||
unbindGlobalHandlers: function () {
|
||||
$(window).off('resize', this.onWindowResize);
|
||||
$(window).off('load', this.onLoad);
|
||||
$(window).off('unload', this.onUnload);
|
||||
$(window).off('beforeunload', this.onUnload);
|
||||
$(document).off('scroll', '.container', this.onContainerScroll);
|
||||
|
|
Loading…
Reference in New Issue