|
|
|
@ -42,7 +42,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
|
|
|
|
|
BI.createWidget({ |
|
|
|
|
element: this, |
|
|
|
|
type: "bi.horizontal_fill", |
|
|
|
|
columnSize: [BI.isEmptyString(o.iconCls) ? 0 : (o.iconWrapperWidth || o.height), "fill", o.triggerWidth || o.height], |
|
|
|
|
columnSize: ["", "fill", ""], |
|
|
|
|
ref: function (_ref) { |
|
|
|
|
self.wrapper = _ref; |
|
|
|
|
}, |
|
|
|
@ -50,7 +50,9 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
|
|
|
|
|
el: { |
|
|
|
|
type: "bi.icon_change_button", |
|
|
|
|
cls: "icon-combo-trigger-icon", |
|
|
|
|
width: o.triggerWidth || o.height, |
|
|
|
|
iconCls: o.iconCls, |
|
|
|
|
invisible: !o.iconCls, |
|
|
|
|
ref: function (_ref) { |
|
|
|
|
self.icon = _ref; |
|
|
|
|
}, |
|
|
|
@ -74,21 +76,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
|
|
|
|
|
setIcon: function (iconCls) { |
|
|
|
|
var o = this.options; |
|
|
|
|
this.icon.setIcon(iconCls); |
|
|
|
|
var iconItem = this.wrapper.attr("items")[0]; |
|
|
|
|
var textItem = this.wrapper.attr("items")[1]; |
|
|
|
|
if (BI.isNull(iconCls) || BI.isEmptyString(iconCls)) { |
|
|
|
|
if (iconItem.width !== 0) { |
|
|
|
|
iconItem.width = 0; |
|
|
|
|
textItem.lgap = 5; |
|
|
|
|
this.wrapper.resize(); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
if (iconItem.width !== (o.iconWrapperWidth || o.height)) { |
|
|
|
|
iconItem.width = (o.iconWrapperWidth || o.height); |
|
|
|
|
textItem.lgap = 0; |
|
|
|
|
this.wrapper.resize(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
this.icon.setVisible(!!iconCls); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
setTextCls: function (cls) { |
|
|
|
|