|
|
|
@ -67,6 +67,10 @@ BI.Single = BI.inherit(BI.Widget, {
|
|
|
|
|
self.setValue(newValue); |
|
|
|
|
}) : o.value; |
|
|
|
|
BI.Single.superclass._init.apply(this, arguments); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_mounted: function () { |
|
|
|
|
var o = this.options; |
|
|
|
|
if (o.enableHover || BI.isKey(o.title) || BI.isKey(o.warningTitle) |
|
|
|
|
|| BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) { |
|
|
|
|
this.enableHover({ |
|
|
|
@ -91,7 +95,7 @@ BI.Single = BI.inherit(BI.Widget, {
|
|
|
|
|
opt || (opt = {}); |
|
|
|
|
var self = this; |
|
|
|
|
if (!this._hoverBinded) { |
|
|
|
|
this.element.on("mouseenter.title" + this.getName(), function (e) { |
|
|
|
|
this.element.unbind("mouseenter.title").on("mouseenter.title", function (e) { |
|
|
|
|
self._e = e; |
|
|
|
|
if (self.getTipType() === "warning" || (BI.isKey(self.getWarningTitle()) && !self.isEnabled())) { |
|
|
|
|
delayingTooltips = self.getName(); |
|
|
|
@ -109,7 +113,7 @@ BI.Single = BI.inherit(BI.Widget, {
|
|
|
|
|
}, 500); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
this.element.on("mousemove.title" + this.getName(), function (e) { |
|
|
|
|
this.element.unbind("mousemove.title").on("mousemove.title", function (e) { |
|
|
|
|
self._e = e; |
|
|
|
|
if (BI.isNotNull(self.showTimeout)) { |
|
|
|
|
clearTimeout(self.showTimeout); |
|
|
|
@ -138,7 +142,7 @@ BI.Single = BI.inherit(BI.Widget, {
|
|
|
|
|
} |
|
|
|
|
}, 500); |
|
|
|
|
}); |
|
|
|
|
this.element.on("mouseleave.title" + this.getName(), function (e) { |
|
|
|
|
this.element.unbind("mouseleave.title").on("mouseleave.title", function (e) { |
|
|
|
|
self._e = null; |
|
|
|
|
self._clearTimeOut(); |
|
|
|
|
self._hideTooltip(); |
|
|
|
@ -151,9 +155,9 @@ BI.Single = BI.inherit(BI.Widget, {
|
|
|
|
|
// 取消hover事件
|
|
|
|
|
this._clearTimeOut(); |
|
|
|
|
this._hideTooltip(); |
|
|
|
|
this.element.unbind("mouseenter.title" + this.getName()) |
|
|
|
|
.unbind("mousemove.title" + this.getName()) |
|
|
|
|
.unbind("mouseleave.title" + this.getName()); |
|
|
|
|
this.element.unbind("mouseenter.title") |
|
|
|
|
.unbind("mousemove.title") |
|
|
|
|
.unbind("mouseleave.title"); |
|
|
|
|
this._hoverBinded = false; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
@ -217,8 +221,7 @@ BI.Single = BI.inherit(BI.Widget, {
|
|
|
|
|
return this.options.value; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
__d: function () { |
|
|
|
|
BI.Single.superclass.__d.call(this); |
|
|
|
|
_destroyed: function () { |
|
|
|
|
if (BI.isNotNull(this.showTimeout)) { |
|
|
|
|
clearTimeout(this.showTimeout); |
|
|
|
|
this.showTimeout = null; |
|
|
|
|