diff --git a/src/base/single/0.single.js b/src/base/single/0.single.js index d6cd92f2c..e12c726d1 100644 --- a/src/base/single/0.single.js +++ b/src/base/single/0.single.js @@ -196,7 +196,8 @@ BI.Single = BI.inherit(BI.Widget, { return this.options.value; }, - destroyed: function () { + __d: function () { + BI.Single.superclass.__d.call(this); if (BI.isNotNull(this.showTimeout)) { clearTimeout(this.showTimeout); this.showTimeout = null; diff --git a/src/base/single/1.text.js b/src/base/single/1.text.js index 125854873..cc6081e7f 100644 --- a/src/base/single/1.text.js +++ b/src/base/single/1.text.js @@ -45,13 +45,13 @@ }); } if (BI.isWidthOrHeight(o.height)) { - this.element.css({ lineHeight: BI.isNumber(o.height) ? (o.height / BI.pixRatio + BI.pixUnit) : o.height }); + this.element.css({lineHeight: BI.isNumber(o.height) ? (o.height / BI.pixRatio + BI.pixUnit) : o.height}); } if (BI.isWidthOrHeight(o.lineHeight)) { - this.element.css({ lineHeight: BI.isNumber(o.lineHeight) ? (o.lineHeight / BI.pixRatio + BI.pixUnit) : o.lineHeight }); + this.element.css({lineHeight: BI.isNumber(o.lineHeight) ? (o.lineHeight / BI.pixRatio + BI.pixUnit) : o.lineHeight}); } if (BI.isWidthOrHeight(o.maxWidth)) { - this.element.css({ maxWidth: BI.isNumber(o.maxWidth) ? (o.maxWidth / BI.pixRatio + BI.pixUnit) : o.maxWidth }); + this.element.css({maxWidth: BI.isNumber(o.maxWidth) ? (o.maxWidth / BI.pixRatio + BI.pixUnit) : o.maxWidth}); } this.element.css({ textAlign: o.textAlign, @@ -106,7 +106,6 @@ _getShowText: function () { var o = this.options; var text = BI.isFunction(o.text) ? o.text() : o.text; - return BI.isKey(text) ? BI.Text.formatText(text + "") : text; }, diff --git a/src/core/utils/i18n.js b/src/core/utils/i18n.js index 23fd11600..0dbf0a1a9 100644 --- a/src/core/utils/i18n.js +++ b/src/core/utils/i18n.js @@ -1,6 +1,11 @@ !(function () { var i18nStore = {}; _.extend(BI, { + changeI18n: function (i18n) { + if (i18n) { + i18nStore = i18n; + } + }, addI18n: function (i18n) { BI.extend(i18nStore, i18n); }, @@ -27,4 +32,4 @@ return localeText; } }); -})(); \ No newline at end of file +})();