|
|
|
@ -3,7 +3,8 @@
|
|
|
|
|
* @class BI.Text |
|
|
|
|
* @extends BI.Single |
|
|
|
|
*/ |
|
|
|
|
BI.Text = BI.inherit(BI.Single, { |
|
|
|
|
!(function () { |
|
|
|
|
BI.Text = BI.inherit(BI.Single, { |
|
|
|
|
|
|
|
|
|
props: { |
|
|
|
|
baseCls: "bi-text", |
|
|
|
@ -151,8 +152,17 @@ BI.Text = BI.inherit(BI.Single, {
|
|
|
|
|
this.text.element[0].textContent = BI.Text.formatText(this._getShowText()); |
|
|
|
|
BI.isKey(this.options.keyword) && this.doRedMark(this.options.keyword); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
BI.Text.formatText = function (text) { |
|
|
|
|
}); |
|
|
|
|
var formatters = []; |
|
|
|
|
BI.Text.addTextFormatter = function (formatter) { |
|
|
|
|
formatters.push(formatter); |
|
|
|
|
}; |
|
|
|
|
BI.Text.formatText = function (text) { |
|
|
|
|
for (var i = 0, len = formatters.length; i < len; i++) { |
|
|
|
|
text = formatters[i](text); |
|
|
|
|
} |
|
|
|
|
return text; |
|
|
|
|
}; |
|
|
|
|
BI.shortcut("bi.text", BI.Text); |
|
|
|
|
}; |
|
|
|
|
BI.shortcut("bi.text", BI.Text); |
|
|
|
|
}()); |
|
|
|
|
|
|
|
|
|