|
|
|
@ -29052,7 +29052,9 @@ BI.Combo = BI.inherit(BI.Widget, {
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// BI-10290 公式combo双击公式内容会收起
|
|
|
|
|
if (this.element.find(e.target).length > 0 || e.target.className === "CodeMirror-cursor" || $(e.target).closest(".CodeMirror-hints").length > 0) {// BI-9887 CodeMirror的公式弹框需要特殊处理下
|
|
|
|
|
if (this.element.find(e.target).length > 0 |
|
|
|
|
|| (this.popupView && this.popupView.element.find(e.target).length > 0) |
|
|
|
|
|| e.target.className === "CodeMirror-cursor" || $(e.target).closest(".CodeMirror-hints").length > 0) {// BI-9887 CodeMirror的公式弹框需要特殊处理下
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
var isHide = this.options.hideChecker.apply(this, [e]); |
|
|
|
@ -67494,7 +67496,6 @@ BI.IconCombo = BI.inherit(BI.Widget, {
|
|
|
|
|
baseCls: "bi-icon-combo", |
|
|
|
|
width: 24, |
|
|
|
|
height: 24, |
|
|
|
|
iconCls: "", |
|
|
|
|
el: {}, |
|
|
|
|
popup: {}, |
|
|
|
|
minWidth: 100, |
|
|
|
@ -67520,12 +67521,14 @@ BI.IconCombo = BI.inherit(BI.Widget, {
|
|
|
|
|
width: o.width, |
|
|
|
|
height: o.height, |
|
|
|
|
iconWidth: o.iconWidth, |
|
|
|
|
iconHeight: o.iconHeight |
|
|
|
|
iconHeight: o.iconHeight, |
|
|
|
|
value: o.value |
|
|
|
|
}); |
|
|
|
|
this.popup = BI.createWidget(o.popup, { |
|
|
|
|
type: "bi.icon_combo_popup", |
|
|
|
|
chooseType: o.chooseType, |
|
|
|
|
items: o.items |
|
|
|
|
items: o.items, |
|
|
|
|
value: o.value |
|
|
|
|
}); |
|
|
|
|
this.popup.on(BI.IconComboPopup.EVENT_CHANGE, function () { |
|
|
|
|
self.setValue(self.popup.getValue()); |
|
|
|
@ -67603,7 +67606,8 @@ BI.IconComboPopup = BI.inherit(BI.Pane, {
|
|
|
|
|
chooseType: o.chooseType, |
|
|
|
|
layouts: [{ |
|
|
|
|
type: "bi.vertical" |
|
|
|
|
}] |
|
|
|
|
}], |
|
|
|
|
value: o.value |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
this.popup.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) { |
|
|
|
@ -67654,28 +67658,35 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, {
|
|
|
|
|
iconCls: "", |
|
|
|
|
width: 25, |
|
|
|
|
height: 25, |
|
|
|
|
isShowDown: true |
|
|
|
|
isShowDown: true, |
|
|
|
|
value: "" |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_init: function () { |
|
|
|
|
BI.IconComboTrigger.superclass._init.apply(this, arguments); |
|
|
|
|
var o = this.options, self = this; |
|
|
|
|
var iconCls = ""; |
|
|
|
|
if(BI.isKey(o.value)){ |
|
|
|
|
iconCls = this._digest(o.value, o.items); |
|
|
|
|
} |
|
|
|
|
this.button = BI.createWidget(o.el, { |
|
|
|
|
type: "bi.icon_change_button", |
|
|
|
|
cls: "icon-combo-trigger-icon " + o.iconCls, |
|
|
|
|
cls: "icon-combo-trigger-icon " + iconCls, |
|
|
|
|
disableSelected: true, |
|
|
|
|
width: o.width, |
|
|
|
|
height: o.height, |
|
|
|
|
iconWidth: o.iconWidth, |
|
|
|
|
iconHeight: o.iconHeight |
|
|
|
|
iconHeight: o.iconHeight, |
|
|
|
|
selected: BI.isNotEmptyString(iconCls) |
|
|
|
|
}); |
|
|
|
|
this.down = BI.createWidget({ |
|
|
|
|
type: "bi.icon_button", |
|
|
|
|
disableSelected: true, |
|
|
|
|
cls: "icon-combo-down-icon trigger-triangle-font", |
|
|
|
|
width: 12, |
|
|
|
|
height: 8 |
|
|
|
|
height: 8, |
|
|
|
|
selected: BI.isNotEmptyString(iconCls) |
|
|
|
|
}); |
|
|
|
|
this.down.setVisible(o.isShowDown); |
|
|
|
|
BI.createWidget({ |
|
|
|
@ -67693,9 +67704,18 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, {
|
|
|
|
|
bottom: 0 |
|
|
|
|
}] |
|
|
|
|
}); |
|
|
|
|
if (BI.isKey(o.value)) { |
|
|
|
|
this.setValue(o.value); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_digest: function (v, items) { |
|
|
|
|
var iconCls = ""; |
|
|
|
|
v = BI.isArray(v) ? v[0] : v; |
|
|
|
|
BI.any(items, function (i, item) { |
|
|
|
|
if (v === item.value) { |
|
|
|
|
iconCls = item.iconCls; |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
return iconCls; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
populate: function (items) { |
|
|
|
@ -67709,14 +67729,9 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, {
|
|
|
|
|
setValue: function (v) { |
|
|
|
|
BI.IconComboTrigger.superclass.setValue.apply(this, arguments); |
|
|
|
|
var o = this.options; |
|
|
|
|
var iconCls = ""; |
|
|
|
|
var iconCls = this._digest(v, this.options.items); |
|
|
|
|
v = BI.isArray(v) ? v[0] : v; |
|
|
|
|
if (BI.any(this.options.items, function (i, item) { |
|
|
|
|
if (v === item.value) { |
|
|
|
|
iconCls = item.iconCls; |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
})) { |
|
|
|
|
if (BI.isNotEmptyString(iconCls)) { |
|
|
|
|
this.button.setIcon(iconCls); |
|
|
|
|
this.button.setSelected(true); |
|
|
|
|
this.down.setSelected(true); |
|
|
|
|