|
|
|
@ -16,7 +16,8 @@ BI.SingleSlider = BI.inherit(BI.Single, {
|
|
|
|
|
props: { |
|
|
|
|
baseCls: "bi-single-slider bi-slider-track", |
|
|
|
|
digit: false, |
|
|
|
|
unit: "" |
|
|
|
|
unit: "", |
|
|
|
|
errorText: "" |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
render: function () { |
|
|
|
@ -315,14 +316,18 @@ BI.SingleSlider = BI.inherit(BI.Single, {
|
|
|
|
|
this.min = 0; |
|
|
|
|
this.max = 0; |
|
|
|
|
this._setBlueTrack(0); |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
populate: function () { |
|
|
|
|
var o = this.options; |
|
|
|
|
if (!isNaN(this.min) && !isNaN(this.max)) { |
|
|
|
|
this._setVisible(true); |
|
|
|
|
this.enable = true; |
|
|
|
|
if (BI.isNotEmptyString(o.errorText)) { |
|
|
|
|
this.label.setErrorText(o.errorText); |
|
|
|
|
} else { |
|
|
|
|
this.label.setErrorText(BI.i18nText("BI-Basic_Please_Enter_Number_Between", this.min, this.max)); |
|
|
|
|
} |
|
|
|
|
if (BI.isNumeric(this.value) || BI.isNotEmptyString(this.value)) { |
|
|
|
|
this.label.setValue(this.value); |
|
|
|
|
this._setAllPosition(this._getPercentByValue(this.value)); |
|
|
|
|