diff --git a/src/case/trigger/trigger.text.js b/src/case/trigger/trigger.text.js index c1b4bdfeb4..8fc69d58c5 100644 --- a/src/case/trigger/trigger.text.js +++ b/src/case/trigger/trigger.text.js @@ -55,6 +55,10 @@ BI.TextTrigger = BI.inherit(BI.Trigger, { }); }, + getTextor: function() { + return this.text; + }, + setTextCls: function(cls) { var o = this.options; var oldCls = o.textCls; diff --git a/src/case/trigger/trigger.text.select.js b/src/case/trigger/trigger.text.select.js index ee7a2c078a..03481d1f28 100644 --- a/src/case/trigger/trigger.text.select.js +++ b/src/case/trigger/trigger.text.select.js @@ -64,6 +64,10 @@ BI.SelectTextTrigger = BI.inherit(BI.Trigger, { this.trigger.setTipType(v); }, + getTextor: function() { + return this.trigger.getTextor(); + }, + populate: function (items) { this.options.items = items; } diff --git a/src/component/treevaluechooser/combo.listtreevaluechooser.js b/src/component/treevaluechooser/combo.listtreevaluechooser.js index 51e9cd0475..97a682a87b 100644 --- a/src/component/treevaluechooser/combo.listtreevaluechooser.js +++ b/src/component/treevaluechooser/combo.listtreevaluechooser.js @@ -84,6 +84,10 @@ BI.ListTreeValueChooserInsertCombo = BI.inherit(BI.AbstractListTreeValueChooser, this.combo.hideView(); }, + getSearcher: function () { + return this.combo.getSearcher(); + }, + setValue: function (v) { this.combo.setValue(v); }, diff --git a/src/component/treevaluechooser/combo.treevaluechooser.insert.js b/src/component/treevaluechooser/combo.treevaluechooser.insert.js index 15ebd6ea0b..07c4ad9ecf 100644 --- a/src/component/treevaluechooser/combo.treevaluechooser.insert.js +++ b/src/component/treevaluechooser/combo.treevaluechooser.insert.js @@ -83,6 +83,10 @@ BI.TreeValueChooserInsertCombo = BI.inherit(BI.AbstractTreeValueChooser, { this.combo.hideView(); }, + getSearcher: function () { + return this.combo.getSearcher(); + }, + setValue: function (v) { this.combo.setValue(v); }, diff --git a/src/component/treevaluechooser/combo.treevaluechooser.js b/src/component/treevaluechooser/combo.treevaluechooser.js index 2b567b0876..452dce5bb7 100644 --- a/src/component/treevaluechooser/combo.treevaluechooser.js +++ b/src/component/treevaluechooser/combo.treevaluechooser.js @@ -83,6 +83,10 @@ BI.TreeValueChooserCombo = BI.inherit(BI.AbstractTreeValueChooser, { this.combo.hideView(); }, + getSearcher: function () { + return this.combo.getSearcher(); + }, + setValue: function (v) { this.combo.setValue(v); }, diff --git a/src/widget/multilayerselecttree/multilayerselecttree.combo.js b/src/widget/multilayerselecttree/multilayerselecttree.combo.js index e72d710093..1f7d0e526f 100644 --- a/src/widget/multilayerselecttree/multilayerselecttree.combo.js +++ b/src/widget/multilayerselecttree/multilayerselecttree.combo.js @@ -199,11 +199,14 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, { }, _getSyncConfig: function () { - var o = this.options; + var o = this.options, self = this; var baseConfig = this._getBaseConfig(); return BI.extend(baseConfig, o.allowEdit ? this._getSearchConfig() : { el: { type: "bi.single_tree_trigger", + ref: function(_ref) { + self.textTrigger = _ref; + }, text: o.text, height: o.height, items: o.items, @@ -226,6 +229,10 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, { return this.combo.getValue(); }, + getSearcher: function () { + return this.trigger ? this.trigger.getSearcher() : this.textTrigger.getTextor(); + }, + populate: function (items) { this.combo.populate(items); } diff --git a/src/widget/multilayersingletree/multilayersingletree.combo.js b/src/widget/multilayersingletree/multilayersingletree.combo.js index 702ffcccf4..1881af51f4 100644 --- a/src/widget/multilayersingletree/multilayersingletree.combo.js +++ b/src/widget/multilayersingletree/multilayersingletree.combo.js @@ -202,11 +202,14 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, { }, _getSyncConfig: function () { - var o = this.options; + var o = this.options, self = this; var baseConfig = this._getBaseConfig(); return BI.extend(baseConfig, o.allowEdit ? this._getSearchConfig() : { el: { type: "bi.single_tree_trigger", + ref: function(_ref) { + self.textTrigger = _ref; + }, text: o.text, height: o.height, items: o.items, @@ -220,6 +223,10 @@ BI.MultiLayerSingleTreeCombo = BI.inherit(BI.Widget, { return BI.extend(config, this._getSearchConfig()); }, + getSearcher: function () { + return this.trigger ? this.trigger.getSearcher() : this.textTrigger.getTextor(); + }, + setValue: function (v) { v = BI.isArray(v) ? v : [v]; this.combo.setValue(v); diff --git a/src/widget/multitree/multi.tree.combo.js b/src/widget/multitree/multi.tree.combo.js index a3e4ef69ee..32e26146da 100644 --- a/src/widget/multitree/multi.tree.combo.js +++ b/src/widget/multitree/multi.tree.combo.js @@ -334,6 +334,10 @@ BI.MultiTreeCombo = BI.inherit(BI.Single, { }); }, + getSearcher: function () { + return this.trigger.getSearcher(); + }, + getValue: function () { return BI.deepClone(this.storeValue.value); }, diff --git a/src/widget/multitree/multi.tree.insert.combo.js b/src/widget/multitree/multi.tree.insert.combo.js index 51456715a2..bdaa8a9642 100644 --- a/src/widget/multitree/multi.tree.insert.combo.js +++ b/src/widget/multitree/multi.tree.insert.combo.js @@ -331,6 +331,10 @@ BI.MultiTreeInsertCombo = BI.inherit(BI.Single, { this.combo.hideView(); }, + getSearcher: function () { + return this.trigger.getSearcher(); + }, + showView: function () { this.combo.showView(); }, diff --git a/src/widget/multitree/multi.tree.list.combo.js b/src/widget/multitree/multi.tree.list.combo.js index 2434c16ad5..4deeeba829 100644 --- a/src/widget/multitree/multi.tree.list.combo.js +++ b/src/widget/multitree/multi.tree.list.combo.js @@ -363,6 +363,10 @@ BI.MultiTreeListCombo = BI.inherit(BI.Single, { this.combo.hideView(); }, + getSearcher: function () { + return this.trigger.getSearcher(); + }, + setValue: function (v) { this.storeValue.value = v || []; this.combo.setValue({ diff --git a/src/widget/singletree/singletree.trigger.js b/src/widget/singletree/singletree.trigger.js index 4168365f59..91183c033a 100644 --- a/src/widget/singletree/singletree.trigger.js +++ b/src/widget/singletree/singletree.trigger.js @@ -51,6 +51,10 @@ BI.SingleTreeTrigger = BI.inherit(BI.Trigger, { return this.options.value || []; }, + getTextor: function() { + return this.trigger.getTextor(); + }, + populate: function (items) { this.trigger.populate(items); } diff --git a/typescript/component/treevaluechooser/combo.listtreevaluechooser.ts b/typescript/component/treevaluechooser/combo.listtreevaluechooser.ts index 9905e830d2..bc47f39f3b 100644 --- a/typescript/component/treevaluechooser/combo.listtreevaluechooser.ts +++ b/typescript/component/treevaluechooser/combo.listtreevaluechooser.ts @@ -1,3 +1,5 @@ + +import { Widget } from "../../core/widget"; import { AbstractListTreeValueChooser } from "./abstract.treevaluechooser.list"; export declare class ListTreeValueChooserInsertCombo extends AbstractListTreeValueChooser { @@ -19,4 +21,6 @@ export declare class ListTreeValueChooserInsertCombo extends AbstractListTreeVal getValue(): T; populate(items: T[]): void; + + getSearcher(): Widget; } diff --git a/typescript/component/treevaluechooser/combo.treevaluechooser.insert.ts b/typescript/component/treevaluechooser/combo.treevaluechooser.insert.ts index b93afde635..41b785b189 100644 --- a/typescript/component/treevaluechooser/combo.treevaluechooser.insert.ts +++ b/typescript/component/treevaluechooser/combo.treevaluechooser.insert.ts @@ -1,3 +1,4 @@ +import { Widget } from "../../core/widget"; import { AbstractTreeValueChooser } from "./abstract.treevaluechooser"; export declare class TreeValueChooserInsertCombo extends AbstractTreeValueChooser { @@ -19,4 +20,6 @@ export declare class TreeValueChooserInsertCombo extends AbstractTreeValueChoose getValue(): T; populate(items: T[]): void; + + getSearcher(): Widget; } diff --git a/typescript/component/treevaluechooser/combo.treevaluechooser.ts b/typescript/component/treevaluechooser/combo.treevaluechooser.ts index a0a87626df..be535af4a2 100644 --- a/typescript/component/treevaluechooser/combo.treevaluechooser.ts +++ b/typescript/component/treevaluechooser/combo.treevaluechooser.ts @@ -1,3 +1,4 @@ +import { Widget } from "../../core/widget"; import { AbstractTreeValueChooser } from "./abstract.treevaluechooser"; export declare class TreeValueChooserCombo extends AbstractTreeValueChooser { @@ -21,4 +22,6 @@ export declare class TreeValueChooserCombo extends AbstractTreeValueChooser { getAllValue(): T; populate(items: T[]): void; + + getSearcher(): Widget; } diff --git a/typescript/widget/multilayerselecttree/multilayerselecttree.combo.ts b/typescript/widget/multilayerselecttree/multilayerselecttree.combo.ts index 3dded7a471..489186e72e 100644 --- a/typescript/widget/multilayerselecttree/multilayerselecttree.combo.ts +++ b/typescript/widget/multilayerselecttree/multilayerselecttree.combo.ts @@ -13,4 +13,6 @@ export declare class MultiLayerSelectTreeCombo extends Widget { getValue(): string[]; populate(items: T[]): void; + + getSearcher(): Widget; } diff --git a/typescript/widget/multilayersingletree/multilayersingletree.combo.ts b/typescript/widget/multilayersingletree/multilayersingletree.combo.ts index 4442fb208c..19150a8f6c 100644 --- a/typescript/widget/multilayersingletree/multilayersingletree.combo.ts +++ b/typescript/widget/multilayersingletree/multilayersingletree.combo.ts @@ -12,5 +12,7 @@ export declare class MultiLayerSingleTreeCombo extends Widget { getValue(): string[]; - populate(items: T[]): void + populate(items: T[]): void; + + getSearcher(): Widget; } diff --git a/typescript/widget/multitree/multi.tree.combo.ts b/typescript/widget/multitree/multi.tree.combo.ts index 461d3d8226..d8b5464410 100644 --- a/typescript/widget/multitree/multi.tree.combo.ts +++ b/typescript/widget/multitree/multi.tree.combo.ts @@ -1,4 +1,5 @@ import { Single } from "../../base/single/single"; +import { Widget } from "../../core/widget"; export declare class MultiTreeCombo extends Single { static xtype: string; @@ -12,4 +13,6 @@ export declare class MultiTreeCombo extends Single { showView(): void; hideView(): void; + + getSearcher(): Widget; } diff --git a/typescript/widget/multitree/multi.tree.insert.combo.ts b/typescript/widget/multitree/multi.tree.insert.combo.ts index 005f05ae0d..b701f580bc 100644 --- a/typescript/widget/multitree/multi.tree.insert.combo.ts +++ b/typescript/widget/multitree/multi.tree.insert.combo.ts @@ -1,5 +1,6 @@ import { Single } from "../../base/single/single"; import { TreeValue } from "../../base/tree/ztree/treeview"; +import { Widget } from "../../core/widget"; export declare class MultiTreeInsertCombo extends Single { static xtype: string; @@ -20,4 +21,6 @@ export declare class MultiTreeInsertCombo extends Single { getValue(): TreeValue; populate(): void; + + getSearcher(): Widget; } diff --git a/typescript/widget/multitree/multi.tree.list.combo.ts b/typescript/widget/multitree/multi.tree.list.combo.ts index 97d3020ab3..375d1f5e14 100644 --- a/typescript/widget/multitree/multi.tree.list.combo.ts +++ b/typescript/widget/multitree/multi.tree.list.combo.ts @@ -1,4 +1,5 @@ import { Single } from "../../base/single/single"; +import { Widget } from "../../core/widget"; export declare class MultiTreeListCombo extends Single { static xtype: string; @@ -19,4 +20,6 @@ export declare class MultiTreeListCombo extends Single { getValue(): string[]; populate(): void; + + getSearcher(): Widget; }