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