|
|
|
@ -27,6 +27,7 @@ export class MultiTreeCombo extends Single {
|
|
|
|
|
|
|
|
|
|
static EVENT_FOCUS = "EVENT_FOCUS"; |
|
|
|
|
static EVENT_BLUR = "EVENT_BLUR"; |
|
|
|
|
static EVENT_START = "EVENT_START"; |
|
|
|
|
static EVENT_STOP = "EVENT_STOP"; |
|
|
|
|
static EVENT_SEARCHING = "EVENT_SEARCHING"; |
|
|
|
|
static EVENT_CLICK_ITEM = "EVENT_CLICK_ITEM"; |
|
|
|
@ -43,6 +44,8 @@ export class MultiTreeCombo extends Single {
|
|
|
|
|
height: 24, |
|
|
|
|
allowEdit: true, |
|
|
|
|
isNeedAdjustWidth: true, |
|
|
|
|
popup: {}, |
|
|
|
|
masker: {}, |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -64,7 +67,9 @@ export class MultiTreeCombo extends Single {
|
|
|
|
|
this.storeValue = { value: o.value || {} }; |
|
|
|
|
|
|
|
|
|
this.trigger = createWidget({ |
|
|
|
|
type: "bi.multi_select_trigger", |
|
|
|
|
type: MultiSelectTrigger.xtype, |
|
|
|
|
popup: o.popup, |
|
|
|
|
masker: o.masker, |
|
|
|
|
allowEdit: o.allowEdit, |
|
|
|
|
height: toPix(o.height, o.simple ? 1 : 2), |
|
|
|
|
valueFormatter: o.valueFormatter, |
|
|
|
@ -75,7 +80,7 @@ export class MultiTreeCombo extends Single {
|
|
|
|
|
return this.popup.getView(); |
|
|
|
|
}, |
|
|
|
|
searcher: { |
|
|
|
|
type: "bi.multi_tree_searcher", |
|
|
|
|
type: MultiTreeSearcher.xtype, |
|
|
|
|
itemsCreator: o.itemsCreator, |
|
|
|
|
listeners: [ |
|
|
|
|
{ |
|
|
|
@ -161,7 +166,9 @@ export class MultiTreeCombo extends Single {
|
|
|
|
|
hideChecker(e) { |
|
|
|
|
return ( |
|
|
|
|
triggerBtn.element.find(e.target).length === 0 && |
|
|
|
|
size(self.numberCounter.getView()?.element.find(e.target)) === 0 |
|
|
|
|
size(self.numberCounter.getView()?.element.find(e.target)) === 0 && |
|
|
|
|
size(self.trigger.getSearcher().getSearcher().getView()?.element.find(e.target)) === 0 && |
|
|
|
|
self.trigger.getSearcher().getSearcher().getView()?.element[0] !== e.target |
|
|
|
|
); |
|
|
|
|
}, |
|
|
|
|
}); |
|
|
|
@ -188,6 +195,7 @@ export class MultiTreeCombo extends Single {
|
|
|
|
|
self.storeValue = { value: self.combo.getValue() }; |
|
|
|
|
this.setValue(self.storeValue); |
|
|
|
|
self.numberCounter.setValue(self.storeValue); |
|
|
|
|
self.fireEvent(MultiTreeCombo.EVENT_START); |
|
|
|
|
}); |
|
|
|
|
this.trigger.on(MultiSelectTrigger.EVENT_STOP, function () { |
|
|
|
|
self.storeValue = { value: this.getValue() }; |
|
|
|
@ -442,4 +450,8 @@ export class MultiTreeCombo extends Single {
|
|
|
|
|
getNumberCounter() { |
|
|
|
|
return this.numberCounter; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
getTrigger() { |
|
|
|
|
return this.trigger; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|