Avoid local variable name `self' in history.js and timer.js

refs #10703
This commit is contained in:
Alexander A. Klimov 2016-09-01 16:15:10 +02:00
parent 3c43d38171
commit e726f10e68
2 changed files with 6 additions and 6 deletions

View File

@ -144,8 +144,8 @@
*/
onHistoryChange: function (event) {
var self = event.data.self,
icinga = self.icinga;
var _this = event.data.self,
icinga = _this.icinga;
icinga.logger.debug('Got a history change');
@ -157,9 +157,9 @@
}
// keep the last pushed url in sync with history changes
self.lastPushUrl = location.href;
_this.lastPushUrl = location.href;
self.applyLocationBar();
_this.applyLocationBar();
// notify behaviors of the state change
$.each(this.icinga.behaviors, function (i, behavior) {

View File

@ -49,8 +49,8 @@
* The initialization function starts our ticker
*/
initialize: function () {
var self = this;
this.ticker = setInterval(function () { self.tick(); }, this.interval);
var _this = this;
this.ticker = setInterval(function () { _this.tick(); }, this.interval);
},
/**