|
|
@ -29052,7 +29052,9 @@ BI.Combo = BI.inherit(BI.Widget, { |
|
|
|
// return;
|
|
|
|
// return;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// BI-10290 公式combo双击公式内容会收起
|
|
|
|
// 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; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
var isHide = this.options.hideChecker.apply(this, [e]); |
|
|
|
var isHide = this.options.hideChecker.apply(this, [e]); |
|
|
@ -67502,7 +67504,6 @@ BI.IconCombo = BI.inherit(BI.Widget, { |
|
|
|
baseCls: "bi-icon-combo", |
|
|
|
baseCls: "bi-icon-combo", |
|
|
|
width: 24, |
|
|
|
width: 24, |
|
|
|
height: 24, |
|
|
|
height: 24, |
|
|
|
iconCls: "", |
|
|
|
|
|
|
|
el: {}, |
|
|
|
el: {}, |
|
|
|
popup: {}, |
|
|
|
popup: {}, |
|
|
|
minWidth: 100, |
|
|
|
minWidth: 100, |
|
|
@ -67528,12 +67529,14 @@ BI.IconCombo = BI.inherit(BI.Widget, { |
|
|
|
width: o.width, |
|
|
|
width: o.width, |
|
|
|
height: o.height, |
|
|
|
height: o.height, |
|
|
|
iconWidth: o.iconWidth, |
|
|
|
iconWidth: o.iconWidth, |
|
|
|
iconHeight: o.iconHeight |
|
|
|
iconHeight: o.iconHeight, |
|
|
|
|
|
|
|
value: o.value |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.popup = BI.createWidget(o.popup, { |
|
|
|
this.popup = BI.createWidget(o.popup, { |
|
|
|
type: "bi.icon_combo_popup", |
|
|
|
type: "bi.icon_combo_popup", |
|
|
|
chooseType: o.chooseType, |
|
|
|
chooseType: o.chooseType, |
|
|
|
items: o.items |
|
|
|
items: o.items, |
|
|
|
|
|
|
|
value: o.value |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.popup.on(BI.IconComboPopup.EVENT_CHANGE, function () { |
|
|
|
this.popup.on(BI.IconComboPopup.EVENT_CHANGE, function () { |
|
|
|
self.setValue(self.popup.getValue()); |
|
|
|
self.setValue(self.popup.getValue()); |
|
|
@ -67611,7 +67614,8 @@ BI.IconComboPopup = BI.inherit(BI.Pane, { |
|
|
|
chooseType: o.chooseType, |
|
|
|
chooseType: o.chooseType, |
|
|
|
layouts: [{ |
|
|
|
layouts: [{ |
|
|
|
type: "bi.vertical" |
|
|
|
type: "bi.vertical" |
|
|
|
}] |
|
|
|
}], |
|
|
|
|
|
|
|
value: o.value |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
this.popup.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) { |
|
|
|
this.popup.on(BI.Controller.EVENT_CHANGE, function (type, val, obj) { |
|
|
@ -67662,28 +67666,35 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, { |
|
|
|
iconCls: "", |
|
|
|
iconCls: "", |
|
|
|
width: 25, |
|
|
|
width: 25, |
|
|
|
height: 25, |
|
|
|
height: 25, |
|
|
|
isShowDown: true |
|
|
|
isShowDown: true, |
|
|
|
|
|
|
|
value: "" |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
_init: function () { |
|
|
|
_init: function () { |
|
|
|
BI.IconComboTrigger.superclass._init.apply(this, arguments); |
|
|
|
BI.IconComboTrigger.superclass._init.apply(this, arguments); |
|
|
|
var o = this.options, self = this; |
|
|
|
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, { |
|
|
|
this.button = BI.createWidget(o.el, { |
|
|
|
type: "bi.icon_change_button", |
|
|
|
type: "bi.icon_change_button", |
|
|
|
cls: "icon-combo-trigger-icon " + o.iconCls, |
|
|
|
cls: "icon-combo-trigger-icon " + iconCls, |
|
|
|
disableSelected: true, |
|
|
|
disableSelected: true, |
|
|
|
width: o.width, |
|
|
|
width: o.width, |
|
|
|
height: o.height, |
|
|
|
height: o.height, |
|
|
|
iconWidth: o.iconWidth, |
|
|
|
iconWidth: o.iconWidth, |
|
|
|
iconHeight: o.iconHeight |
|
|
|
iconHeight: o.iconHeight, |
|
|
|
|
|
|
|
selected: BI.isNotEmptyString(iconCls) |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.down = BI.createWidget({ |
|
|
|
this.down = BI.createWidget({ |
|
|
|
type: "bi.icon_button", |
|
|
|
type: "bi.icon_button", |
|
|
|
disableSelected: true, |
|
|
|
disableSelected: true, |
|
|
|
cls: "icon-combo-down-icon trigger-triangle-font", |
|
|
|
cls: "icon-combo-down-icon trigger-triangle-font", |
|
|
|
width: 12, |
|
|
|
width: 12, |
|
|
|
height: 8 |
|
|
|
height: 8, |
|
|
|
|
|
|
|
selected: BI.isNotEmptyString(iconCls) |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.down.setVisible(o.isShowDown); |
|
|
|
this.down.setVisible(o.isShowDown); |
|
|
|
BI.createWidget({ |
|
|
|
BI.createWidget({ |
|
|
@ -67701,9 +67712,18 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, { |
|
|
|
bottom: 0 |
|
|
|
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) { |
|
|
|
populate: function (items) { |
|
|
@ -67717,14 +67737,9 @@ BI.IconComboTrigger = BI.inherit(BI.Trigger, { |
|
|
|
setValue: function (v) { |
|
|
|
setValue: function (v) { |
|
|
|
BI.IconComboTrigger.superclass.setValue.apply(this, arguments); |
|
|
|
BI.IconComboTrigger.superclass.setValue.apply(this, arguments); |
|
|
|
var o = this.options; |
|
|
|
var o = this.options; |
|
|
|
var iconCls = ""; |
|
|
|
var iconCls = this._digest(v, this.options.items); |
|
|
|
v = BI.isArray(v) ? v[0] : v; |
|
|
|
v = BI.isArray(v) ? v[0] : v; |
|
|
|
if (BI.any(this.options.items, function (i, item) { |
|
|
|
if (BI.isNotEmptyString(iconCls)) { |
|
|
|
if (v === item.value) { |
|
|
|
|
|
|
|
iconCls = item.iconCls; |
|
|
|
|
|
|
|
return true; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
})) { |
|
|
|
|
|
|
|
this.button.setIcon(iconCls); |
|
|
|
this.button.setIcon(iconCls); |
|
|
|
this.button.setSelected(true); |
|
|
|
this.button.setSelected(true); |
|
|
|
this.down.setSelected(true); |
|
|
|
this.down.setSelected(true); |
|
|
|