Avoid local variable name `self' in module.js

refs #10703
This commit is contained in:
Alexander A. Klimov 2016-09-01 16:30:01 +02:00
parent 56c10ffdd5
commit 4f52beb32a
1 changed files with 5 additions and 5 deletions

View File

@ -80,16 +80,16 @@
},
applyHandlers: function () {
var self = this;
var _this = this;
$.each(this.registeredHandlers, function (key, on) {
self.bindEventHandler(
_this.bindEventHandler(
on.event,
on.filter,
on.handler
);
});
self = null;
_this = null;
return this;
},
@ -98,10 +98,10 @@
* Effectively bind the given event handler
*/
bindEventHandler: function (event, filter, handler) {
var self = this;
var _this = this;
this.icinga.logger.debug('Bound ' + filter + ' .' + event + '()');
this.handlers.push([event, filter, handler]);
$(document).on(event, filter, handler.bind(self.object));
$(document).on(event, filter, handler.bind(_this.object));
},
/**