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) { onHistoryChange: function (event) {
var self = event.data.self, var _this = event.data.self,
icinga = self.icinga; icinga = _this.icinga;
icinga.logger.debug('Got a history change'); icinga.logger.debug('Got a history change');
@ -157,9 +157,9 @@
} }
// keep the last pushed url in sync with history changes // 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 // notify behaviors of the state change
$.each(this.icinga.behaviors, function (i, behavior) { $.each(this.icinga.behaviors, function (i, behavior) {

View File

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