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