|
|
|
@ -16,59 +16,21 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
|
|
|
|
|
allowEdit: false, |
|
|
|
|
allowSearchValue: false, |
|
|
|
|
allowInsertValue: false, |
|
|
|
|
isNeedAdjustWidth: true |
|
|
|
|
isNeedAdjustWidth: true, |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_init: function () { |
|
|
|
|
var o = this.options; |
|
|
|
|
if (this._shouldWrapper()) { |
|
|
|
|
o.height -= 2; |
|
|
|
|
BI.isNumeric(o.width) && (o.width -= 2); |
|
|
|
|
} |
|
|
|
|
BI.isNumeric(o.height) && (o.height -= 2); |
|
|
|
|
BI.MultiLayerSelectTreeCombo.superclass._init.apply(this, arguments); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
render: function () { |
|
|
|
|
var self = this, o = this.options; |
|
|
|
|
|
|
|
|
|
var combo = (o.itemsCreator === BI.emptyFn) ? this._getSyncConfig() : this._getAsyncConfig(); |
|
|
|
|
|
|
|
|
|
return this._shouldWrapper() ? combo : { |
|
|
|
|
type: "bi.absolute", |
|
|
|
|
items: [{ |
|
|
|
|
el: combo, |
|
|
|
|
left: 0, |
|
|
|
|
right: 0, |
|
|
|
|
top: 0, |
|
|
|
|
bottom: 0 |
|
|
|
|
}, { |
|
|
|
|
el: { |
|
|
|
|
type: "bi.trigger_icon_button", |
|
|
|
|
cls: "trigger-icon-button", |
|
|
|
|
ref: function (_ref) { |
|
|
|
|
self.triggerBtn = _ref; |
|
|
|
|
}, |
|
|
|
|
width: o.height, |
|
|
|
|
height: o.height, |
|
|
|
|
handler: function () { |
|
|
|
|
if (self.combo.isViewVisible()) { |
|
|
|
|
self.combo.hideView(); |
|
|
|
|
} else { |
|
|
|
|
self.combo.showView(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
right: 0, |
|
|
|
|
bottom: 0, |
|
|
|
|
top: 0 |
|
|
|
|
}] |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_shouldWrapper: function () { |
|
|
|
|
var o = this.options; |
|
|
|
|
return !o.allowEdit && o.itemsCreator === BI.emptyFn; |
|
|
|
|
return (o.itemsCreator === BI.emptyFn) ? this._getSyncConfig() : this._getAsyncConfig(); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_getBaseConfig: function () { |
|
|
|
@ -139,7 +101,8 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
|
|
|
|
|
itemsCreator: o.itemsCreator, |
|
|
|
|
valueFormatter: o.valueFormatter, |
|
|
|
|
watermark: o.watermark, |
|
|
|
|
height: o.height - (o.simple ? 1 : 2), |
|
|
|
|
// height: o.height - (o.simple ? 1 : 2),
|
|
|
|
|
height: o.height, |
|
|
|
|
text: o.text, |
|
|
|
|
value: o.value, |
|
|
|
|
tipType: o.tipType, |
|
|
|
@ -184,7 +147,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
|
|
|
|
|
// IE11下,popover(position: fixed)下放置下拉控件(position: fixed), 滚动的时候会异常卡顿
|
|
|
|
|
// 通过container参数将popup放置于popover之外解决此问题, 其他下拉控件由于元素少或者有分页,所以
|
|
|
|
|
// 卡顿不明显, 先在此做尝试, 并在FineUI特殊处理待解决文档中标记跟踪
|
|
|
|
|
return (o.container && self.trigger.getSearcher().isSearching() && self.trigger.getSearcher().getView().element.find(e.target).length > 0) ? false : self.triggerBtn.element.find(e.target).length === 0; |
|
|
|
|
return !(o.container && self.trigger.getSearcher().isSearching() && self.trigger.getSearcher().getView().element.find(e.target).length > 0); |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
listeners: [{ |
|
|
|
@ -198,7 +161,7 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
|
|
|
|
|
self.fireEvent(BI.MultiLayerSelectTreeCombo.EVENT_BEFORE_POPUPVIEW); |
|
|
|
|
} |
|
|
|
|
}] |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_getSyncConfig: function () { |
|
|
|
@ -213,7 +176,9 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
|
|
|
|
|
text: o.text, |
|
|
|
|
height: o.height, |
|
|
|
|
items: o.items, |
|
|
|
|
value: o.value |
|
|
|
|
value: o.value, |
|
|
|
|
tipType: o.tipType, |
|
|
|
|
warningTitle: o.warningTitle, |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
@ -236,6 +201,10 @@ BI.MultiLayerSelectTreeCombo = BI.inherit(BI.Widget, {
|
|
|
|
|
return this.trigger ? this.trigger.getSearcher() : this.textTrigger.getTextor(); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
clear: function () { |
|
|
|
|
// do some work
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
populate: function (items) { |
|
|
|
|
this.combo.populate(items); |
|
|
|
|
}, |
|
|
|
|