Browse Source

加validationCherker

es6
windy 7 years ago
parent
commit
9c75b92cd1
  1. 8
      bi/widget.js
  2. 8
      demo/js/widget/slider/demo.slider.js
  3. 8
      dist/bundle.js
  4. 8
      dist/demo.js
  5. 8
      dist/widget.js
  6. 7
      src/widget/intervalslider/intervalslider.js
  7. 1
      src/widget/singleslider/button/editor.sign.text.js

8
bi/widget.js

@ -5632,7 +5632,10 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
return BI.extend(BI.IntervalSlider.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-interval-slider bi-slider-track",
digit: false,
unit: ""
unit: "",
validationChecker: function (v) {
return true;
}
})
},
@ -5909,7 +5912,7 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
},
_checkValidation: function (v) {
return BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max)
return this.options.validationChecker(v) && (BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max));
},
_checkOverlap: function () {
@ -17496,6 +17499,7 @@ BI.SignTextEditor = BI.inherit(BI.Widget, {
}
});
BI.SignTextEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SignTextEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL";
BI.shortcut("bi.sign_text_editor", BI.SignTextEditor);/**
* Created by zcf on 2016/9/22.

8
demo/js/widget/slider/demo.slider.js

@ -77,8 +77,12 @@ Demo.Slider = BI.inherit(BI.Widget, {
var intervalSliderLabel = BI.createWidget({
type: "bi.interval_slider",
width: o.width,
unit: "个",
cls: "layout-bg-white"
unit: "px",
cls: "layout-bg-white",
digit: 0,
validationChecker: function (v) {
return BI.isInteger(v);
}
});
intervalSliderLabel.setMinAndMax({
min: 0,

8
dist/bundle.js vendored

@ -80822,7 +80822,10 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
return BI.extend(BI.IntervalSlider.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-interval-slider bi-slider-track",
digit: false,
unit: ""
unit: "",
validationChecker: function (v) {
return true;
}
})
},
@ -81099,7 +81102,7 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
},
_checkValidation: function (v) {
return BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max)
return this.options.validationChecker(v) && (BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max));
},
_checkOverlap: function () {
@ -92686,6 +92689,7 @@ BI.SignTextEditor = BI.inherit(BI.Widget, {
}
});
BI.SignTextEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SignTextEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL";
BI.shortcut("bi.sign_text_editor", BI.SignTextEditor);/**
* Created by zcf on 2016/9/22.

8
dist/demo.js vendored

@ -13063,8 +13063,12 @@ Demo.Slider = BI.inherit(BI.Widget, {
var intervalSliderLabel = BI.createWidget({
type: "bi.interval_slider",
width: o.width,
unit: "个",
cls: "layout-bg-white"
unit: "px",
cls: "layout-bg-white",
digit: 0,
validationChecker: function (v) {
return BI.isInteger(v);
}
});
intervalSliderLabel.setMinAndMax({
min: 0,

8
dist/widget.js vendored

@ -5632,7 +5632,10 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
return BI.extend(BI.IntervalSlider.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-interval-slider bi-slider-track",
digit: false,
unit: ""
unit: "",
validationChecker: function (v) {
return true;
}
})
},
@ -5909,7 +5912,7 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
},
_checkValidation: function (v) {
return BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max)
return this.options.validationChecker(v) && (BI.isNumeric(v) && !(BI.isNull(v) || v < this.min || v > this.max));
},
_checkOverlap: function () {
@ -17496,6 +17499,7 @@ BI.SignTextEditor = BI.inherit(BI.Widget, {
}
});
BI.SignTextEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SignTextEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL";
BI.shortcut("bi.sign_text_editor", BI.SignTextEditor);/**
* Created by zcf on 2016/9/22.

7
src/widget/intervalslider/intervalslider.js

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

1
src/widget/singleslider/button/editor.sign.text.js

@ -200,5 +200,6 @@ BI.SignTextEditor = BI.inherit(BI.Widget, {
}
});
BI.SignTextEditor.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.SignTextEditor.EVENT_CLICK_LABEL = "EVENT_CLICK_LABEL";
BI.shortcut("bi.sign_text_editor", BI.SignTextEditor);
Loading…
Cancel
Save