JS: Fix usage of global variable self used to reference icinga in events.js

refs #10703
This commit is contained in:
Eric Lippmann 2016-09-09 13:20:55 +02:00
parent 7e47a2965c
commit 118c435bc5
1 changed files with 4 additions and 4 deletions

View File

@ -105,7 +105,7 @@
// Note: It is important that this is the first handler for this event!
$(document).on('rendered', { self: this }, this.applyHandlers);
$.each(self.icinga.behaviors, function (name, behavior) {
$.each(this.icinga.behaviors, function (name, behavior) {
behavior.bind($(document));
});
@ -577,11 +577,11 @@
} else if (targetId === '_main') {
targetId = 'col1';
$target = $('#' + targetId);
self.icinga.ui.layout1col();
this.icinga.ui.layout1col();
} else {
$target = $('#' + targetId);
if (! $target.length) {
self.icinga.logger.warn('Link target "#' + targetId + '" does not exist in DOM.');
this.icinga.logger.warn('Link target "#' + targetId + '" does not exist in DOM.');
}
}
@ -596,7 +596,7 @@
},
unbindGlobalHandlers: function () {
$.each(self.icinga.behaviors, function (name, behavior) {
$.each(this.icinga.behaviors, function (name, behavior) {
behavior.unbind($(document));
});
$(window).off('resize', this.onWindowResize);