fineui是帆软报表和BI产品线所使用的前端框架。
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.7 KiB

8 years ago
/**
* Created by GUY on 2016/2/2.
*
* @class BI.SingleSelectIconTextItem
* @extends BI.BasicButton
*/
BI.SingleSelectIconTextItem = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectIconTextItem.superclass._defaultConfig.apply(this, arguments), {
extraCls: "bi-single-select-icon-text-item bi-list-item-active",
7 years ago
iconCls: "",
height: 24
7 years ago
});
8 years ago
},
_init: function () {
BI.SingleSelectIconTextItem.superclass._init.apply(this, arguments);
var self = this, o = this.options;
this.text = BI.createWidget({
type: "bi.icon_text_item",
8 years ago
element: this,
7 years ago
cls: o.iconCls,
8 years ago
once: o.once,
iconWrapperWidth: o.iconWrapperWidth,
8 years ago
selected: o.selected,
height: o.height,
iconHeight: o.iconHeight,
iconWidth: o.iconWidth,
text: o.text,
keyword: o.keyword,
value: o.value,
py: o.py
});
this.text.on(BI.Controller.EVENT_CHANGE, function () {
self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);
});
},
isSelected: function () {
return this.text.isSelected();
},
setSelected: function (b) {
this.text.setSelected(b);
},
doRedMark: function () {
this.text.doRedMark.apply(this.text, arguments);
},
unRedMark: function () {
this.text.unRedMark.apply(this.text, arguments);
},
doClick: function () {
BI.SingleSelectIconTextItem.superclass.doClick.apply(this, arguments);
}
});
8 years ago
BI.shortcut("bi.single_select_icon_text_item", BI.SingleSelectIconTextItem);