|
|
|
@ -15,13 +15,14 @@ var delayingTooltips;
|
|
|
|
|
BI.Single = BI.inherit(BI.Widget, { |
|
|
|
|
_defaultConfig: function () { |
|
|
|
|
var conf = BI.Single.superclass._defaultConfig.apply(this, arguments); |
|
|
|
|
|
|
|
|
|
return BI.extend(conf, { |
|
|
|
|
readonly: false, |
|
|
|
|
title: null, |
|
|
|
|
warningTitle: null, |
|
|
|
|
tipType: null, // success或warning
|
|
|
|
|
belowMouse: false, // title是否跟随鼠标
|
|
|
|
|
enableHover: false |
|
|
|
|
belowMouse: false, // title是否跟随鼠标
|
|
|
|
|
enableHover: false, |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
@ -70,7 +71,7 @@ BI.Single = BI.inherit(BI.Widget, {
|
|
|
|
|
|| BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) { |
|
|
|
|
this.enableHover({ |
|
|
|
|
belowMouse: o.belowMouse, |
|
|
|
|
container: o.container |
|
|
|
|
container: o.container, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
@ -136,7 +137,6 @@ BI.Single = BI.inherit(BI.Widget, {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, 500); |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
this.element.on("mouseleave.title" + this.getName(), function (e) { |
|
|
|
|
self._e = null; |
|
|
|
@ -193,6 +193,7 @@ BI.Single = BI.inherit(BI.Widget, {
|
|
|
|
|
if (BI.isFunction(title)) { |
|
|
|
|
return title(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return title; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
@ -201,6 +202,7 @@ BI.Single = BI.inherit(BI.Widget, {
|
|
|
|
|
if (BI.isFunction(title)) { |
|
|
|
|
return title(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
return title; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
@ -222,6 +224,6 @@ BI.Single = BI.inherit(BI.Widget, {
|
|
|
|
|
this.showTimeout = null; |
|
|
|
|
} |
|
|
|
|
BI.Tooltips.remove(this.getName()); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
|
BI.shortcut("bi.single", BI.Single); |
|
|
|
|