diff --git a/bi/widget.js b/bi/widget.js index 2d4b5cf43..c61da4a5e 100644 --- a/bi/widget.js +++ b/bi/widget.js @@ -15080,7 +15080,7 @@ BI.SliderButton = BI.inherit(BI.Widget, { BI.shortcut("bi.slider_button", BI.SliderButton);/** * Created by Urthur on 2017/9/4. */ -BI.Slider = BI.inherit(BI.Widget, { +BI.SliderNormal = BI.inherit(BI.Widget, { _constant: { HEIGHT: 28, SLIDER_WIDTH_HALF: 10, @@ -15090,7 +15090,7 @@ BI.Slider = BI.inherit(BI.Widget, { }, _defaultConfig: function () { - return BI.extend(BI.Slider.superclass._defaultConfig.apply(this, arguments), { + return BI.extend(BI.SliderNormal.superclass._defaultConfig.apply(this, arguments), { baseCls: "bi-slider", min: 10, max: 50 @@ -15098,7 +15098,7 @@ BI.Slider = BI.inherit(BI.Widget, { }, _init: function () { - BI.Slider.superclass._init.apply(this, arguments); + BI.SliderNormal.superclass._init.apply(this, arguments); var self = this; var c = this._constant, o = this.options; this.enable = false; @@ -15127,13 +15127,13 @@ BI.Slider = BI.inherit(BI.Widget, { var v = self._getValueByPercent(significantPercent); self.value = BI.parseInt(v) + 1; self.slider.setValue(self.getValue()); - self.fireEvent(BI.Slider.EVENT_CHANGE); + self.fireEvent(BI.SliderNormal.EVENT_CHANGE); }, stop: function (e, ui) { var percent = (ui.position.left) * 100 / (self._getRightTrackLength()); var significantPercent = BI.parseFloat(percent.toFixed(1)); self._setSliderPosition(significantPercent); - self.fireEvent(BI.Slider.EVENT_CHANGE); + self.fireEvent(BI.SliderNormal.EVENT_CHANGE); } }); var sliderVertical = BI.createWidget({ @@ -15167,7 +15167,7 @@ BI.Slider = BI.inherit(BI.Widget, { var v = self._getValueByPercent(significantPercent); self.value = BI.parseInt(v); self.slider.setValue(self.getValue()); - self.fireEvent(BI.Slider.EVENT_CHANGE); + self.fireEvent(BI.SliderNormal.EVENT_CHANGE); } }); @@ -15276,8 +15276,8 @@ BI.Slider = BI.inherit(BI.Widget, { } }); -BI.Slider.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.slider", BI.Slider);/** +BI.SliderNormal.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.slider", BI.SliderNormal);/** * 可以单选多选切换的树 * * Created by GUY on 2015/12/21. diff --git a/demo/js/widget/slider/demo.slider.js b/demo/js/widget/slider/demo.slider.js index 0fe4bf8a9..6a5e377e3 100644 --- a/demo/js/widget/slider/demo.slider.js +++ b/demo/js/widget/slider/demo.slider.js @@ -34,7 +34,7 @@ Demo.Slider = BI.inherit(BI.Widget, { }); this.slider.setValue("30"); - this.slider.on(BI.Slider.EVENT_CHANGE, function () { + this.slider.on(BI.SliderNormal.EVENT_CHANGE, function () { console.log(this.getValue()); }) } diff --git a/dist/bundle.js b/dist/bundle.js index 7fbe6c106..c1ae93dd6 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -92136,7 +92136,7 @@ BI.SliderButton = BI.inherit(BI.Widget, { BI.shortcut("bi.slider_button", BI.SliderButton);/** * Created by Urthur on 2017/9/4. */ -BI.Slider = BI.inherit(BI.Widget, { +BI.SliderNormal = BI.inherit(BI.Widget, { _constant: { HEIGHT: 28, SLIDER_WIDTH_HALF: 10, @@ -92146,7 +92146,7 @@ BI.Slider = BI.inherit(BI.Widget, { }, _defaultConfig: function () { - return BI.extend(BI.Slider.superclass._defaultConfig.apply(this, arguments), { + return BI.extend(BI.SliderNormal.superclass._defaultConfig.apply(this, arguments), { baseCls: "bi-slider", min: 10, max: 50 @@ -92154,7 +92154,7 @@ BI.Slider = BI.inherit(BI.Widget, { }, _init: function () { - BI.Slider.superclass._init.apply(this, arguments); + BI.SliderNormal.superclass._init.apply(this, arguments); var self = this; var c = this._constant, o = this.options; this.enable = false; @@ -92183,13 +92183,13 @@ BI.Slider = BI.inherit(BI.Widget, { var v = self._getValueByPercent(significantPercent); self.value = BI.parseInt(v) + 1; self.slider.setValue(self.getValue()); - self.fireEvent(BI.Slider.EVENT_CHANGE); + self.fireEvent(BI.SliderNormal.EVENT_CHANGE); }, stop: function (e, ui) { var percent = (ui.position.left) * 100 / (self._getRightTrackLength()); var significantPercent = BI.parseFloat(percent.toFixed(1)); self._setSliderPosition(significantPercent); - self.fireEvent(BI.Slider.EVENT_CHANGE); + self.fireEvent(BI.SliderNormal.EVENT_CHANGE); } }); var sliderVertical = BI.createWidget({ @@ -92223,7 +92223,7 @@ BI.Slider = BI.inherit(BI.Widget, { var v = self._getValueByPercent(significantPercent); self.value = BI.parseInt(v); self.slider.setValue(self.getValue()); - self.fireEvent(BI.Slider.EVENT_CHANGE); + self.fireEvent(BI.SliderNormal.EVENT_CHANGE); } }); @@ -92332,8 +92332,8 @@ BI.Slider = BI.inherit(BI.Widget, { } }); -BI.Slider.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.slider", BI.Slider);/** +BI.SliderNormal.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.slider", BI.SliderNormal);/** * 可以单选多选切换的树 * * Created by GUY on 2015/12/21. diff --git a/dist/demo.js b/dist/demo.js index defc49963..48368cd2e 100644 --- a/dist/demo.js +++ b/dist/demo.js @@ -8435,7 +8435,7 @@ Demo.Slider = BI.inherit(BI.Widget, { }); this.slider.setValue("30"); - this.slider.on(BI.Slider.EVENT_CHANGE, function () { + this.slider.on(BI.SliderNormal.EVENT_CHANGE, function () { console.log(this.getValue()); }) } diff --git a/dist/widget.js b/dist/widget.js index cc03fcf11..2c0182da9 100644 --- a/dist/widget.js +++ b/dist/widget.js @@ -15080,7 +15080,7 @@ BI.SliderButton = BI.inherit(BI.Widget, { BI.shortcut("bi.slider_button", BI.SliderButton);/** * Created by Urthur on 2017/9/4. */ -BI.Slider = BI.inherit(BI.Widget, { +BI.SliderNormal = BI.inherit(BI.Widget, { _constant: { HEIGHT: 28, SLIDER_WIDTH_HALF: 10, @@ -15090,7 +15090,7 @@ BI.Slider = BI.inherit(BI.Widget, { }, _defaultConfig: function () { - return BI.extend(BI.Slider.superclass._defaultConfig.apply(this, arguments), { + return BI.extend(BI.SliderNormal.superclass._defaultConfig.apply(this, arguments), { baseCls: "bi-slider", min: 10, max: 50 @@ -15098,7 +15098,7 @@ BI.Slider = BI.inherit(BI.Widget, { }, _init: function () { - BI.Slider.superclass._init.apply(this, arguments); + BI.SliderNormal.superclass._init.apply(this, arguments); var self = this; var c = this._constant, o = this.options; this.enable = false; @@ -15127,13 +15127,13 @@ BI.Slider = BI.inherit(BI.Widget, { var v = self._getValueByPercent(significantPercent); self.value = BI.parseInt(v) + 1; self.slider.setValue(self.getValue()); - self.fireEvent(BI.Slider.EVENT_CHANGE); + self.fireEvent(BI.SliderNormal.EVENT_CHANGE); }, stop: function (e, ui) { var percent = (ui.position.left) * 100 / (self._getRightTrackLength()); var significantPercent = BI.parseFloat(percent.toFixed(1)); self._setSliderPosition(significantPercent); - self.fireEvent(BI.Slider.EVENT_CHANGE); + self.fireEvent(BI.SliderNormal.EVENT_CHANGE); } }); var sliderVertical = BI.createWidget({ @@ -15167,7 +15167,7 @@ BI.Slider = BI.inherit(BI.Widget, { var v = self._getValueByPercent(significantPercent); self.value = BI.parseInt(v); self.slider.setValue(self.getValue()); - self.fireEvent(BI.Slider.EVENT_CHANGE); + self.fireEvent(BI.SliderNormal.EVENT_CHANGE); } }); @@ -15276,8 +15276,8 @@ BI.Slider = BI.inherit(BI.Widget, { } }); -BI.Slider.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.slider", BI.Slider);/** +BI.SliderNormal.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.slider", BI.SliderNormal);/** * 可以单选多选切换的树 * * Created by GUY on 2015/12/21. diff --git a/src/widget/slider/slider.js b/src/widget/slider/slider.js index fb752242d..51efde461 100644 --- a/src/widget/slider/slider.js +++ b/src/widget/slider/slider.js @@ -1,7 +1,7 @@ /** * Created by Urthur on 2017/9/4. */ -BI.Slider = BI.inherit(BI.Widget, { +BI.SliderNormal = BI.inherit(BI.Widget, { _constant: { HEIGHT: 28, SLIDER_WIDTH_HALF: 10, @@ -11,7 +11,7 @@ BI.Slider = BI.inherit(BI.Widget, { }, _defaultConfig: function () { - return BI.extend(BI.Slider.superclass._defaultConfig.apply(this, arguments), { + return BI.extend(BI.SliderNormal.superclass._defaultConfig.apply(this, arguments), { baseCls: "bi-slider", min: 10, max: 50 @@ -19,7 +19,7 @@ BI.Slider = BI.inherit(BI.Widget, { }, _init: function () { - BI.Slider.superclass._init.apply(this, arguments); + BI.SliderNormal.superclass._init.apply(this, arguments); var self = this; var c = this._constant, o = this.options; this.enable = false; @@ -48,13 +48,13 @@ BI.Slider = BI.inherit(BI.Widget, { var v = self._getValueByPercent(significantPercent); self.value = BI.parseInt(v) + 1; self.slider.setValue(self.getValue()); - self.fireEvent(BI.Slider.EVENT_CHANGE); + self.fireEvent(BI.SliderNormal.EVENT_CHANGE); }, stop: function (e, ui) { var percent = (ui.position.left) * 100 / (self._getRightTrackLength()); var significantPercent = BI.parseFloat(percent.toFixed(1)); self._setSliderPosition(significantPercent); - self.fireEvent(BI.Slider.EVENT_CHANGE); + self.fireEvent(BI.SliderNormal.EVENT_CHANGE); } }); var sliderVertical = BI.createWidget({ @@ -88,7 +88,7 @@ BI.Slider = BI.inherit(BI.Widget, { var v = self._getValueByPercent(significantPercent); self.value = BI.parseInt(v); self.slider.setValue(self.getValue()); - self.fireEvent(BI.Slider.EVENT_CHANGE); + self.fireEvent(BI.SliderNormal.EVENT_CHANGE); } }); @@ -197,5 +197,5 @@ BI.Slider = BI.inherit(BI.Widget, { } }); -BI.Slider.EVENT_CHANGE = "EVENT_CHANGE"; -BI.shortcut("bi.slider", BI.Slider); \ No newline at end of file +BI.SliderNormal.EVENT_CHANGE = "EVENT_CHANGE"; +BI.shortcut("bi.slider", BI.SliderNormal); \ No newline at end of file