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.

57 lines
1.5 KiB

8 years ago
/**
* 文字trigger(右边小三角小一号的) ==
*
* @class BI.SmallTextTrigger
* @extends BI.Trigger
*/
BI.SmallTextTrigger = BI.inherit(BI.Trigger, {
_const: {
7 years ago
hgap: 4
8 years ago
},
_defaultConfig: function () {
var conf = BI.SmallTextTrigger.superclass._defaultConfig.apply(this, arguments);
return BI.extend(conf, {
baseCls: (conf.baseCls || "") + " bi-text-trigger",
7 years ago
height: 20
8 years ago
});
},
_init: function () {
BI.SmallTextTrigger.superclass._init.apply(this, arguments);
var self = this, o = this.options, c = this._const;
this.text = BI.createWidget({
type: "bi.label",
textAlign: "left",
height: o.height,
text: o.text,
hgap: c.hgap
});
this.trigerButton = BI.createWidget({
type: "bi.trigger_icon_button",
7 years ago
width: o.triggerWidth || o.height
8 years ago
});
BI.createWidget({
8 years ago
element: this,
7 years ago
type: "bi.htape",
8 years ago
items: [
{
el: this.text
}, {
el: this.trigerButton,
7 years ago
width: o.triggerWidth || o.height
8 years ago
}
]
});
},
setValue: function (value) {
this.text.setValue(value);
},
setText: function (text) {
this.text.setText(text);
}
});
8 years ago
BI.shortcut("bi.small_text_trigger", BI.SmallTextTrigger);