windy 7 years ago
parent
commit
a3905a91ed
  1. 17
      bi/widget.js
  2. 5
      demo/js/widget/slider/demo.slider.js
  3. 17
      dist/bundle.js
  4. 18
      dist/bundle.min.js
  5. 5
      dist/demo.js
  6. 17
      dist/widget.js
  7. 17
      src/widget/intervalslider/intervalslider.js

17
bi/widget.js

@ -5632,10 +5632,7 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
return BI.extend(BI.IntervalSlider.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.IntervalSlider.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-interval-slider bi-slider-track", baseCls: "bi-interval-slider bi-slider-track",
digit: false, digit: false,
unit: "", unit: ""
validationChecker: function (v) {
return true;
}
}) })
}, },
@ -5912,7 +5909,17 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
}, },
_checkValidation: function (v) { _checkValidation: function (v) {
return this.options.validationChecker(v) && (BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max)); var o = this.options;
var valid = false;
if (BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max)) {
if(o.digit === false){
valid = true;
}else{
var dotText = (v + "").split(".")[1] || "";
valid = (dotText.length === o.digit);
}
}
return valid;
}, },
_checkOverlap: function () { _checkOverlap: function () {

5
demo/js/widget/slider/demo.slider.js

@ -79,10 +79,7 @@ Demo.Slider = BI.inherit(BI.Widget, {
width: o.width, width: o.width,
unit: "px", unit: "px",
cls: "layout-bg-white", cls: "layout-bg-white",
digit: 0, digit: 1
validationChecker: function (v) {
return BI.isInteger(v);
}
}); });
intervalSliderLabel.setMinAndMax({ intervalSliderLabel.setMinAndMax({
min: 0, min: 0,

17
dist/bundle.js vendored

@ -80822,10 +80822,7 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
return BI.extend(BI.IntervalSlider.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.IntervalSlider.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-interval-slider bi-slider-track", baseCls: "bi-interval-slider bi-slider-track",
digit: false, digit: false,
unit: "", unit: ""
validationChecker: function (v) {
return true;
}
}) })
}, },
@ -81102,7 +81099,17 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
}, },
_checkValidation: function (v) { _checkValidation: function (v) {
return this.options.validationChecker(v) && (BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max)); var o = this.options;
var valid = false;
if (BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max)) {
if(o.digit === false){
valid = true;
}else{
var dotText = (v + "").split(".")[1] || "";
valid = (dotText.length === o.digit);
}
}
return valid;
}, },
_checkOverlap: function () { _checkOverlap: function () {

18
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

5
dist/demo.js vendored

@ -13065,10 +13065,7 @@ Demo.Slider = BI.inherit(BI.Widget, {
width: o.width, width: o.width,
unit: "px", unit: "px",
cls: "layout-bg-white", cls: "layout-bg-white",
digit: 0, digit: 1
validationChecker: function (v) {
return BI.isInteger(v);
}
}); });
intervalSliderLabel.setMinAndMax({ intervalSliderLabel.setMinAndMax({
min: 0, min: 0,

17
dist/widget.js vendored

@ -5632,10 +5632,7 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
return BI.extend(BI.IntervalSlider.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.IntervalSlider.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-interval-slider bi-slider-track", baseCls: "bi-interval-slider bi-slider-track",
digit: false, digit: false,
unit: "", unit: ""
validationChecker: function (v) {
return true;
}
}) })
}, },
@ -5912,7 +5909,17 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
}, },
_checkValidation: function (v) { _checkValidation: function (v) {
return this.options.validationChecker(v) && (BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max)); var o = this.options;
var valid = false;
if (BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max)) {
if(o.digit === false){
valid = true;
}else{
var dotText = (v + "").split(".")[1] || "";
valid = (dotText.length === o.digit);
}
}
return valid;
}, },
_checkOverlap: function () { _checkOverlap: function () {

17
src/widget/intervalslider/intervalslider.js

@ -16,10 +16,7 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
return BI.extend(BI.IntervalSlider.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.IntervalSlider.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-interval-slider bi-slider-track", baseCls: "bi-interval-slider bi-slider-track",
digit: false, digit: false,
unit: "", unit: ""
validationChecker: function (v) {
return true;
}
}) })
}, },
@ -296,7 +293,17 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
}, },
_checkValidation: function (v) { _checkValidation: function (v) {
return this.options.validationChecker(v) && (BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max)); var o = this.options;
var valid = false;
if (BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max)) {
if(o.digit === false){
valid = true;
}else{
var dotText = (v + "").split(".")[1] || "";
valid = (dotText.length === o.digit);
}
}
return valid;
}, },
_checkOverlap: function () { _checkOverlap: function () {

Loading…
Cancel
Save