JS: Fix usage of global variable self used to reference icinga in events.js
refs #10703
This commit is contained in:
parent
7e47a2965c
commit
118c435bc5
|
@ -105,7 +105,7 @@
|
||||||
// Note: It is important that this is the first handler for this event!
|
// Note: It is important that this is the first handler for this event!
|
||||||
$(document).on('rendered', { self: this }, this.applyHandlers);
|
$(document).on('rendered', { self: this }, this.applyHandlers);
|
||||||
|
|
||||||
$.each(self.icinga.behaviors, function (name, behavior) {
|
$.each(this.icinga.behaviors, function (name, behavior) {
|
||||||
behavior.bind($(document));
|
behavior.bind($(document));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -577,11 +577,11 @@
|
||||||
} else if (targetId === '_main') {
|
} else if (targetId === '_main') {
|
||||||
targetId = 'col1';
|
targetId = 'col1';
|
||||||
$target = $('#' + targetId);
|
$target = $('#' + targetId);
|
||||||
self.icinga.ui.layout1col();
|
this.icinga.ui.layout1col();
|
||||||
} else {
|
} else {
|
||||||
$target = $('#' + targetId);
|
$target = $('#' + targetId);
|
||||||
if (! $target.length) {
|
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 () {
|
unbindGlobalHandlers: function () {
|
||||||
$.each(self.icinga.behaviors, function (name, behavior) {
|
$.each(this.icinga.behaviors, function (name, behavior) {
|
||||||
behavior.unbind($(document));
|
behavior.unbind($(document));
|
||||||
});
|
});
|
||||||
$(window).off('resize', this.onWindowResize);
|
$(window).off('resize', this.onWindowResize);
|
||||||
|
|
Loading…
Reference in New Issue