|
|
|
@ -5,15 +5,17 @@
|
|
|
|
|
* @extends BI.Trigger |
|
|
|
|
*/ |
|
|
|
|
BI.SmallTextTrigger = BI.inherit(BI.Trigger, { |
|
|
|
|
_const: { |
|
|
|
|
hgap: 6 |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
_defaultConfig: function () { |
|
|
|
|
var conf = BI.SmallTextTrigger.superclass._defaultConfig.apply(this, arguments); |
|
|
|
|
return BI.extend(conf, { |
|
|
|
|
baseCls: (conf.baseCls || "") + " bi-text-trigger", |
|
|
|
|
height: 20 |
|
|
|
|
height: 20, |
|
|
|
|
textHgap: 6, |
|
|
|
|
textVgap: 0, |
|
|
|
|
textLgap: 0, |
|
|
|
|
textRgap: 0, |
|
|
|
|
textTgap: 0, |
|
|
|
|
textBgap: 0, |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
@ -25,7 +27,12 @@ BI.SmallTextTrigger = BI.inherit(BI.Trigger, {
|
|
|
|
|
textAlign: "left", |
|
|
|
|
height: o.height, |
|
|
|
|
text: o.text, |
|
|
|
|
hgap: c.hgap |
|
|
|
|
hgap: o.textHgap, |
|
|
|
|
vgap: o.textVgap, |
|
|
|
|
lgap: o.textLgap, |
|
|
|
|
rgap: o.textRgap, |
|
|
|
|
tgap: o.textTgap, |
|
|
|
|
bgap: o.textBgap, |
|
|
|
|
}); |
|
|
|
|
this.trigerButton = BI.createWidget({ |
|
|
|
|
type: "bi.trigger_icon_button", |
|
|
|
@ -34,10 +41,11 @@ BI.SmallTextTrigger = BI.inherit(BI.Trigger, {
|
|
|
|
|
|
|
|
|
|
BI.createWidget({ |
|
|
|
|
element: this, |
|
|
|
|
type: "bi.htape", |
|
|
|
|
type: "bi.horizontal_fill", |
|
|
|
|
items: [ |
|
|
|
|
{ |
|
|
|
|
el: this.text |
|
|
|
|
el: this.text, |
|
|
|
|
width: "fill" |
|
|
|
|
}, { |
|
|
|
|
el: this.trigerButton, |
|
|
|
|
width: o.triggerWidth || o.height |
|
|
|
@ -54,4 +62,4 @@ BI.SmallTextTrigger = BI.inherit(BI.Trigger, {
|
|
|
|
|
this.text.setText(text); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
BI.shortcut("bi.small_text_trigger", BI.SmallTextTrigger); |
|
|
|
|
BI.shortcut("bi.small_text_trigger", BI.SmallTextTrigger); |
|
|
|
|