mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
Avoid local variable name `self' in tooltip.js and tristate.js
refs #10703
This commit is contained in:
parent
0d7f8148de
commit
060a82fa4a
@ -21,7 +21,7 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
Tooltip.prototype.onRendered = function(evt) {
|
Tooltip.prototype.onRendered = function(evt) {
|
||||||
var self = evt.data.self, icinga = evt.data.icinga, el = evt.target;
|
var _this = evt.data.self, icinga = evt.data.icinga, el = evt.target;
|
||||||
|
|
||||||
$('[title]', el).each(function () {
|
$('[title]', el).each(function () {
|
||||||
var $el = $(this);
|
var $el = $(this);
|
||||||
@ -63,7 +63,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var title = $(this).find('.tipsy-inner').html();
|
var title = $(this).find('.tipsy-inner').html();
|
||||||
var atMouse = document.elementFromPoint(self.mouseX, self.mouseY);
|
var atMouse = document.elementFromPoint(_this.mouseX, _this.mouseY);
|
||||||
var nearestTip = $(atMouse).closest('[original-title="' + title + '"]')[0];
|
var nearestTip = $(atMouse).closest('[original-title="' + title + '"]')[0];
|
||||||
if (nearestTip) {
|
if (nearestTip) {
|
||||||
var tipsy = $.data(nearestTip, 'tipsy');
|
var tipsy = $.data(nearestTip, 'tipsy');
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
Tristate.prototype = new Icinga.EventListener();
|
Tristate.prototype = new Icinga.EventListener();
|
||||||
|
|
||||||
Tristate.prototype.clickTriState = function (event) {
|
Tristate.prototype.clickTriState = function (event) {
|
||||||
var self = event.data.self;
|
var _this = event.data.self;
|
||||||
var $tristate = $(this);
|
var $tristate = $(this);
|
||||||
var triState = parseInt($tristate.data('icinga-tristate'), 10);
|
var triState = parseInt($tristate.data('icinga-tristate'), 10);
|
||||||
|
|
||||||
@ -42,7 +42,7 @@
|
|||||||
} else {
|
} else {
|
||||||
$tristate.parent().find('b.tristate-changed').css('visibility', 'hidden');
|
$tristate.parent().find('b.tristate-changed').css('visibility', 'hidden');
|
||||||
}
|
}
|
||||||
self.icinga.ui.setTriState(value.toString(), $tristate);
|
_this.icinga.ui.setTriState(value.toString(), $tristate);
|
||||||
};
|
};
|
||||||
|
|
||||||
Icinga.Behaviors.Tristate = Tristate;
|
Icinga.Behaviors.Tristate = Tristate;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user