diff --git a/dist/bundle.js b/dist/bundle.js index 5e798e7d1..26c9a8856 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -94460,16 +94460,13 @@ BI.IntervalSlider = BI.inherit(BI.Widget, { TRACK_HEIGHT: 24 }, - _defaultConfig: function () { - return BI.extend(BI.IntervalSlider.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-interval-slider bi-slider-track", - digit: false, - unit: "" - }); + props: { + baseCls: "bi-interval-slider bi-slider-track", + digit: false, + unit: "" }, - _init: function () { - BI.IntervalSlider.superclass._init.apply(this, arguments); + render: function () { var self = this; var c = this._constant; @@ -94559,7 +94556,7 @@ BI.IntervalSlider = BI.inherit(BI.Widget, { this._draggable(this.sliderTwo, false); this._setVisible(false); - BI.createWidget({ + return { type: "bi.absolute", element: this, items: [{ @@ -94580,10 +94577,10 @@ BI.IntervalSlider = BI.inherit(BI.Widget, { left: 0, width: "100%" }, - this._createLabelWrapper(), - this._createSliderWrapper() + this._createLabelWrapper(), + this._createSliderWrapper() ] - }); + }; }, _rePosBySizeAfterMove: function (size, isLeft) { @@ -94894,6 +94891,11 @@ BI.IntervalSlider = BI.inherit(BI.Widget, { return value; }, + _setEnable: function (b) { + BI.IntervalSlider.superclass._setEnable.apply(this, [b]); + this.blueTrack && this.blueTrack.setVisible(!!b); + }, + getValue: function () { if (this.valueOne <= this.valueTwo) { return {min: this.valueOne, max: this.valueTwo}; @@ -106855,16 +106857,14 @@ BI.SingleSlider = BI.inherit(BI.Widget, { SLIDER_HEIGHT: 30, TRACK_HEIGHT: 24 }, - _defaultConfig: function () { - return BI.extend(BI.SingleSlider.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-single-slider bi-slider-track", - digit: false, - unit: "" - }); + + props: { + baseCls: "bi-single-slider bi-slider-track", + digit: false, + unit: "" }, - _init: function () { - BI.SingleSlider.superclass._init.apply(this, arguments); + render: function () { var self = this, o = this.options; var c = this._constant; this.enable = false; @@ -106944,9 +106944,8 @@ BI.SingleSlider = BI.inherit(BI.Widget, { self.fireEvent(BI.SingleSlider.EVENT_CHANGE); }); this._setVisible(false); - BI.createWidget({ + return { type: "bi.absolute", - element: this, items: [{ el: { type: "bi.vertical", @@ -106983,7 +106982,7 @@ BI.SingleSlider = BI.inherit(BI.Widget, { left: 0, width: "100%" }] - }); + }; }, _draggable: function (widget) { @@ -107137,6 +107136,11 @@ BI.SingleSlider = BI.inherit(BI.Widget, { } }, + _setEnable: function (b) { + BI.SingleSlider.superclass._setEnable.apply(this, [b]); + this.blueTrack && this.blueTrack.setVisible(!!b); + }, + setMinAndMax: function (v) { var minNumber = BI.parseFloat(v.min); var maxNumber = BI.parseFloat(v.max); @@ -107417,6 +107421,11 @@ BI.SingleSliderLabel = BI.inherit(BI.Widget, { return (v - this.min) * 100 / (this.max - this.min); }, + _setEnable: function (b) { + BI.SingleSliderLabel.superclass._setEnable.apply(this, [b]); + this.blueTrack && this.blueTrack.setVisible(!!b); + }, + getValue: function () { return this.value; }, @@ -107695,6 +107704,11 @@ BI.SingleSliderNormal = BI.inherit(BI.Widget, { return (v - this.min) * 100 / (this.max - this.min); }, + _setEnable: function (b) { + BI.SingleSliderNormal.superclass._setEnable.apply(this, [b]); + this.blueTrack && this.blueTrack.setVisible(!!b); + }, + getValue: function () { return this.value; }, diff --git a/dist/fineui.js b/dist/fineui.js index 1f8f59ab1..e8da254a3 100644 --- a/dist/fineui.js +++ b/dist/fineui.js @@ -94703,16 +94703,13 @@ BI.IntervalSlider = BI.inherit(BI.Widget, { TRACK_HEIGHT: 24 }, - _defaultConfig: function () { - return BI.extend(BI.IntervalSlider.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-interval-slider bi-slider-track", - digit: false, - unit: "" - }); + props: { + baseCls: "bi-interval-slider bi-slider-track", + digit: false, + unit: "" }, - _init: function () { - BI.IntervalSlider.superclass._init.apply(this, arguments); + render: function () { var self = this; var c = this._constant; @@ -94802,7 +94799,7 @@ BI.IntervalSlider = BI.inherit(BI.Widget, { this._draggable(this.sliderTwo, false); this._setVisible(false); - BI.createWidget({ + return { type: "bi.absolute", element: this, items: [{ @@ -94823,10 +94820,10 @@ BI.IntervalSlider = BI.inherit(BI.Widget, { left: 0, width: "100%" }, - this._createLabelWrapper(), - this._createSliderWrapper() + this._createLabelWrapper(), + this._createSliderWrapper() ] - }); + }; }, _rePosBySizeAfterMove: function (size, isLeft) { @@ -95137,6 +95134,11 @@ BI.IntervalSlider = BI.inherit(BI.Widget, { return value; }, + _setEnable: function (b) { + BI.IntervalSlider.superclass._setEnable.apply(this, [b]); + this.blueTrack && this.blueTrack.setVisible(!!b); + }, + getValue: function () { if (this.valueOne <= this.valueTwo) { return {min: this.valueOne, max: this.valueTwo}; @@ -107098,16 +107100,14 @@ BI.SingleSlider = BI.inherit(BI.Widget, { SLIDER_HEIGHT: 30, TRACK_HEIGHT: 24 }, - _defaultConfig: function () { - return BI.extend(BI.SingleSlider.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-single-slider bi-slider-track", - digit: false, - unit: "" - }); + + props: { + baseCls: "bi-single-slider bi-slider-track", + digit: false, + unit: "" }, - _init: function () { - BI.SingleSlider.superclass._init.apply(this, arguments); + render: function () { var self = this, o = this.options; var c = this._constant; this.enable = false; @@ -107187,9 +107187,8 @@ BI.SingleSlider = BI.inherit(BI.Widget, { self.fireEvent(BI.SingleSlider.EVENT_CHANGE); }); this._setVisible(false); - BI.createWidget({ + return { type: "bi.absolute", - element: this, items: [{ el: { type: "bi.vertical", @@ -107226,7 +107225,7 @@ BI.SingleSlider = BI.inherit(BI.Widget, { left: 0, width: "100%" }] - }); + }; }, _draggable: function (widget) { @@ -107380,6 +107379,11 @@ BI.SingleSlider = BI.inherit(BI.Widget, { } }, + _setEnable: function (b) { + BI.SingleSlider.superclass._setEnable.apply(this, [b]); + this.blueTrack && this.blueTrack.setVisible(!!b); + }, + setMinAndMax: function (v) { var minNumber = BI.parseFloat(v.min); var maxNumber = BI.parseFloat(v.max); @@ -107660,6 +107664,11 @@ BI.SingleSliderLabel = BI.inherit(BI.Widget, { return (v - this.min) * 100 / (this.max - this.min); }, + _setEnable: function (b) { + BI.SingleSliderLabel.superclass._setEnable.apply(this, [b]); + this.blueTrack && this.blueTrack.setVisible(!!b); + }, + getValue: function () { return this.value; }, @@ -107938,6 +107947,11 @@ BI.SingleSliderNormal = BI.inherit(BI.Widget, { return (v - this.min) * 100 / (this.max - this.min); }, + _setEnable: function (b) { + BI.SingleSliderNormal.superclass._setEnable.apply(this, [b]); + this.blueTrack && this.blueTrack.setVisible(!!b); + }, + getValue: function () { return this.value; }, diff --git a/dist/widget.js b/dist/widget.js index 4bdd96195..306782293 100644 --- a/dist/widget.js +++ b/dist/widget.js @@ -6877,16 +6877,13 @@ BI.IntervalSlider = BI.inherit(BI.Widget, { TRACK_HEIGHT: 24 }, - _defaultConfig: function () { - return BI.extend(BI.IntervalSlider.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-interval-slider bi-slider-track", - digit: false, - unit: "" - }); + props: { + baseCls: "bi-interval-slider bi-slider-track", + digit: false, + unit: "" }, - _init: function () { - BI.IntervalSlider.superclass._init.apply(this, arguments); + render: function () { var self = this; var c = this._constant; @@ -6976,7 +6973,7 @@ BI.IntervalSlider = BI.inherit(BI.Widget, { this._draggable(this.sliderTwo, false); this._setVisible(false); - BI.createWidget({ + return { type: "bi.absolute", element: this, items: [{ @@ -6997,10 +6994,10 @@ BI.IntervalSlider = BI.inherit(BI.Widget, { left: 0, width: "100%" }, - this._createLabelWrapper(), - this._createSliderWrapper() + this._createLabelWrapper(), + this._createSliderWrapper() ] - }); + }; }, _rePosBySizeAfterMove: function (size, isLeft) { @@ -7311,6 +7308,11 @@ BI.IntervalSlider = BI.inherit(BI.Widget, { return value; }, + _setEnable: function (b) { + BI.IntervalSlider.superclass._setEnable.apply(this, [b]); + this.blueTrack && this.blueTrack.setVisible(!!b); + }, + getValue: function () { if (this.valueOne <= this.valueTwo) { return {min: this.valueOne, max: this.valueTwo}; @@ -19272,16 +19274,14 @@ BI.SingleSlider = BI.inherit(BI.Widget, { SLIDER_HEIGHT: 30, TRACK_HEIGHT: 24 }, - _defaultConfig: function () { - return BI.extend(BI.SingleSlider.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-single-slider bi-slider-track", - digit: false, - unit: "" - }); + + props: { + baseCls: "bi-single-slider bi-slider-track", + digit: false, + unit: "" }, - _init: function () { - BI.SingleSlider.superclass._init.apply(this, arguments); + render: function () { var self = this, o = this.options; var c = this._constant; this.enable = false; @@ -19361,9 +19361,8 @@ BI.SingleSlider = BI.inherit(BI.Widget, { self.fireEvent(BI.SingleSlider.EVENT_CHANGE); }); this._setVisible(false); - BI.createWidget({ + return { type: "bi.absolute", - element: this, items: [{ el: { type: "bi.vertical", @@ -19400,7 +19399,7 @@ BI.SingleSlider = BI.inherit(BI.Widget, { left: 0, width: "100%" }] - }); + }; }, _draggable: function (widget) { @@ -19554,6 +19553,11 @@ BI.SingleSlider = BI.inherit(BI.Widget, { } }, + _setEnable: function (b) { + BI.SingleSlider.superclass._setEnable.apply(this, [b]); + this.blueTrack && this.blueTrack.setVisible(!!b); + }, + setMinAndMax: function (v) { var minNumber = BI.parseFloat(v.min); var maxNumber = BI.parseFloat(v.max); @@ -19834,6 +19838,11 @@ BI.SingleSliderLabel = BI.inherit(BI.Widget, { return (v - this.min) * 100 / (this.max - this.min); }, + _setEnable: function (b) { + BI.SingleSliderLabel.superclass._setEnable.apply(this, [b]); + this.blueTrack && this.blueTrack.setVisible(!!b); + }, + getValue: function () { return this.value; }, @@ -20112,6 +20121,11 @@ BI.SingleSliderNormal = BI.inherit(BI.Widget, { return (v - this.min) * 100 / (this.max - this.min); }, + _setEnable: function (b) { + BI.SingleSliderNormal.superclass._setEnable.apply(this, [b]); + this.blueTrack && this.blueTrack.setVisible(!!b); + }, + getValue: function () { return this.value; }, diff --git a/src/widget/intervalslider/intervalslider.js b/src/widget/intervalslider/intervalslider.js index 30301a9c5..af387f503 100644 --- a/src/widget/intervalslider/intervalslider.js +++ b/src/widget/intervalslider/intervalslider.js @@ -12,16 +12,13 @@ BI.IntervalSlider = BI.inherit(BI.Widget, { TRACK_HEIGHT: 24 }, - _defaultConfig: function () { - return BI.extend(BI.IntervalSlider.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-interval-slider bi-slider-track", - digit: false, - unit: "" - }); + props: { + baseCls: "bi-interval-slider bi-slider-track", + digit: false, + unit: "" }, - _init: function () { - BI.IntervalSlider.superclass._init.apply(this, arguments); + render: function () { var self = this; var c = this._constant; @@ -111,7 +108,7 @@ BI.IntervalSlider = BI.inherit(BI.Widget, { this._draggable(this.sliderTwo, false); this._setVisible(false); - BI.createWidget({ + return { type: "bi.absolute", element: this, items: [{ @@ -132,10 +129,10 @@ BI.IntervalSlider = BI.inherit(BI.Widget, { left: 0, width: "100%" }, - this._createLabelWrapper(), - this._createSliderWrapper() + this._createLabelWrapper(), + this._createSliderWrapper() ] - }); + }; }, _rePosBySizeAfterMove: function (size, isLeft) { @@ -446,6 +443,11 @@ BI.IntervalSlider = BI.inherit(BI.Widget, { return value; }, + _setEnable: function (b) { + BI.IntervalSlider.superclass._setEnable.apply(this, [b]); + this.blueTrack && this.blueTrack.setVisible(!!b); + }, + getValue: function () { if (this.valueOne <= this.valueTwo) { return {min: this.valueOne, max: this.valueTwo}; diff --git a/src/widget/singleslider/singleslider.js b/src/widget/singleslider/singleslider.js index d39c2a23f..435908e44 100644 --- a/src/widget/singleslider/singleslider.js +++ b/src/widget/singleslider/singleslider.js @@ -10,16 +10,14 @@ BI.SingleSlider = BI.inherit(BI.Widget, { SLIDER_HEIGHT: 30, TRACK_HEIGHT: 24 }, - _defaultConfig: function () { - return BI.extend(BI.SingleSlider.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-single-slider bi-slider-track", - digit: false, - unit: "" - }); + + props: { + baseCls: "bi-single-slider bi-slider-track", + digit: false, + unit: "" }, - _init: function () { - BI.SingleSlider.superclass._init.apply(this, arguments); + render: function () { var self = this, o = this.options; var c = this._constant; this.enable = false; @@ -99,9 +97,8 @@ BI.SingleSlider = BI.inherit(BI.Widget, { self.fireEvent(BI.SingleSlider.EVENT_CHANGE); }); this._setVisible(false); - BI.createWidget({ + return { type: "bi.absolute", - element: this, items: [{ el: { type: "bi.vertical", @@ -138,7 +135,7 @@ BI.SingleSlider = BI.inherit(BI.Widget, { left: 0, width: "100%" }] - }); + }; }, _draggable: function (widget) { @@ -292,6 +289,11 @@ BI.SingleSlider = BI.inherit(BI.Widget, { } }, + _setEnable: function (b) { + BI.SingleSlider.superclass._setEnable.apply(this, [b]); + this.blueTrack && this.blueTrack.setVisible(!!b); + }, + setMinAndMax: function (v) { var minNumber = BI.parseFloat(v.min); var maxNumber = BI.parseFloat(v.max); diff --git a/src/widget/singleslider/singleslider.label.js b/src/widget/singleslider/singleslider.label.js index 9918e8267..931088390 100644 --- a/src/widget/singleslider/singleslider.label.js +++ b/src/widget/singleslider/singleslider.label.js @@ -243,6 +243,11 @@ BI.SingleSliderLabel = BI.inherit(BI.Widget, { return (v - this.min) * 100 / (this.max - this.min); }, + _setEnable: function (b) { + BI.SingleSliderLabel.superclass._setEnable.apply(this, [b]); + this.blueTrack && this.blueTrack.setVisible(!!b); + }, + getValue: function () { return this.value; }, diff --git a/src/widget/singleslider/singleslider.normal.js b/src/widget/singleslider/singleslider.normal.js index 10e778115..f2c33c67b 100644 --- a/src/widget/singleslider/singleslider.normal.js +++ b/src/widget/singleslider/singleslider.normal.js @@ -221,6 +221,11 @@ BI.SingleSliderNormal = BI.inherit(BI.Widget, { return (v - this.min) * 100 / (this.max - this.min); }, + _setEnable: function (b) { + BI.SingleSliderNormal.superclass._setEnable.apply(this, [b]); + this.blueTrack && this.blueTrack.setVisible(!!b); + }, + getValue: function () { return this.value; },