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.
|
|
|
/**
|
|
|
|
* guy
|
|
|
|
* @extends BI.Single
|
|
|
|
* @type {*|void|Object}
|
|
|
|
*/
|
|
|
|
BI.HalfButton = BI.inherit(BI.BasicButton, {
|
|
|
|
_defaultConfig: function () {
|
|
|
|
var conf = BI.HalfIconButton.superclass._defaultConfig.apply(this, arguments);
|
|
|
|
return BI.extend(conf, {
|
|
|
|
selected: false,
|
|
|
|
width: 14,
|
|
|
|
height: 14,
|
|
|
|
iconWidth: 14,
|
|
|
|
iconHeight: 14,
|
|
|
|
});
|
|
|
|
},
|
|
|
|
|
|
|
|
render: function () {
|
|
|
|
var o = this.options;
|
|
|
|
return {
|
|
|
|
type: "bi.center_adapt",
|
|
|
|
items: [{
|
|
|
|
type: "bi.default",
|
|
|
|
cls: "bi-half-button bi-high-light-border",
|
|
|
|
width: o.iconWidth,
|
|
|
|
height: o.iconHeight,
|
|
|
|
}],
|
|
|
|
};
|
|
|
|
},
|
|
|
|
|
|
|
|
doClick: function () {
|
|
|
|
BI.HalfButton.superclass.doClick.apply(this, arguments);
|
|
|
|
if (this.isValid()) {
|
|
|
|
this.fireEvent(BI.HalfButton.EVENT_CHANGE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
BI.HalfButton.EVENT_CHANGE = "EVENT_CHANGE";
|
|
|
|
|
|
|
|
BI.shortcut("bi.half_button", BI.HalfButton);
|