|
|
@ -25,9 +25,23 @@ BI.IconTextIconNode = BI.inherit(BI.NodeButton, { |
|
|
|
}, |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
render: function () { |
|
|
|
render: function () { |
|
|
|
var o = this.options, c = this._const; |
|
|
|
var self = this, o = this.options; |
|
|
|
this.text = BI.createWidget({ |
|
|
|
|
|
|
|
|
|
|
|
return { |
|
|
|
|
|
|
|
type: "bi.vertical_adapt", |
|
|
|
|
|
|
|
columnSize: [o.leftIconWrapperWidth || o.height, "fill", o.rightIconWrapperWidth || o.height], |
|
|
|
|
|
|
|
items: [{ |
|
|
|
|
|
|
|
type: "bi.icon_label", |
|
|
|
|
|
|
|
cls: o.iconCls1, |
|
|
|
|
|
|
|
width: o.leftIconWrapperWidth || o.height, |
|
|
|
|
|
|
|
height: o.height, |
|
|
|
|
|
|
|
iconWidth: o.iconWidth, |
|
|
|
|
|
|
|
iconHeight: o.iconHeight |
|
|
|
|
|
|
|
}, { |
|
|
|
type: "bi.label", |
|
|
|
type: "bi.label", |
|
|
|
|
|
|
|
ref: function (_ref) { |
|
|
|
|
|
|
|
self.text = _ref; |
|
|
|
|
|
|
|
}, |
|
|
|
textAlign: "left", |
|
|
|
textAlign: "left", |
|
|
|
hgap: o.textHgap, |
|
|
|
hgap: o.textHgap, |
|
|
|
vgap: o.textVgap, |
|
|
|
vgap: o.textVgap, |
|
|
@ -37,43 +51,15 @@ BI.IconTextIconNode = BI.inherit(BI.NodeButton, { |
|
|
|
value: o.value, |
|
|
|
value: o.value, |
|
|
|
keyword: o.keyword, |
|
|
|
keyword: o.keyword, |
|
|
|
height: o.height |
|
|
|
height: o.height |
|
|
|
}); |
|
|
|
}, { |
|
|
|
|
|
|
|
|
|
|
|
var icon1 = BI.createWidget({ |
|
|
|
|
|
|
|
type: "bi.icon_label", |
|
|
|
|
|
|
|
cls: o.iconCls1, |
|
|
|
|
|
|
|
width: o.height, |
|
|
|
|
|
|
|
height: o.height, |
|
|
|
|
|
|
|
iconWidth: o.iconWidth, |
|
|
|
|
|
|
|
iconHeight: o.iconHeight |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
var blank = BI.createWidget({ |
|
|
|
|
|
|
|
type: "bi.layout", |
|
|
|
|
|
|
|
width: o.height, |
|
|
|
|
|
|
|
height: o.height |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
BI.createWidget({ |
|
|
|
|
|
|
|
type: "bi.absolute", |
|
|
|
|
|
|
|
element: this, |
|
|
|
|
|
|
|
items: [{ |
|
|
|
|
|
|
|
el: { |
|
|
|
|
|
|
|
type: "bi.icon_label", |
|
|
|
type: "bi.icon_label", |
|
|
|
cls: o.iconCls2, |
|
|
|
cls: o.iconCls2, |
|
|
|
width: o.height, |
|
|
|
width: o.rightIconWrapperWidth || o.height, |
|
|
|
|
|
|
|
height: o.height, |
|
|
|
iconWidth: o.iconWidth, |
|
|
|
iconWidth: o.iconWidth, |
|
|
|
iconHeight: o.iconHeight |
|
|
|
iconHeight: o.iconHeight |
|
|
|
}, |
|
|
|
|
|
|
|
top: 0, |
|
|
|
|
|
|
|
bottom: 0, |
|
|
|
|
|
|
|
right: 0 |
|
|
|
|
|
|
|
}] |
|
|
|
}] |
|
|
|
}); |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
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 () { |
|
|
|
doClick: function () { |
|
|
|