diff --git a/src/base/single/input/checkbox/checkbox.image.js b/src/base/single/input/checkbox/checkbox.image.js index c20127f602..dc17035673 100644 --- a/src/base/single/input/checkbox/checkbox.image.js +++ b/src/base/single/input/checkbox/checkbox.image.js @@ -15,19 +15,8 @@ BI.ImageCheckbox = BI.inherit(BI.IconButton, { iconWidth: 16, iconHeight: 16 }); - }, - - _init: function () { - BI.ImageCheckbox.superclass._init.apply(this, arguments); - }, - - doClick: function () { - BI.ImageCheckbox.superclass.doClick.apply(this, arguments); - if(this.isValid()) { - this.fireEvent(BI.Checkbox.EVENT_CHANGE); - } } }); -BI.ImageCheckbox.EVENT_CHANGE = "EVENT_CHANGE"; +BI.ImageCheckbox.EVENT_CHANGE = BI.IconButton.EVENT_CHANGE; BI.shortcut("bi.image_checkbox", BI.ImageCheckbox); \ No newline at end of file diff --git a/src/base/single/input/radio/radio.image.js b/src/base/single/input/radio/radio.image.js index 7fc365aea6..744bb511a6 100644 --- a/src/base/single/input/radio/radio.image.js +++ b/src/base/single/input/radio/radio.image.js @@ -28,6 +28,6 @@ BI.ImageRadio = BI.inherit(BI.IconButton, { } } }); -BI.ImageRadio.EVENT_CHANGE = "EVENT_CHANGE"; +BI.ImageRadio.EVENT_CHANGE = BI.IconButton.EVENT_CHANGE; BI.shortcut("bi.image_radio", BI.ImageRadio); \ No newline at end of file diff --git a/src/case/button/icon/icon.trigger.js b/src/case/button/icon/icon.trigger.js index f37906a750..6f7c2a1ee6 100644 --- a/src/case/button/icon/icon.trigger.js +++ b/src/case/button/icon/icon.trigger.js @@ -13,18 +13,7 @@ BI.TriggerIconButton = BI.inherit(BI.IconButton, { baseCls: (conf.baseCls || "") + " bi-trigger-icon-button", extraCls: "pull-down-font" }); - }, - - _init: function () { - BI.TriggerIconButton.superclass._init.apply(this, arguments); - }, - - doClick: function () { - BI.TriggerIconButton.superclass.doClick.apply(this, arguments); - if (this.isValid()) { - this.fireEvent(BI.TriggerIconButton.EVENT_CHANGE, this); - } } }); -BI.TriggerIconButton.EVENT_CHANGE = "EVENT_CHANGE"; +BI.TriggerIconButton.EVENT_CHANGE = BI.IconButton.EVENT_CHANGE; BI.shortcut("bi.trigger_icon_button", BI.TriggerIconButton); \ No newline at end of file diff --git a/src/case/button/icon/iconhalf/icon.half.image.js b/src/case/button/icon/iconhalf/icon.half.image.js index 925f1211dc..a9e9d00142 100644 --- a/src/case/button/icon/iconhalf/icon.half.image.js +++ b/src/case/button/icon/iconhalf/icon.half.image.js @@ -14,19 +14,8 @@ BI.HalfIconButton = BI.inherit(BI.IconButton, { iconHeight: 16, selected: false }); - }, - - _init: function () { - BI.HalfIconButton.superclass._init.apply(this, arguments); - }, - - doClick: function () { - BI.HalfIconButton.superclass.doClick.apply(this, arguments); - if(this.isValid()) { - this.fireEvent(BI.HalfIconButton.EVENT_CHANGE); - } } }); -BI.HalfIconButton.EVENT_CHANGE = "EVENT_CHANGE"; +BI.HalfIconButton.EVENT_CHANGE = BI.IconButton.EVENT_CHANGE; BI.shortcut("bi.half_icon_button", BI.HalfIconButton); \ No newline at end of file diff --git a/src/case/checkbox/check.arrownode.js b/src/case/checkbox/check.arrownode.js index 84b6fd578a..ebcb784d71 100644 --- a/src/case/checkbox/check.arrownode.js +++ b/src/case/checkbox/check.arrownode.js @@ -8,9 +8,7 @@ BI.ArrowTreeGroupNodeCheckbox = BI.inherit(BI.IconButton, { extraCls: "bi-arrow-group-node-checkbox" }); }, - _init: function () { - BI.ArrowTreeGroupNodeCheckbox.superclass._init.apply(this, arguments); - }, + setSelected: function (v) { BI.ArrowTreeGroupNodeCheckbox.superclass.setSelected.apply(this, arguments); if(v) { diff --git a/src/case/checkbox/check.first.treenode.js b/src/case/checkbox/check.first.treenode.js index 19b3e75e42..572908d8d7 100644 --- a/src/case/checkbox/check.first.treenode.js +++ b/src/case/checkbox/check.first.treenode.js @@ -11,10 +11,7 @@ BI.FirstTreeNodeCheckbox = BI.inherit(BI.IconButton, { iconHeight: 24 }); }, - _init: function () { - BI.FirstTreeNodeCheckbox.superclass._init.apply(this, arguments); - }, setSelected: function (v) { BI.FirstTreeNodeCheckbox.superclass.setSelected.apply(this, arguments); if(v === true) { diff --git a/src/case/checkbox/check.last.treenode.js b/src/case/checkbox/check.last.treenode.js index 58bb22f3d2..e0a9f621d3 100644 --- a/src/case/checkbox/check.last.treenode.js +++ b/src/case/checkbox/check.last.treenode.js @@ -11,10 +11,7 @@ BI.LastTreeNodeCheckbox = BI.inherit(BI.IconButton, { iconHeight: 24 }); }, - _init: function () { - BI.LastTreeNodeCheckbox.superclass._init.apply(this, arguments); - }, setSelected: function (v) { BI.LastTreeNodeCheckbox.superclass.setSelected.apply(this, arguments); if (v === true) { diff --git a/src/case/checkbox/check.mid.treenode.js b/src/case/checkbox/check.mid.treenode.js index 79a1a3e975..7679b466e0 100644 --- a/src/case/checkbox/check.mid.treenode.js +++ b/src/case/checkbox/check.mid.treenode.js @@ -11,10 +11,7 @@ BI.MidTreeNodeCheckbox = BI.inherit(BI.IconButton, { iconHeight: 24 }); }, - _init: function () { - BI.MidTreeNodeCheckbox.superclass._init.apply(this, arguments); - }, setSelected: function (v) { BI.MidTreeNodeCheckbox.superclass.setSelected.apply(this, arguments); if(v === true) { diff --git a/src/case/checkbox/check.treenode.js b/src/case/checkbox/check.treenode.js index 4f9088c4ba..b5642aae4b 100644 --- a/src/case/checkbox/check.treenode.js +++ b/src/case/checkbox/check.treenode.js @@ -11,10 +11,7 @@ BI.TreeNodeCheckbox = BI.inherit(BI.IconButton, { iconHeight: 24 }); }, - _init: function () { - BI.TreeNodeCheckbox.superclass._init.apply(this, arguments); - }, setSelected: function (v) { BI.TreeNodeCheckbox.superclass.setSelected.apply(this, arguments); if(v) { diff --git a/src/widget/multilayerselecttree/multilayerselecttree.combo.js b/src/widget/multilayerselecttree/multilayerselecttree.combo.js index cb0015f68f..d525575f27 100644 --- a/src/widget/multilayerselecttree/multilayerselecttree.combo.js +++ b/src/widget/multilayerselecttree/multilayerselecttree.combo.js @@ -116,6 +116,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, { }, items: o.items, itemsCreator: o.itemsCreator, + valueFormatter: o.valueFormatter, height: o.height - 2, text: o.text, value: o.value, @@ -129,6 +130,21 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, { self.combo.hideView(); self.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_CHANGE); } + }, { + eventName: BI.MultiLayerSelectTreeTrigger.EVENT_FOCUS, + action: function () { + self.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_FOCUS); + } + }, { + eventName: BI.MultiLayerSelectTreeTrigger.EVENT_BLUR, + action: function () { + self.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_BLUR); + } + }, { + eventName: BI.MultiLayerSelectTreeTrigger.EVENT_SEARCHING, + action: function () { + self.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_SEARCHING); + } }] }, hideChecker: function (e) { @@ -157,5 +173,8 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, { } }); +BI.MultiLayerSelectTreeCombo.EVENT_SEARCHING = "EVENT_SEARCHING"; +BI.MultiLayerSelectTreeCombo.EVENT_BLUR = "EVENT_BLUR"; +BI.MultiLayerSelectTreeCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.MultiLayerSelectTreeCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.shortcut("bi.multilayer_select_tree_combo", BI.MultiLayerSelectTreeCombo); \ No newline at end of file diff --git a/src/widget/multilayerselecttree/multilayerselecttree.trigger.js b/src/widget/multilayerselecttree/multilayerselecttree.trigger.js index d478a66c54..93dabd8b76 100644 --- a/src/widget/multilayerselecttree/multilayerselecttree.trigger.js +++ b/src/widget/multilayerselecttree/multilayerselecttree.trigger.js @@ -32,7 +32,23 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, { text: this._digest(o.value), value: o.value, height: o.height, - tipText: "" + tipText: "", + listeners: [{ + eventName: BI.StateEditor.EVENT_FOCUS, + action: function () { + self.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_FOCUS); + } + }, { + eventName: BI.StateEditor.EVENT_BLUR, + action: function () { + self.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_BLUR); + } + }, { + eventName: BI.StateEditor.EVENT_CHANGE, + action: function () { + self.fireEvent(BI.MultiLayerSelectTreeTrigger.EVENT_SEARCHING); + } + }] }, popup: { type: "bi.multilayer_select_tree_popup", @@ -116,6 +132,9 @@ BI.MultiLayerSelectTreeTrigger = BI.inherit(BI.Trigger, { return this.searcher.getValue(); } }); + +BI.MultiLayerSelectTreeTrigger.EVENT_FOCUS = "EVENT_FOCUS"; +BI.MultiLayerSelectTreeTrigger.EVENT_BLUR = "EVENT_BLUR"; BI.MultiLayerSelectTreeTrigger.EVENT_SEARCHING = "EVENT_SEARCHING"; BI.MultiLayerSelectTreeTrigger.EVENT_STOP = "EVENT_STOP"; BI.MultiLayerSelectTreeTrigger.EVENT_START = "EVENT_START"; diff --git a/src/widget/multilayersingletree/multilayersingletree.combo.js b/src/widget/multilayersingletree/multilayersingletree.combo.js index 289e2564c6..bd13e4de66 100644 --- a/src/widget/multilayersingletree/multilayersingletree.combo.js +++ b/src/widget/multilayersingletree/multilayersingletree.combo.js @@ -119,6 +119,7 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, { }, items: o.items, itemsCreator: o.itemsCreator, + valueFormatter: o.valueFormatter, height: o.height - 2, text: o.text, value: o.value, @@ -132,6 +133,21 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, { self.combo.hideView(); self.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_CHANGE); } + }, { + eventName: BI.MultiLayerSingleTreeTrigger.EVENT_FOCUS, + action: function () { + self.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_FOCUS); + } + }, { + eventName: BI.MultiLayerSingleTreeTrigger.EVENT_BLUR, + action: function () { + self.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_BLUR); + } + }, { + eventName: BI.MultiLayerSingleTreeTrigger.EVENT_SEARCHING, + action: function () { + self.fireEvent(BI.MultiLayerSingleTreeCombo.EVENT_SEARCHING); + } }] }, hideChecker: function (e) { @@ -160,5 +176,8 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, { } }); +BI.MultiLayerSingleTreeCombo.EVENT_SEARCHING = "EVENT_SEARCHING"; +BI.MultiLayerSingleTreeCombo.EVENT_BLUR = "EVENT_BLUR"; +BI.MultiLayerSingleTreeCombo.EVENT_FOCUS = "EVENT_FOCUS"; BI.MultiLayerSingleTreeCombo.EVENT_CHANGE = "EVENT_CHANGE"; BI.shortcut("bi.multilayer_single_tree_combo", BI.MultiLayerSingleTreeCombo); \ No newline at end of file diff --git a/src/widget/multilayersingletree/multilayersingletree.trigger.js b/src/widget/multilayersingletree/multilayersingletree.trigger.js index faf58fbf2d..e75a33cbb2 100644 --- a/src/widget/multilayersingletree/multilayersingletree.trigger.js +++ b/src/widget/multilayersingletree/multilayersingletree.trigger.js @@ -32,7 +32,23 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, { text: this._digest(o.value), value: o.value, height: o.height, - tipText: "" + tipText: "", + listeners: [{ + eventName: BI.StateEditor.EVENT_FOCUS, + action: function () { + self.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_FOCUS); + } + }, { + eventName: BI.StateEditor.EVENT_BLUR, + action: function () { + self.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_BLUR); + } + }, { + eventName: BI.StateEditor.EVENT_CHANGE, + action: function () { + self.fireEvent(BI.MultiLayerSingleTreeTrigger.EVENT_SEARCHING); + } + }] }, popup: { type: "bi.multilayer_single_tree_popup", @@ -116,6 +132,8 @@ BI.MultiLayerSingleTreeTrigger = BI.inherit(BI.Trigger, { return this.searcher.getValue(); } }); +BI.MultiLayerSingleTreeTrigger.EVENT_FOCUS = "EVENT_FOCUS"; +BI.MultiLayerSingleTreeTrigger.EVENT_BLUR = "EVENT_BLUR"; BI.MultiLayerSingleTreeTrigger.EVENT_SEARCHING = "EVENT_SEARCHING"; BI.MultiLayerSingleTreeTrigger.EVENT_STOP = "EVENT_STOP"; BI.MultiLayerSingleTreeTrigger.EVENT_START = "EVENT_START"; diff --git a/src/widget/multiselect/multiselect.combo.js b/src/widget/multiselect/multiselect.combo.js index fc8a893f0c..af2f24585f 100644 --- a/src/widget/multiselect/multiselect.combo.js +++ b/src/widget/multiselect/multiselect.combo.js @@ -61,12 +61,20 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { value: this.storeValue }); + this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS, function () { + self.fireEvent(BI.MultiSelectCombo.EVENT_FOCUS); + }); + this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR, function () { + self.fireEvent(BI.MultiSelectCombo.EVENT_BLUR); + }); + this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () { self._setStartValue(""); this.getSearcher().setValue(self.storeValue); }); this.trigger.on(BI.MultiSelectTrigger.EVENT_STOP, function () { self._setStartValue(""); + self.fireEvent(BI.MultiSelectCombo.EVENT_STOP); }); this.trigger.on(BI.MultiSelectTrigger.EVENT_PAUSE, function () { if (this.getSearcher().hasMatched()) { @@ -99,6 +107,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { } }); } + self.fireEvent(BI.MultiSelectCombo.EVENT_SEARCHING); }); this.trigger.on(BI.MultiSelectTrigger.EVENT_CHANGE, function (value, obj) { @@ -111,6 +120,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { assertShowValue(); }); } + self.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM); }); this.trigger.on(BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () { this.getCounter().setValue(self.storeValue); @@ -140,6 +150,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { self._adjust(function () { assertShowValue(); }); + self.fireEvent(BI.MultiSelectCombo.EVENT_CLICK_ITEM); } }, { eventName: BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM, @@ -365,6 +376,11 @@ BI.extend(BI.MultiSelectCombo, { REQ_GET_ALL_DATA: -1 }); +BI.MultiSelectCombo.EVENT_BLUR = "EVENT_BLUR"; +BI.MultiSelectCombo.EVENT_FOCUS = "EVENT_FOCUS"; +BI.MultiSelectCombo.EVENT_STOP = "EVENT_STOP"; +BI.MultiSelectCombo.EVENT_SEARCHING = "EVENT_SEARCHING"; +BI.MultiSelectCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM"; BI.MultiSelectCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.shortcut("bi.multi_select_combo", BI.MultiSelectCombo); \ No newline at end of file diff --git a/src/widget/multiselect/multiselect.insert.combo.js b/src/widget/multiselect/multiselect.insert.combo.js index 4ac0d488e2..1a6671c5b5 100644 --- a/src/widget/multiselect/multiselect.insert.combo.js +++ b/src/widget/multiselect/multiselect.insert.combo.js @@ -58,12 +58,20 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { value: o.value }); + this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_FOCUS, function () { + self.fireEvent(BI.MultiSelectInsertCombo.EVENT_FOCUS); + }); + this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BLUR, function () { + self.fireEvent(BI.MultiSelectInsertCombo.EVENT_BLUR); + }); + this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_START, function () { self._setStartValue(""); this.getSearcher().setValue(self.storeValue); }); this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_STOP, function () { self._setStartValue(""); + self.fireEvent(BI.MultiSelectInsertCombo.EVENT_STOP); }); this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_PAUSE, function () { if (this.getSearcher().hasMatched()) { @@ -92,6 +100,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { } }); } + self.fireEvent(BI.MultiSelectInsertCombo.EVENT_SEARCHING); }); this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_CHANGE, function (value, obj) { @@ -104,6 +113,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { assertShowValue(); }); } + self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM); }); this.trigger.on(BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW, function () { this.getCounter().setValue(self.storeValue); @@ -133,6 +143,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { self._adjust(function () { assertShowValue(); }); + self.fireEvent(BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM); } }, { eventName: BI.MultiSelectPopupView.EVENT_CLICK_CONFIRM, @@ -378,6 +389,11 @@ BI.extend(BI.MultiSelectInsertCombo, { REQ_GET_ALL_DATA: -1 }); +BI.MultiSelectInsertCombo.EVENT_FOCUS = "EVENT_FOCUS"; +BI.MultiSelectInsertCombo.EVENT_BLUR = "EVENT_BLUR"; +BI.MultiSelectInsertCombo.EVENT_STOP = "EVENT_STOP"; +BI.MultiSelectInsertCombo.EVENT_SEARCHING = "EVENT_SEARCHING"; +BI.MultiSelectInsertCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM"; BI.MultiSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.shortcut("bi.multi_select_insert_combo", BI.MultiSelectInsertCombo); \ No newline at end of file diff --git a/src/widget/multiselect/multiselect.insert.trigger.js b/src/widget/multiselect/multiselect.insert.trigger.js index d174bb1405..a2f60828d1 100644 --- a/src/widget/multiselect/multiselect.insert.trigger.js +++ b/src/widget/multiselect/multiselect.insert.trigger.js @@ -64,6 +64,12 @@ BI.MultiSelectInsertTrigger = BI.inherit(BI.Trigger, { this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_CHANGE, function () { self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_CHANGE, arguments); }); + this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_BLUR, function () { + self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_BLUR); + }); + this.searcher.on(BI.MultiSelectInsertSearcher.EVENT_FOCUS, function () { + self.fireEvent(BI.MultiSelectInsertTrigger.EVENT_FOCUS); + }); this.numberCounter = BI.createWidget(o.switcher, { type: "bi.multi_select_check_selected_switcher", valueFormatter: o.valueFormatter, @@ -172,5 +178,7 @@ BI.MultiSelectInsertTrigger.EVENT_PAUSE = "EVENT_PAUSE"; BI.MultiSelectInsertTrigger.EVENT_SEARCHING = "EVENT_SEARCHING"; BI.MultiSelectInsertTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW = "EVENT_BEFORE_COUNTER_POPUPVIEW"; BI.MultiSelectInsertTrigger.EVENT_ADD_ITEM = "EVENT_ADD_ITEM"; +BI.MultiSelectInsertTrigger.EVENT_FOCUS = "EVENT_FOCUS"; +BI.MultiSelectInsertTrigger.EVENT_BLUR = "EVENT_BLUR"; BI.shortcut("bi.multi_select_insert_trigger", BI.MultiSelectInsertTrigger); \ No newline at end of file diff --git a/src/widget/multiselect/multiselect.trigger.js b/src/widget/multiselect/multiselect.trigger.js index 8e9f8f09d6..12e8028593 100644 --- a/src/widget/multiselect/multiselect.trigger.js +++ b/src/widget/multiselect/multiselect.trigger.js @@ -61,6 +61,12 @@ BI.MultiSelectTrigger = BI.inherit(BI.Trigger, { this.searcher.on(BI.MultiSelectSearcher.EVENT_CHANGE, function () { self.fireEvent(BI.MultiSelectTrigger.EVENT_CHANGE, arguments); }); + this.searcher.on(BI.MultiSelectSearcher.EVENT_BLUR, function () { + self.fireEvent(BI.MultiSelectTrigger.EVENT_BLUR); + }); + this.searcher.on(BI.MultiSelectSearcher.EVENT_FOCUS, function () { + self.fireEvent(BI.MultiSelectTrigger.EVENT_FOCUS); + }); this.numberCounter = BI.createWidget(o.switcher, { type: "bi.multi_select_check_selected_switcher", valueFormatter: o.valueFormatter, @@ -168,5 +174,7 @@ BI.MultiSelectTrigger.EVENT_STOP = "EVENT_STOP"; BI.MultiSelectTrigger.EVENT_PAUSE = "EVENT_PAUSE"; BI.MultiSelectTrigger.EVENT_SEARCHING = "EVENT_SEARCHING"; BI.MultiSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW = "EVENT_BEFORE_COUNTER_POPUPVIEW"; +BI.MultiSelectTrigger.EVENT_BLUR = "EVENT_BLUR"; +BI.MultiSelectTrigger.EVENT_FOCUS = "EVENT_FOCUS"; BI.shortcut("bi.multi_select_trigger", BI.MultiSelectTrigger); \ No newline at end of file diff --git a/src/widget/multiselect/trigger/editor.multiselect.js b/src/widget/multiselect/trigger/editor.multiselect.js index 2525c2fc57..8ba3ba26a2 100644 --- a/src/widget/multiselect/trigger/editor.multiselect.js +++ b/src/widget/multiselect/trigger/editor.multiselect.js @@ -35,8 +35,11 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, { this.editor.on(BI.StateEditor.EVENT_PAUSE, function () { self.fireEvent(BI.MultiSelectEditor.EVENT_PAUSE); }); - this.editor.on(BI.StateEditor.EVENT_CLICK_LABEL, function () { - + this.editor.on(BI.StateEditor.EVENT_FOCUS, function () { + self.fireEvent(BI.MultiSelectEditor.EVENT_FOCUS); + }); + this.editor.on(BI.StateEditor.EVENT_BLUR, function () { + self.fireEvent(BI.MultiSelectEditor.EVENT_BLUR); }); }, @@ -82,5 +85,8 @@ BI.MultiSelectEditor = BI.inherit(BI.Widget, { } }); + +BI.MultiSelectEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.MultiSelectEditor.EVENT_BLUR = "EVENT_BLUR"; BI.MultiSelectEditor.EVENT_PAUSE = "EVENT_PAUSE"; BI.shortcut("bi.multi_select_editor", BI.MultiSelectEditor); diff --git a/src/widget/multiselect/trigger/searcher.multiselect.insert.js b/src/widget/multiselect/trigger/searcher.multiselect.insert.js index 01b3ff47d8..4c5a67a11c 100644 --- a/src/widget/multiselect/trigger/searcher.multiselect.insert.js +++ b/src/widget/multiselect/trigger/searcher.multiselect.insert.js @@ -25,7 +25,18 @@ BI.MultiSelectInsertSearcher = BI.inherit(BI.Widget, { this.editor = BI.createWidget(o.el, { type: "bi.multi_select_editor", height: o.height, - text: o.text + text: o.text, + listeners: [{ + eventName: BI.MultiSelectEditor.EVENT_FOCUS, + action: function () { + self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_FOCUS); + } + }, { + eventName: BI.MultiSelectEditor.EVENT_BLUR, + action: function () { + self.fireEvent(BI.MultiSelectInsertSearcher.EVENT_BLUR); + } + }] }); this.searcher = BI.createWidget({ @@ -179,4 +190,6 @@ BI.MultiSelectInsertSearcher.EVENT_STOP = "EVENT_STOP"; BI.MultiSelectInsertSearcher.EVENT_PAUSE = "EVENT_PAUSE"; BI.MultiSelectInsertSearcher.EVENT_SEARCHING = "EVENT_SEARCHING"; BI.MultiSelectInsertSearcher.EVENT_ADD_ITEM = "EVENT_ADD_ITEM"; +BI.MultiSelectInsertSearcher.EVENT_FOCUS = "EVENT_FOCUS"; +BI.MultiSelectInsertSearcher.EVENT_BLUR = "EVENT_BLUR"; BI.shortcut("bi.multi_select_insert_searcher", BI.MultiSelectInsertSearcher); \ No newline at end of file diff --git a/src/widget/multiselect/trigger/searcher.multiselect.js b/src/widget/multiselect/trigger/searcher.multiselect.js index 85a7c061c3..e9d484b420 100644 --- a/src/widget/multiselect/trigger/searcher.multiselect.js +++ b/src/widget/multiselect/trigger/searcher.multiselect.js @@ -25,7 +25,18 @@ BI.MultiSelectSearcher = BI.inherit(BI.Widget, { this.editor = BI.createWidget(o.el, { type: "bi.multi_select_editor", height: o.height, - text: o.text + text: o.text, + listeners: [{ + eventName: BI.MultiSelectEditor.EVENT_FOCUS, + action: function () { + self.fireEvent(BI.MultiSelectSearcher.EVENT_FOCUS); + } + }, { + eventName: BI.MultiSelectEditor.EVENT_BLUR, + action: function () { + self.fireEvent(BI.MultiSelectSearcher.EVENT_BLUR); + } + }] }); this.searcher = BI.createWidget({ @@ -172,4 +183,6 @@ BI.MultiSelectSearcher.EVENT_START = "EVENT_START"; BI.MultiSelectSearcher.EVENT_STOP = "EVENT_STOP"; BI.MultiSelectSearcher.EVENT_PAUSE = "EVENT_PAUSE"; BI.MultiSelectSearcher.EVENT_SEARCHING = "EVENT_SEARCHING"; +BI.MultiSelectSearcher.EVENT_FOCUS = "EVENT_FOCUS"; +BI.MultiSelectSearcher.EVENT_BLUR = "EVENT_BLUR"; BI.shortcut("bi.multi_select_searcher", BI.MultiSelectSearcher); \ No newline at end of file diff --git a/src/widget/multitree/multi.tree.combo.js b/src/widget/multitree/multi.tree.combo.js index b8c19cabb6..228798aaf2 100644 --- a/src/widget/multitree/multi.tree.combo.js +++ b/src/widget/multitree/multi.tree.combo.js @@ -90,6 +90,7 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, { }; self.trigger.getSearcher().setState(val); self.trigger.getCounter().setButtonChecked(val); + self.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM); } }, { eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM, @@ -129,6 +130,13 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, { return self.combo.isViewVisible(); }; + this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS, function () { + self.fireEvent(BI.MultiTreeCombo.EVENT_FOCUS); + }); + this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR, function () { + self.fireEvent(BI.MultiTreeCombo.EVENT_BLUR); + }); + this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () { self.storeValue = {value: self.combo.getValue()}; this.setValue(self.storeValue); @@ -141,6 +149,11 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, { self.combo.populate(); } }); + self.fireEvent(BI.MultiTreeCombo.EVENT_STOP); + }); + + this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function () { + self.fireEvent(BI.MultiTreeCombo.EVENT_SEARCHING); }); function showCounter () { @@ -178,6 +191,7 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, { }; this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None); this.getCounter().setButtonChecked(val); + self.fireEvent(BI.MultiTreeCombo.EVENT_CLICK_ITEM); }); this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { @@ -263,6 +277,11 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, { } }); +BI.MultiTreeCombo.EVENT_FOCUS = "EVENT_FOCUS"; +BI.MultiTreeCombo.EVENT_BLUR = "EVENT_BLUR"; +BI.MultiTreeCombo.EVENT_STOP = "EVENT_STOP"; +BI.MultiTreeCombo.EVENT_SEARCHING = "EVENT_SEARCHING"; +BI.MultiTreeCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM"; BI.MultiTreeCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.shortcut("bi.multi_tree_combo", BI.MultiTreeCombo); \ No newline at end of file diff --git a/src/widget/multitree/multi.tree.insert.combo.js b/src/widget/multitree/multi.tree.insert.combo.js index d858aaa7bd..20098684c2 100644 --- a/src/widget/multitree/multi.tree.insert.combo.js +++ b/src/widget/multitree/multi.tree.insert.combo.js @@ -106,6 +106,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, { }; self.trigger.getSearcher().setState(val); self.trigger.getCounter().setButtonChecked(val); + self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM); } }, { eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM, @@ -145,6 +146,13 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, { return self.combo.isViewVisible(); }; + this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS, function () { + self.fireEvent(BI.MultiTreeInsertCombo.EVENT_FOCUS); + }); + this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR, function () { + self.fireEvent(BI.MultiTreeInsertCombo.EVENT_BLUR); + }); + this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () { self.storeValue = {value: self.combo.getValue()}; this.setValue(self.storeValue); @@ -157,6 +165,11 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, { self.combo.populate(); } }); + self.fireEvent(BI.MultiTreeInsertCombo.EVENT_STOP); + }); + + this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function () { + self.fireEvent(BI.MultiTreeInsertCombo.EVENT_SEARCHING); }); function showCounter () { @@ -194,6 +207,7 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, { }; this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None); this.getCounter().setButtonChecked(val); + self.fireEvent(BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM); }); this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { @@ -284,6 +298,11 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, { } }); +BI.MultiTreeInsertCombo.EVENT_FOCUS = "EVENT_FOCUS"; +BI.MultiTreeInsertCombo.EVENT_BLUR = "EVENT_BLUR"; +BI.MultiTreeInsertCombo.EVENT_STOP = "EVENT_STOP"; +BI.MultiTreeInsertCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM"; +BI.MultiTreeInsertCombo.EVENT_SEARCHING = "EVENT_SEARCHING"; BI.MultiTreeInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.shortcut("bi.multi_tree_insert_combo", BI.MultiTreeInsertCombo); \ No newline at end of file diff --git a/src/widget/multitree/multi.tree.list.combo.js b/src/widget/multitree/multi.tree.list.combo.js index 667c91c7bc..25da4d0c81 100644 --- a/src/widget/multitree/multi.tree.list.combo.js +++ b/src/widget/multitree/multi.tree.list.combo.js @@ -115,6 +115,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, { }; self.trigger.getSearcher().setState(val); self.trigger.getCounter().setButtonChecked(val); + self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM); } }, { eventName: BI.MultiTreePopup.EVENT_CLICK_CONFIRM, @@ -154,6 +155,13 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, { return self.combo.isViewVisible(); }; + this.trigger.on(BI.MultiSelectTrigger.EVENT_FOCUS, function () { + self.fireEvent(BI.MultiTreeListCombo.EVENT_FOCUS); + }); + this.trigger.on(BI.MultiSelectTrigger.EVENT_BLUR, function () { + self.fireEvent(BI.MultiTreeListCombo.EVENT_BLUR); + }); + this.trigger.on(BI.MultiSelectTrigger.EVENT_START, function () { self.storeValue = {value: self.combo.getValue()}; this.setValue(self.storeValue); @@ -166,6 +174,11 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, { self.combo.populate(); } }); + self.fireEvent(BI.MultiTreeListCombo.EVENT_STOP); + }); + + this.trigger.on(BI.MultiSelectTrigger.EVENT_SEARCHING, function () { + self.fireEvent(BI.MultiTreeListCombo.EVENT_SEARCHING); }); function showCounter () { @@ -203,6 +216,7 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, { }; this.getSearcher().setState(checked ? BI.Selection.Multi : BI.Selection.None); this.getCounter().setButtonChecked(val); + self.fireEvent(BI.MultiTreeListCombo.EVENT_CLICK_ITEM); }); this.combo.on(BI.Combo.EVENT_BEFORE_POPUPVIEW, function () { @@ -293,6 +307,11 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, { } }); +BI.MultiTreeListCombo.EVENT_FOCUS = "EVENT_FOCUS"; +BI.MultiTreeListCombo.EVENT_BLUR = "EVENT_BLUR"; +BI.MultiTreeListCombo.EVENT_STOP = "EVENT_STOP"; +BI.MultiTreeListCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM"; +BI.MultiTreeListCombo.EVENT_SEARCHING = "EVENT_SEARCHING"; BI.MultiTreeListCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.shortcut("bi.multi_tree_list_combo", BI.MultiTreeListCombo); \ No newline at end of file diff --git a/src/widget/multitree/trigger/searcher.multi.tree.js b/src/widget/multitree/trigger/searcher.multi.tree.js index 2d05ae857a..ffc57300be 100644 --- a/src/widget/multitree/trigger/searcher.multi.tree.js +++ b/src/widget/multitree/trigger/searcher.multi.tree.js @@ -30,7 +30,18 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, { type: "bi.simple_state_editor", text: o.text, height: o.height - } + }, + listeners: [{ + eventName: BI.MultiSelectEditor.EVENT_FOCUS, + action: function () { + self.fireEvent(BI.MultiSelectSearcher.EVENT_FOCUS); + } + }, { + eventName: BI.MultiSelectEditor.EVENT_BLUR, + action: function () { + self.fireEvent(BI.MultiSelectSearcher.EVENT_BLUR); + } + }] }); this.searcher = BI.createWidget({ @@ -75,6 +86,10 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, { this.searcher.on(BI.Searcher.EVENT_CHANGE, function () { self.fireEvent(BI.MultiTreeSearcher.EVENT_CHANGE, arguments); }); + this.searcher.on(BI.Searcher.EVENT_SEARCHING, function () { + var keywords = this.getKeywords(); + self.fireEvent(BI.MultiTreeSearcher.EVENT_SEARCHING, keywords); + }); if (BI.isNotNull(o.value)) { this.setState(o.value); } @@ -167,6 +182,7 @@ BI.MultiTreeSearcher = BI.inherit(BI.Widget, { } }); +BI.MultiTreeSearcher.EVENT_SEARCHING = "EVENT_SEARCHING"; BI.MultiTreeSearcher.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; BI.MultiTreeSearcher.EVENT_CHANGE = "EVENT_CHANGE"; BI.MultiTreeSearcher.EVENT_START = "EVENT_START"; diff --git a/src/widget/singleselect/singleselect.combo.js b/src/widget/singleselect/singleselect.combo.js index 9382ff8aa2..b786eee8ca 100644 --- a/src/widget/singleselect/singleselect.combo.js +++ b/src/widget/singleselect/singleselect.combo.js @@ -51,12 +51,20 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, { value: this.storeValue }); + this.trigger.on(BI.SingleSelectTrigger.EVENT_FOCUS, function () { + self.fireEvent(BI.SingleSelectCombo.EVENT_FOCUS); + }); + this.trigger.on(BI.SingleSelectTrigger.EVENT_BLUR, function () { + self.fireEvent(BI.SingleSelectCombo.EVENT_BLUR); + }); + this.trigger.on(BI.SingleSelectTrigger.EVENT_START, function () { self._setStartValue(); this.getSearcher().setValue(self.storeValue); }); this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP, function () { self._setStartValue(); + self.fireEvent(BI.SingleSelectCombo.EVENT_STOP); }); this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE, function () { if (this.getSearcher().hasMatched()) { @@ -84,6 +92,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, { } }); } + self.fireEvent(BI.SingleSelectCombo.EVENT_SEARCHING); }); this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE, function (value, obj) { @@ -118,6 +127,7 @@ BI.SingleSelectCombo = BI.inherit(BI.Single, { assertShowValue(); self._defaultState(); }); + self.fireEvent(BI.SingleSelectCombo.EVENT_CLICK_ITEM); } }], itemsCreator: o.itemsCreator, @@ -270,6 +280,11 @@ BI.extend(BI.SingleSelectCombo, { REQ_GET_ALL_DATA: -1 }); +BI.SingleSelectCombo.EVENT_BLUR = "EVENT_BLUR"; +BI.SingleSelectCombo.EVENT_FOCUS = "EVENT_FOCUS"; +BI.SingleSelectCombo.EVENT_STOP = "EVENT_STOP"; +BI.SingleSelectCombo.EVENT_SEARCHING = "EVENT_SEARCHING"; +BI.SingleSelectCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM"; BI.SingleSelectCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.shortcut("bi.single_select_combo", BI.SingleSelectCombo); diff --git a/src/widget/singleselect/singleselect.insert.combo.js b/src/widget/singleselect/singleselect.insert.combo.js index dd1218a661..499f6e1174 100644 --- a/src/widget/singleselect/singleselect.insert.combo.js +++ b/src/widget/singleselect/singleselect.insert.combo.js @@ -66,12 +66,20 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, { } }); + this.trigger.on(BI.SingleSelectTrigger.EVENT_FOCUS, function () { + self.fireEvent(BI.SingleSelectInsertCombo.EVENT_FOCUS); + }); + this.trigger.on(BI.SingleSelectTrigger.EVENT_BLUR, function () { + self.fireEvent(BI.SingleSelectInsertCombo.EVENT_BLUR); + }); + this.trigger.on(BI.SingleSelectTrigger.EVENT_START, function () { self._setStartValue(); this.getSearcher().setValue(self.storeValue); }); this.trigger.on(BI.SingleSelectTrigger.EVENT_STOP, function () { self._setStartValue(); + self.fireEvent(BI.SingleSelectInsertCombo.EVENT_STOP); }); this.trigger.on(BI.SingleSelectTrigger.EVENT_PAUSE, function () { var keyword = this.getSearcher().getKeyword(); @@ -98,6 +106,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, { } }); } + self.fireEvent(BI.SingleSelectInsertCombo.EVENT_SEARCHING); }); this.trigger.on(BI.SingleSelectTrigger.EVENT_CHANGE, function (value, obj) { @@ -132,6 +141,7 @@ BI.SingleSelectInsertCombo = BI.inherit(BI.Single, { assertShowValue(); self._defaultState(); }); + self.fireEvent(BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM); } }], itemsCreator: o.itemsCreator, @@ -273,6 +283,11 @@ BI.extend(BI.SingleSelectInsertCombo, { REQ_GET_ALL_DATA: -1 }); +BI.SingleSelectInsertCombo.EVENT_FOCUS = "EVENT_FOCUS"; +BI.SingleSelectInsertCombo.EVENT_BLUR = "EVENT_BLUR"; +BI.SingleSelectInsertCombo.EVENT_STOP = "EVENT_STOP"; +BI.SingleSelectInsertCombo.EVENT_SEARCHING = "EVENT_SEARCHING"; +BI.SingleSelectInsertCombo.EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM"; BI.SingleSelectInsertCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.shortcut("bi.single_select_insert_combo", BI.SingleSelectInsertCombo); \ No newline at end of file diff --git a/src/widget/singleselect/singleselect.trigger.js b/src/widget/singleselect/singleselect.trigger.js index 06cf1a0548..81320ef860 100644 --- a/src/widget/singleselect/singleselect.trigger.js +++ b/src/widget/singleselect/singleselect.trigger.js @@ -63,6 +63,12 @@ BI.SingleSelectTrigger = BI.inherit(BI.Trigger, { this.searcher.on(BI.SingleSelectSearcher.EVENT_CHANGE, function () { self.fireEvent(BI.SingleSelectTrigger.EVENT_CHANGE, arguments); }); + this.searcher.on(BI.SingleSelectSearcher.EVENT_FOCUS, function () { + self.fireEvent(BI.SingleSelectTrigger.EVENT_FOCUS); + }); + this.searcher.on(BI.SingleSelectSearcher.EVENT_BLUR, function () { + self.fireEvent(BI.SingleSelectTrigger.EVENT_BLUR, arguments); + }); var wrapper = BI.createWidget({ type: "bi.htape", @@ -125,5 +131,7 @@ BI.SingleSelectTrigger.EVENT_STOP = "EVENT_STOP"; BI.SingleSelectTrigger.EVENT_PAUSE = "EVENT_PAUSE"; BI.SingleSelectTrigger.EVENT_SEARCHING = "EVENT_SEARCHING"; BI.SingleSelectTrigger.EVENT_BEFORE_COUNTER_POPUPVIEW = "EVENT_BEFORE_COUNTER_POPUPVIEW"; +BI.SingleSelectTrigger.EVENT_FOCUS = "EVENT_FOCUS"; +BI.SingleSelectTrigger.EVENT_BLUR = "EVENT_BLUR"; BI.shortcut("bi.single_select_trigger", BI.SingleSelectTrigger); \ No newline at end of file diff --git a/src/widget/singleselect/trigger/editor.singleselect.js b/src/widget/singleselect/trigger/editor.singleselect.js index 97f196e3ce..245565137d 100644 --- a/src/widget/singleselect/trigger/editor.singleselect.js +++ b/src/widget/singleselect/trigger/editor.singleselect.js @@ -33,8 +33,11 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, { this.editor.on(BI.StateEditor.EVENT_PAUSE, function () { self.fireEvent(BI.SingleSelectEditor.EVENT_PAUSE); }); - this.editor.on(BI.StateEditor.EVENT_CLICK_LABEL, function () { - + this.editor.on(BI.StateEditor.EVENT_FOCUS, function () { + self.fireEvent(BI.SingleSelectEditor.EVENT_FOCUS); + }); + this.editor.on(BI.StateEditor.EVENT_BLUR, function () { + self.fireEvent(BI.SingleSelectEditor.EVENT_BLUR); }); }, @@ -76,5 +79,8 @@ BI.SingleSelectEditor = BI.inherit(BI.Widget, { } }); + +BI.SingleSelectEditor.EVENT_FOCUS = "EVENT_FOCUS"; +BI.SingleSelectEditor.EVENT_BLUR = "EVENT_BLUR"; BI.SingleSelectEditor.EVENT_PAUSE = "EVENT_PAUSE"; BI.shortcut("bi.single_select_editor", BI.SingleSelectEditor); \ No newline at end of file diff --git a/src/widget/singleselect/trigger/searcher.singleselect.js b/src/widget/singleselect/trigger/searcher.singleselect.js index 0e53b09da6..f0851985af 100644 --- a/src/widget/singleselect/trigger/searcher.singleselect.js +++ b/src/widget/singleselect/trigger/searcher.singleselect.js @@ -25,7 +25,18 @@ BI.SingleSelectSearcher = BI.inherit(BI.Widget, { this.editor = BI.createWidget(o.el, { type: "bi.single_select_editor", height: o.height, - text: o.text + text: o.text, + listeners: [{ + eventName: BI.SingleSelectEditor.EVENT_FOCUS, + action: function () { + self.fireEvent(BI.SingleSelectSearcher.EVENT_FOCUS); + } + }, { + eventName: BI.SingleSelectEditor.EVENT_BLUR, + action: function () { + self.fireEvent(BI.SingleSelectSearcher.EVENT_BLUR); + } + }] }); this.searcher = BI.createWidget({ @@ -138,6 +149,8 @@ BI.SingleSelectSearcher = BI.inherit(BI.Widget, { } }); +BI.SingleSelectSearcher.EVENT_FOCUS = "EVENT_FOCUS"; +BI.SingleSelectSearcher.EVENT_BLUR = "EVENT_BLUR"; BI.SingleSelectSearcher.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; BI.SingleSelectSearcher.EVENT_CHANGE = "EVENT_CHANGE"; BI.SingleSelectSearcher.EVENT_START = "EVENT_START";