|
|
|
@ -27,55 +27,41 @@ BI.IconTextIconItem = BI.inherit(BI.BasicButton, {
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
render: function () { |
|
|
|
|
var o = this.options, c = this._const; |
|
|
|
|
this.text = BI.createWidget({ |
|
|
|
|
type: "bi.label", |
|
|
|
|
textAlign: "left", |
|
|
|
|
hgap: o.textHgap, |
|
|
|
|
vgap: o.textVgap, |
|
|
|
|
lgap: o.textLgap, |
|
|
|
|
rgap: o.textRgap, |
|
|
|
|
text: o.text, |
|
|
|
|
value: o.value, |
|
|
|
|
keyword: o.keyword, |
|
|
|
|
height: o.height |
|
|
|
|
}); |
|
|
|
|
var self = this, o = this.options; |
|
|
|
|
|
|
|
|
|
var icon1 = BI.createWidget({ |
|
|
|
|
type: "bi.icon_label", |
|
|
|
|
cls: o.iconCls1, |
|
|
|
|
width: o.leftIconWrapperWidth || o.height, |
|
|
|
|
height: o.height, |
|
|
|
|
iconWidth: o.iconWidth, |
|
|
|
|
iconHeight: o.iconHeight |
|
|
|
|
}); |
|
|
|
|
var blank = BI.createWidget({ |
|
|
|
|
type: "bi.layout", |
|
|
|
|
width: o.height |
|
|
|
|
}); |
|
|
|
|
BI.createWidget({ |
|
|
|
|
type: "bi.absolute", |
|
|
|
|
element: this, |
|
|
|
|
return { |
|
|
|
|
type: "bi.vertical_adapt", |
|
|
|
|
columnSize: [o.leftIconWrapperWidth || o.height, "fill", o.rightIconWrapperWidth || o.height], |
|
|
|
|
items: [{ |
|
|
|
|
el: { |
|
|
|
|
type: "bi.icon_label", |
|
|
|
|
cls: o.iconCls2, |
|
|
|
|
width: o.rightIconWrapperWidth || o.height, |
|
|
|
|
height: o.height, |
|
|
|
|
iconWidth: o.iconWidth, |
|
|
|
|
iconHeight: o.iconHeight |
|
|
|
|
type: "bi.icon_label", |
|
|
|
|
cls: o.iconCls1, |
|
|
|
|
width: o.leftIconWrapperWidth || o.height, |
|
|
|
|
height: o.height, |
|
|
|
|
iconWidth: o.iconWidth, |
|
|
|
|
iconHeight: o.iconHeight |
|
|
|
|
}, { |
|
|
|
|
type: "bi.label", |
|
|
|
|
ref: function (_ref) { |
|
|
|
|
self.text = _ref; |
|
|
|
|
}, |
|
|
|
|
top: 0, |
|
|
|
|
bottom: 0, |
|
|
|
|
right: 0 |
|
|
|
|
textAlign: "left", |
|
|
|
|
hgap: o.textHgap, |
|
|
|
|
vgap: o.textVgap, |
|
|
|
|
lgap: o.textLgap, |
|
|
|
|
rgap: o.textRgap, |
|
|
|
|
text: o.text, |
|
|
|
|
value: o.value, |
|
|
|
|
keyword: o.keyword, |
|
|
|
|
height: o.height |
|
|
|
|
}, { |
|
|
|
|
type: "bi.icon_label", |
|
|
|
|
cls: o.iconCls2, |
|
|
|
|
width: o.rightIconWrapperWidth || o.height, |
|
|
|
|
height: o.height, |
|
|
|
|
iconWidth: o.iconWidth, |
|
|
|
|
iconHeight: o.iconHeight |
|
|
|
|
}] |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
BI.createWidget(BI.extend({ |
|
|
|
|
element: this |
|
|
|
|
}, BI.LogicFactory.createLogic("horizontal", BI.extend(o.logic, { |
|
|
|
|
items: BI.LogicFactory.createLogicItemsByDirection("left", icon1, this.text, blank) |
|
|
|
|
})))); |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
doClick: function () { |
|
|
|
|