|
|
@ -65,13 +65,14 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
width: BI.isEmptyString(o.iconCls) ? 0 : (o.iconWrapperWidth || o.height) |
|
|
|
width: BI.isEmptyString(o.iconCls) ? 0 : (o.iconWrapperWidth || o.height) |
|
|
|
}, |
|
|
|
}, |
|
|
|
{ |
|
|
|
{ |
|
|
|
el: this.text, |
|
|
|
el: this.text, |
|
|
|
lgap: BI.isEmptyString(o.iconCls) ? 5 : 0 |
|
|
|
lgap: BI.isEmptyString(o.iconCls) ? 5 : 0, |
|
|
|
}, { |
|
|
|
width: "fill" |
|
|
|
el: this.trigerButton, |
|
|
|
}, { |
|
|
|
width: o.triggerWidth || o.height |
|
|
|
el: this.trigerButton, |
|
|
|
} |
|
|
|
width: o.triggerWidth || o.height |
|
|
|
|
|
|
|
} |
|
|
|
] |
|
|
|
] |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
@ -86,13 +87,13 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, { |
|
|
|
var iconItem = this.wrapper.attr("items")[0]; |
|
|
|
var iconItem = this.wrapper.attr("items")[0]; |
|
|
|
var textItem = this.wrapper.attr("items")[1]; |
|
|
|
var textItem = this.wrapper.attr("items")[1]; |
|
|
|
if (BI.isNull(iconCls) || BI.isEmptyString(iconCls)) { |
|
|
|
if (BI.isNull(iconCls) || BI.isEmptyString(iconCls)) { |
|
|
|
if(iconItem.width !== 0) { |
|
|
|
if (iconItem.width !== 0) { |
|
|
|
iconItem.width = 0; |
|
|
|
iconItem.width = 0; |
|
|
|
textItem.lgap = 5; |
|
|
|
textItem.lgap = 5; |
|
|
|
this.wrapper.resize(); |
|
|
|
this.wrapper.resize(); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
if(iconItem.width !== (o.iconWrapperWidth || o.height)) { |
|
|
|
if (iconItem.width !== (o.iconWrapperWidth || o.height)) { |
|
|
|
iconItem.width = (o.iconWrapperWidth || o.height); |
|
|
|
iconItem.width = (o.iconWrapperWidth || o.height); |
|
|
|
textItem.lgap = 0; |
|
|
|
textItem.lgap = 0; |
|
|
|
this.wrapper.resize(); |
|
|
|
this.wrapper.resize(); |
|
|
@ -100,7 +101,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, { |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
setTextCls: function(cls) { |
|
|
|
setTextCls: function (cls) { |
|
|
|
var o = this.options; |
|
|
|
var o = this.options; |
|
|
|
var oldCls = o.textCls; |
|
|
|
var oldCls = o.textCls; |
|
|
|
o.textCls = cls; |
|
|
|
o.textCls = cls; |
|
|
@ -111,4 +112,4 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, { |
|
|
|
this.text.setText(text); |
|
|
|
this.text.setText(text); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
BI.shortcut("bi.icon_text_trigger", BI.IconTextTrigger); |
|
|
|
BI.shortcut("bi.icon_text_trigger", BI.IconTextTrigger); |
|
|
|