guy 2 years ago
parent
commit
802d984576
  1. 2
      src/case/trigger/trigger.editor.js
  2. 20
      src/case/trigger/trigger.icon.text.js
  3. 5
      src/case/trigger/trigger.text.js
  4. 2
      src/case/trigger/trigger.text.small.js
  5. 2
      src/widget/textvaluedownlistcombo/combo.textvaluedownlist.js

2
src/case/trigger/trigger.editor.js

@ -67,7 +67,7 @@ BI.EditorTrigger = BI.inherit(BI.Trigger, {
type: "bi.trigger_icon_button", type: "bi.trigger_icon_button",
width: o.triggerWidth || BI.pixFormat(o.height, 2) width: o.triggerWidth || BI.pixFormat(o.height, 2)
}, },
width: o.triggerWidth || BI.pixFormat(o.height, 2) width: ""
} }
] ]
}); });

20
src/case/trigger/trigger.icon.text.js

@ -42,7 +42,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
BI.createWidget({ BI.createWidget({
element: this, element: this,
type: "bi.horizontal_fill", type: "bi.horizontal_fill",
columnSize: [BI.isEmptyString(o.iconCls) ? 0 : (o.iconWrapperWidth || o.height), "fill", o.triggerWidth || o.height], columnSize: ["", "fill", ""],
ref: function (_ref) { ref: function (_ref) {
self.wrapper = _ref; self.wrapper = _ref;
}, },
@ -50,7 +50,9 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
el: { el: {
type: "bi.icon_change_button", type: "bi.icon_change_button",
cls: "icon-combo-trigger-icon", cls: "icon-combo-trigger-icon",
width: o.triggerWidth || o.height,
iconCls: o.iconCls, iconCls: o.iconCls,
invisible: !o.iconCls,
ref: function (_ref) { ref: function (_ref) {
self.icon = _ref; self.icon = _ref;
}, },
@ -74,21 +76,7 @@ BI.IconTextTrigger = BI.inherit(BI.Trigger, {
setIcon: function (iconCls) { setIcon: function (iconCls) {
var o = this.options; var o = this.options;
this.icon.setIcon(iconCls); this.icon.setIcon(iconCls);
var iconItem = this.wrapper.attr("items")[0]; this.icon.setVisible(!!iconCls);
var textItem = this.wrapper.attr("items")[1];
if (BI.isNull(iconCls) || BI.isEmptyString(iconCls)) {
if (iconItem.width !== 0) {
iconItem.width = 0;
textItem.lgap = 5;
this.wrapper.resize();
}
} else {
if (iconItem.width !== (o.iconWrapperWidth || o.height)) {
iconItem.width = (o.iconWrapperWidth || o.height);
textItem.lgap = 0;
this.wrapper.resize();
}
}
}, },
setTextCls: function (cls) { setTextCls: function (cls) {

5
src/case/trigger/trigger.text.js

@ -60,7 +60,7 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
return ({ return ({
type: "bi.horizontal_fill", type: "bi.horizontal_fill",
columnSize: ["fill", o.triggerWidth || o.height], columnSize: ["fill", ""],
items: [ items: [
{ {
el: label, el: label,
@ -68,6 +68,8 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
}, { }, {
el: o.allowClear ? { el: o.allowClear ? {
type: "bi.vertical_adapt", type: "bi.vertical_adapt",
width: o.triggerWidth || o.height,
height: o.height,
horizontalAlign: "left", horizontalAlign: "left",
scrollable: false, scrollable: false,
items: [ items: [
@ -80,7 +82,6 @@ BI.TextTrigger = BI.inherit(BI.Trigger, {
cls: "close-h-font " + (o.allowClear ? "clear-button" : ""), cls: "close-h-font " + (o.allowClear ? "clear-button" : ""),
stopPropagation: true, stopPropagation: true,
width: o.triggerWidth || o.height, width: o.triggerWidth || o.height,
height: o.height,
invisible: !BI.isNotEmptyString(o.text), invisible: !BI.isNotEmptyString(o.text),
handler: function () { handler: function () {
self.fireEvent(BI.TextTrigger.EVENT_CLEAR); self.fireEvent(BI.TextTrigger.EVENT_CLEAR);

2
src/case/trigger/trigger.text.small.js

@ -43,7 +43,7 @@ BI.SmallTextTrigger = BI.inherit(BI.Trigger, {
width: "fill" width: "fill"
}, { }, {
el: this.trigerButton, el: this.trigerButton,
width: o.triggerWidth || o.height width: ""
} }
] ]
}); });

2
src/widget/textvaluedownlistcombo/combo.textvaluedownlist.js

@ -5,7 +5,7 @@
BI.TextValueDownListCombo = BI.inherit(BI.Widget, { BI.TextValueDownListCombo = BI.inherit(BI.Widget, {
_defaultConfig: function (config) { _defaultConfig: function (config) {
return BI.extend(BI.TextValueDownListCombo.superclass._defaultConfig.apply(this, arguments), { return BI.extend(BI.TextValueDownListCombo.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-text-value-down-list-combo " + (config.simple ? "bi-border-bottom" : "bi-border"), baseCls: "bi-text-value-down-list-combo bi-border-radius " + (config.simple ? "bi-border-bottom" : "bi-border"),
height: 24, height: 24,
}); });
}, },

Loading…
Cancel
Save