diff --git a/demo/js/case/combo/demo.text_value_combo.js b/demo/js/case/combo/demo.text_value_combo.js index b31181509..996650fd8 100644 --- a/demo/js/case/combo/demo.text_value_combo.js +++ b/demo/js/case/combo/demo.text_value_combo.js @@ -29,6 +29,54 @@ Demo.TextValueCombo = BI.inherit(BI.Widget, { text: "MVC-3", iconCls: "pull-right-font", value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 }] }, { type: "bi.search_multi_text_value_combo", diff --git a/demo/js/widget/multiselect/demo.multi_select_tree.js b/demo/js/widget/multiselect/demo.multi_select_tree.js index 1869398ea..70308042d 100644 --- a/demo/js/widget/multiselect/demo.multi_select_tree.js +++ b/demo/js/widget/multiselect/demo.multi_select_tree.js @@ -13,7 +13,7 @@ Demo.MultiSelectList = BI.inherit(BI.Widget, { _createMultiSelectCombo: function () { var self = this; var widget = BI.createWidget({ - type: "bi.multi_select_insert_no_bar_list", + type: "bi.multi_select_insert_list", ref: function (ref) { self.list = ref; }, diff --git a/dist/base.js b/dist/base.js index 3ccf276b4..e8a72e0e2 100644 --- a/dist/base.js +++ b/dist/base.js @@ -15622,8 +15622,14 @@ BI.PopupView = BI.inherit(BI.Widget, { _init: function () { BI.PopupView.superclass._init.apply(this, arguments); var self = this, o = this.options; + this.wheelHandler = new BI.WheelHandler(function (deltaX, deltaY) { + var scrollTop = self.button_group.element.scrollTop(); + scrollTop += deltaY; + self.button_group.element.scrollTop(scrollTop); + }, false, true); var fn = function (e) { - e.stopPropagation(); + self.wheelHandler.onWheel(e.originalEvent); + e.stopEvent(); }, stop = function (e) { e.stopEvent(); return false; @@ -15634,7 +15640,7 @@ BI.PopupView = BI.inherit(BI.Widget, { "max-width": o.maxWidth + "px" }).bind({click: fn}); - this.element.bind("mousewheel", fn); + this.element.bind("mousewheel", BI.bind(fn, this)); o.stopPropagation && this.element.bind({mousedown: fn, mouseup: fn, mouseover: fn}); o.stopEvent && this.element.bind({mousedown: stop, mouseup: stop, mouseover: stop}); diff --git a/dist/bundle.js b/dist/bundle.js index 797806292..8804a59aa 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -51430,8 +51430,14 @@ BI.PopupView = BI.inherit(BI.Widget, { _init: function () { BI.PopupView.superclass._init.apply(this, arguments); var self = this, o = this.options; + this.wheelHandler = new BI.WheelHandler(function (deltaX, deltaY) { + var scrollTop = self.button_group.element.scrollTop(); + scrollTop += deltaY; + self.button_group.element.scrollTop(scrollTop); + }, false, true); var fn = function (e) { - e.stopPropagation(); + self.wheelHandler.onWheel(e.originalEvent); + e.stopEvent(); }, stop = function (e) { e.stopEvent(); return false; @@ -51442,7 +51448,7 @@ BI.PopupView = BI.inherit(BI.Widget, { "max-width": o.maxWidth + "px" }).bind({click: fn}); - this.element.bind("mousewheel", fn); + this.element.bind("mousewheel", BI.bind(fn, this)); o.stopPropagation && this.element.bind({mousedown: fn, mouseup: fn, mouseover: fn}); o.stopEvent && this.element.bind({mousedown: stop, mouseup: stop, mouseover: stop}); diff --git a/dist/demo.js b/dist/demo.js index cd3489205..f20a3ec64 100644 --- a/dist/demo.js +++ b/dist/demo.js @@ -2228,6 +2228,54 @@ Demo.TextValueCombo = BI.inherit(BI.Widget, { text: "MVC-3", iconCls: "pull-right-font", value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 + }, { + text: "MVC-3", + iconCls: "pull-right-font", + value: 3 }] }, { type: "bi.search_multi_text_value_combo", @@ -12853,7 +12901,7 @@ Demo.MultiSelectList = BI.inherit(BI.Widget, { _createMultiSelectCombo: function () { var self = this; var widget = BI.createWidget({ - type: "bi.multi_select_insert_no_bar_list", + type: "bi.multi_select_insert_list", ref: function (ref) { self.list = ref; }, diff --git a/dist/fineui.js b/dist/fineui.js index b0e9dd5cc..27902d4de 100644 --- a/dist/fineui.js +++ b/dist/fineui.js @@ -51679,8 +51679,14 @@ BI.PopupView = BI.inherit(BI.Widget, { _init: function () { BI.PopupView.superclass._init.apply(this, arguments); var self = this, o = this.options; + this.wheelHandler = new BI.WheelHandler(function (deltaX, deltaY) { + var scrollTop = self.button_group.element.scrollTop(); + scrollTop += deltaY; + self.button_group.element.scrollTop(scrollTop); + }, false, true); var fn = function (e) { - e.stopPropagation(); + self.wheelHandler.onWheel(e.originalEvent); + e.stopEvent(); }, stop = function (e) { e.stopEvent(); return false; @@ -51691,7 +51697,7 @@ BI.PopupView = BI.inherit(BI.Widget, { "max-width": o.maxWidth + "px" }).bind({click: fn}); - this.element.bind("mousewheel", fn); + this.element.bind("mousewheel", BI.bind(fn, this)); o.stopPropagation && this.element.bind({mousedown: fn, mouseup: fn, mouseover: fn}); o.stopEvent && this.element.bind({mousedown: stop, mouseup: stop, mouseover: stop}); diff --git a/src/base/layer/layer.popup.js b/src/base/layer/layer.popup.js index 8366e36ed..cc92a06c1 100644 --- a/src/base/layer/layer.popup.js +++ b/src/base/layer/layer.popup.js @@ -44,8 +44,14 @@ BI.PopupView = BI.inherit(BI.Widget, { _init: function () { BI.PopupView.superclass._init.apply(this, arguments); var self = this, o = this.options; + this.wheelHandler = new BI.WheelHandler(function (deltaX, deltaY) { + var scrollTop = self.button_group.element.scrollTop(); + scrollTop += deltaY; + self.button_group.element.scrollTop(scrollTop); + }, false, true); var fn = function (e) { - e.stopPropagation(); + self.wheelHandler.onWheel(e.originalEvent); + e.stopEvent(); }, stop = function (e) { e.stopEvent(); return false; @@ -56,7 +62,7 @@ BI.PopupView = BI.inherit(BI.Widget, { "max-width": o.maxWidth + "px" }).bind({click: fn}); - this.element.bind("mousewheel", fn); + this.element.bind("mousewheel", BI.bind(fn, this)); o.stopPropagation && this.element.bind({mousedown: fn, mouseup: fn, mouseover: fn}); o.stopEvent && this.element.bind({mousedown: stop, mouseup: stop, mouseover: stop});