Browse Source

Pull request #1999: BI-88967 提供系统参数以配置尺寸(部分)

Merge in VISUAL/fineui from ~WINDY/fui:master to master

* commit '88a0a4e3057f598ae321a5387bba7ec52340f6ab':
  日期类型更新
  结构化
  update
  提供provider
  delete
  系统参数形式
  修改下size
  BI-88967 可配全局widget宽高尺寸(部分)
es6
windy 3 years ago
parent
commit
39838a4d72
  1. 6
      src/case/calendar/calendar.js
  2. 4
      src/case/calendar/calendar.year.js
  3. 4
      src/case/combo/iconcombo/popup.iconcombo.js
  4. 6
      src/case/combo/icontextvaluecombo/popup.icontextvalue.js
  5. 4
      src/case/combo/textvaluecombo/popup.textvalue.js
  6. 2
      src/case/layer/layer.multipopup.js
  7. 47
      src/core/system.js
  8. 4
      src/widget/date/calendar/popup.month.js
  9. 2
      src/widget/downlist/item.downlist.js
  10. 2
      src/widget/downlist/popup.downlist.js
  11. 4
      src/widget/dynamicdate/dynamicdate.card.js
  12. 12
      src/widget/dynamicdate/dynamicdate.param.item.js
  13. 9
      src/widget/dynamicdate/dynamicdate.popup.js
  14. 8
      src/widget/dynamicdatetime/dynamicdatetime.popup.js
  15. 6
      src/widget/dynamicdatetime/dynamicdatetime.timeselect.js
  16. 2
      src/widget/multiselect/multiselect.combo.js
  17. 2
      src/widget/multiselect/multiselect.combo.nobar.js
  18. 2
      src/widget/multiselect/multiselect.insert.combo.js
  19. 2
      src/widget/multiselect/multiselect.insert.combo.nobar.js
  20. 4
      src/widget/multiselect/multiselect.loader.js
  21. 4
      src/widget/multiselect/multiselect.loader.nobar.js
  22. 2
      src/widget/multiselect/multiselect.popup.view.js
  23. 2
      src/widget/multiselect/multiselect.popup.view.nobar.js
  24. 4
      src/widget/multiselect/search/multiselect.search.insert.pane.js
  25. 2
      src/widget/multiselect/search/multiselect.search.loader.js
  26. 10
      src/widget/multiselectlist/multiselectlist.insert.js
  27. 2
      src/widget/multiselectlist/multiselectlist.insert.nobar.js
  28. 2
      src/widget/multiselectlist/multiselectlist.js
  29. 2
      src/widget/year/card.dynamic.year.js
  30. 9
      src/widget/year/popup.year.js
  31. 2
      src/widget/yearmonth/card.dynamic.yearmonth.js
  32. 4
      src/widget/yearmonth/card.static.yearmonth.js
  33. 9
      src/widget/yearmonth/popup.yearmonth.js
  34. 2
      src/widget/yearquarter/card.dynamic.yearquarter.js
  35. 2
      src/widget/yearquarter/card.static.yearquarter.js
  36. 8
      src/widget/yearquarter/popup.yearquarter.js

6
src/case/calendar/calendar.js

@ -78,7 +78,7 @@ BI.Calendar = BI.inherit(BI.Widget, {
var items = BI.map(this._getWeekLabel(), function (i, value) { var items = BI.map(this._getWeekLabel(), function (i, value) {
return { return {
type: "bi.label", type: "bi.label",
height: 24, height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
text: value text: value
}; };
}); });
@ -100,7 +100,7 @@ BI.Calendar = BI.inherit(BI.Widget, {
columns: 7, columns: 7,
rows: 6, rows: 6,
columnSize: [1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7], columnSize: [1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7, 1 / 7],
rowSize: 24, rowSize: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
vgap: 10 vgap: 10
}))] }))]
}); });
@ -159,7 +159,7 @@ BI.Calendar = BI.inherit(BI.Widget, {
whiteSpace: "normal", whiteSpace: "normal",
once: false, once: false,
forceSelected: true, forceSelected: true,
height: 24, height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
value: o.year + "-" + month + "-" + td.text, value: o.year + "-" + month + "-" + td.text,
disabled: td.lastMonth || td.nextMonth || td.disabled, disabled: td.lastMonth || td.nextMonth || td.disabled,
lgap: 5, lgap: 5,

4
src/case/calendar/calendar.year.js

@ -51,7 +51,7 @@ BI.YearCalendar = BI.inherit(BI.Widget, {
columns: 2, columns: 2,
rows: 6, rows: 6,
columnSize: [1 / 2, 1 / 2], columnSize: [1 / 2, 1 / 2],
rowSize: 24 rowSize: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
})), { })), {
type: "bi.center_adapt", type: "bi.center_adapt",
vgap: 1 vgap: 1
@ -110,7 +110,7 @@ BI.YearCalendar = BI.inherit(BI.Widget, {
whiteSpace: "normal", whiteSpace: "normal",
once: false, once: false,
forceSelected: true, forceSelected: true,
height: 24, height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
width: 45, width: 45,
value: td.text, value: td.text,
disabled: td.disabled disabled: td.disabled

4
src/case/combo/iconcombo/popup.iconcombo.js

@ -19,7 +19,7 @@ BI.IconComboPopup = BI.inherit(BI.Pane, {
type: "bi.button_group", type: "bi.button_group",
items: BI.createItems(o.items, { items: BI.createItems(o.items, {
type: "bi.single_select_icon_text_item", type: "bi.single_select_icon_text_item",
height: 24 height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
}), }),
chooseType: o.chooseType, chooseType: o.chooseType,
layouts: [{ layouts: [{
@ -47,7 +47,7 @@ BI.IconComboPopup = BI.inherit(BI.Pane, {
BI.IconComboPopup.superclass.populate.apply(this, arguments); BI.IconComboPopup.superclass.populate.apply(this, arguments);
items = BI.createItems(items, { items = BI.createItems(items, {
type: "bi.single_select_icon_text_item", type: "bi.single_select_icon_text_item",
height: 24 height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
}); });
this.popup.populate(items); this.popup.populate(items);
}, },

6
src/case/combo/icontextvaluecombo/popup.icontextvalue.js

@ -20,7 +20,7 @@ BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
type: "bi.button_group", type: "bi.button_group",
items: BI.createItems(o.items, { items: BI.createItems(o.items, {
type: "bi.single_select_icon_text_item", type: "bi.single_select_icon_text_item",
height: 24, height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
iconHeight: o.iconHeight, iconHeight: o.iconHeight,
iconWidth: o.iconWidth, iconWidth: o.iconWidth,
iconWrapperWidth: o.iconWrapperWidth iconWrapperWidth: o.iconWrapperWidth
@ -55,10 +55,10 @@ BI.IconTextValueComboPopup = BI.inherit(BI.Pane, {
var o = this.options; var o = this.options;
items = BI.createItems(items, { items = BI.createItems(items, {
type: "bi.single_select_icon_text_item", type: "bi.single_select_icon_text_item",
height: 24, height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
iconWrapperWidth: o.iconWrapperWidth, iconWrapperWidth: o.iconWrapperWidth,
iconHeight: o.iconHeight, iconHeight: o.iconHeight,
iconWidth: o.iconWidth iconWidth: o.iconWidth,
}); });
this.popup.populate(items, keyword); this.popup.populate(items, keyword);
}, },

4
src/case/combo/textvaluecombo/popup.textvalue.js

@ -14,7 +14,7 @@ BI.TextValueComboPopup = BI.inherit(BI.Pane, {
items: BI.createItems(o.items, { items: BI.createItems(o.items, {
type: "bi.single_select_item", type: "bi.single_select_item",
textAlign: o.textAlign, textAlign: o.textAlign,
height: 24 height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
}), }),
chooseType: o.chooseType, chooseType: o.chooseType,
layouts: [{ layouts: [{
@ -43,7 +43,7 @@ BI.TextValueComboPopup = BI.inherit(BI.Pane, {
BI.TextValueComboPopup.superclass.populate.apply(this, arguments); BI.TextValueComboPopup.superclass.populate.apply(this, arguments);
items = BI.createItems(items, { items = BI.createItems(items, {
type: "bi.single_select_item", type: "bi.single_select_item",
height: 24 height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
}); });
this.popup.populate(items); this.popup.populate(items);
}, },

2
src/case/layer/layer.multipopup.js

@ -31,7 +31,7 @@ BI.MultiPopupView = BI.inherit(BI.PopupView, {
this.buttongroup = BI.createWidget({ this.buttongroup = BI.createWidget({
type: "bi.button_group", type: "bi.button_group",
cls: "list-view-toolbar bi-high-light bi-split-top", cls: "list-view-toolbar bi-high-light bi-split-top",
height: 24, height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
items: BI.createItems(text, { items: BI.createItems(text, {
type: "bi.text_button", type: "bi.text_button",
once: false, once: false,

47
src/core/system.js

@ -0,0 +1,47 @@
/**
* @author windy
* @version 2.0
* Created by windy on 2021/6/30
*/
// 系统参数常量
!(function () {
var system = {
size: { // 尺寸
TOOL_BAR_HEIGHT: 24,
LIST_ITEM_HEIGHT: 24,
TRIGGER_HEIGHT: 24,
},
};
var provider = function () {
this.SYSTEM = system;
this.setSize = function (opt) {
BI.deepExtend(system, { size: opt });
};
this.$get = function () {
return BI.inherit(BI.OB, {
getSize: function () {
return system.size;
},
});
};
};
BI.provider("bi.provider.system", provider);
})();
BI.prepares.push(function () {
BI.SIZE_CONSANTS = BI.Providers.getProvider('bi.provider.system').getSize();
});
BI.config('bi.provider.system', function (provider) {
provider.setSize({
TOOL_BAR_HEIGHT: 30,
LIST_ITEM_HEIGHT: 30,
TRIGGER_HEIGHT: 30,
})
});

4
src/widget/date/calendar/popup.month.js

@ -31,7 +31,7 @@ BI.MonthPopup = BI.inherit(BI.Widget, {
columns: 2, columns: 2,
rows: 6, rows: 6,
columnSize: [1 / 2, 1 / 2], columnSize: [1 / 2, 1 / 2],
rowSize: 25 rowSize: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT + 1
})), { })), {
type: "bi.center_adapt", type: "bi.center_adapt",
vgap: 1, vgap: 1,
@ -68,7 +68,7 @@ BI.MonthPopup = BI.inherit(BI.Widget, {
whiteSpace: "nowrap", whiteSpace: "nowrap",
once: false, once: false,
forceSelected: true, forceSelected: true,
height: 23, height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT - 1,
width: 38, width: 38,
value: td, value: td,
text: td, text: td,

2
src/widget/downlist/item.downlist.js

@ -4,7 +4,7 @@ BI.DownListItem = BI.inherit(BI.BasicButton, {
return BI.extend(conf, { return BI.extend(conf, {
baseCls: "bi-down-list-item bi-list-item-active", baseCls: "bi-down-list-item bi-list-item-active",
cls: "", cls: "",
height: 24, height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
logic: { logic: {
dynamic: true dynamic: true
}, },

2
src/widget/downlist/popup.downlist.js

@ -98,7 +98,7 @@ BI.DownListPopup = BI.inherit(BI.Pane, {
item.el.logic = { item.el.logic = {
dynamic: true dynamic: true
}; };
item.el.height = item.el.height || self.constants.height; item.el.height = item.el.height || BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT;
item.el.iconCls2 = self.constants.nextIcon; item.el.iconCls2 = self.constants.nextIcon;
item.popup = { item.popup = {
lgap: 1, lgap: 1,

4
src/widget/dynamicdate/dynamicdate.card.js

@ -166,7 +166,7 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
comboItems[0].text = BI.i18nText("BI-Basic_Empty"); comboItems[0].text = BI.i18nText("BI-Basic_Empty");
items.push({ items.push({
type: "bi.text_value_combo", type: "bi.text_value_combo",
height: 24, height: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT,
items: comboItems, items: comboItems,
container: null, container: null,
value: positionValue || BI.DynamicDateCard.OFFSET.CURRENT, value: positionValue || BI.DynamicDateCard.OFFSET.CURRENT,
@ -183,7 +183,7 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
if(values.length !== 0 && BI.last(values).dateType !== BI.DynamicDateCard.TYPE.DAY && BI.last(values).dateType !== BI.DynamicDateCard.TYPE.WORK_DAY) { if(values.length !== 0 && BI.last(values).dateType !== BI.DynamicDateCard.TYPE.DAY && BI.last(values).dateType !== BI.DynamicDateCard.TYPE.WORK_DAY) {
items.push({ items.push({
type: "bi.text_value_combo", type: "bi.text_value_combo",
height: 24, height: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT,
container: null, container: null,
items: this._getText(BI.last(values).dateType), items: this._getText(BI.last(values).dateType),
value: positionValue || BI.DynamicDateCard.OFFSET.CURRENT, value: positionValue || BI.DynamicDateCard.OFFSET.CURRENT,

12
src/widget/dynamicdate/dynamicdate.param.item.js

@ -1,6 +1,7 @@
BI.DynamicDateParamItem = BI.inherit(BI.Widget, { BI.DynamicDateParamItem = BI.inherit(BI.Widget, {
props: { props: function() {
return {
baseCls: "bi-dynamic-date-param-item", baseCls: "bi-dynamic-date-param-item",
dateType: BI.DynamicDateCard.TYPE.YEAR, dateType: BI.DynamicDateCard.TYPE.YEAR,
validationChecker: function() { validationChecker: function() {
@ -8,7 +9,8 @@ BI.DynamicDateParamItem = BI.inherit(BI.Widget, {
}, },
value: 0, value: 0,
offset: 0, offset: 0,
height: 24 height: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT,
}
}, },
render: function () { render: function () {
@ -19,7 +21,7 @@ BI.DynamicDateParamItem = BI.inherit(BI.Widget, {
el: { el: {
type: "bi.sign_editor", type: "bi.sign_editor",
cls: "bi-border", cls: "bi-border",
height: 22, height: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT - 2,
validationChecker: function (v) { validationChecker: function (v) {
return BI.isNaturalNumber(v); return BI.isNaturalNumber(v);
}, },
@ -47,13 +49,13 @@ BI.DynamicDateParamItem = BI.inherit(BI.Widget, {
}, { }, {
el: { el: {
type: "bi.label", type: "bi.label",
height: 24, height: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT,
text: this._getText() text: this._getText()
}, },
width: o.dateType === BI.DynamicDateCard.TYPE.WORK_DAY ? 60 : 20 width: o.dateType === BI.DynamicDateCard.TYPE.WORK_DAY ? 60 : 20
}, { }, {
type: "bi.text_value_combo", type: "bi.text_value_combo",
height: 24, height: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT,
items: [{ items: [{
text: BI.i18nText("BI-Basic_Front"), text: BI.i18nText("BI-Basic_Front"),
value: 0 value: 0

9
src/widget/dynamicdate/dynamicdate.popup.js

@ -1,7 +1,6 @@
BI.DynamicDatePopup = BI.inherit(BI.Widget, { BI.DynamicDatePopup = BI.inherit(BI.Widget, {
constants: { constants: {
tabHeight: 30, tabHeight: 30,
buttonHeight: 24
}, },
props: { props: {
@ -27,7 +26,7 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
cls: "bi-high-light bi-split-top", cls: "bi-high-light bi-split-top",
shadow: true, shadow: true,
text: BI.i18nText("BI-Basic_Clear"), text: BI.i18nText("BI-Basic_Clear"),
textHeight: c.buttonHeight - 1, textHeight: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT - 1,
listeners: [{ listeners: [{
eventName: BI.TextButton.EVENT_CHANGE, eventName: BI.TextButton.EVENT_CHANGE,
action: function () { action: function () {
@ -38,7 +37,7 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
type: "bi.text_button", type: "bi.text_button",
cls: "bi-split-left bi-split-right bi-high-light bi-split-top", cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
shadow: true, shadow: true,
textHeight: c.buttonHeight - 1, textHeight: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT - 1,
text: BI.i18nText("BI-Multi_Date_Today"), text: BI.i18nText("BI-Multi_Date_Today"),
disabled: this._checkTodayValid(), disabled: this._checkTodayValid(),
ref: function () { ref: function () {
@ -53,7 +52,7 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
}, { }, {
type: "bi.text_button", type: "bi.text_button",
cls: "bi-high-light bi-split-top", cls: "bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1, textHeight: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT - 1,
shadow: true, shadow: true,
text: BI.i18nText("BI-Basic_OK"), text: BI.i18nText("BI-Basic_OK"),
listeners: [{ listeners: [{
@ -68,7 +67,7 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, {
} }
}] }]
}]], }]],
height: 24 height: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT
}, },
}] }]
}); });

8
src/widget/dynamicdatetime/dynamicdatetime.popup.js

@ -25,7 +25,7 @@ BI.DynamicDateTimePopup = BI.inherit(BI.Widget, {
items: [[{ items: [[{
type: "bi.text_button", type: "bi.text_button",
cls: "bi-high-light bi-split-top", cls: "bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1, textHeight: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT - 1,
shadow: true, shadow: true,
text: BI.i18nText("BI-Basic_Clear"), text: BI.i18nText("BI-Basic_Clear"),
listeners: [{ listeners: [{
@ -37,7 +37,7 @@ BI.DynamicDateTimePopup = BI.inherit(BI.Widget, {
}, { }, {
type: "bi.text_button", type: "bi.text_button",
cls: "bi-split-left bi-split-right bi-high-light bi-split-top", cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1, textHeight: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT - 1,
shadow: true, shadow: true,
text: BI.i18nText("BI-Multi_Date_Today"), text: BI.i18nText("BI-Multi_Date_Today"),
disabled: this._checkTodayValid(), disabled: this._checkTodayValid(),
@ -53,7 +53,7 @@ BI.DynamicDateTimePopup = BI.inherit(BI.Widget, {
}, { }, {
type: "bi.text_button", type: "bi.text_button",
cls: "bi-high-light bi-split-top", cls: "bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1, textHeight: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT - 1,
shadow: true, shadow: true,
text: BI.i18nText("BI-Basic_OK"), text: BI.i18nText("BI-Basic_OK"),
listeners: [{ listeners: [{
@ -63,7 +63,7 @@ BI.DynamicDateTimePopup = BI.inherit(BI.Widget, {
} }
}] }]
}]], }]],
height: 24 height: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT
} }
}] }]
}); });

6
src/widget/dynamicdatetime/dynamicdatetime.timeselect.js

@ -41,7 +41,7 @@ BI.DynamicDateTimeSelect = BI.inherit(BI.Widget, {
} }
}], }],
width: 60, width: 60,
height: 24 height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT
} }
}, { }, {
type: "bi.label", type: "bi.label",
@ -77,7 +77,7 @@ BI.DynamicDateTimeSelect = BI.inherit(BI.Widget, {
} }
}], }],
width: 60, width: 60,
height: 24 height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT
}, { }, {
type: "bi.label", type: "bi.label",
text: ":", text: ":",
@ -106,7 +106,7 @@ BI.DynamicDateTimeSelect = BI.inherit(BI.Widget, {
} }
}], }],
width: 60, width: 60,
height: 24 height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT
}] }]
}] }]
}; };

2
src/widget/multiselect/multiselect.combo.js

@ -10,7 +10,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, {
baseCls: "bi-multi-select-combo", baseCls: "bi-multi-select-combo",
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
itemHeight: 24, itemHeight: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
height: 24, height: 24,
allowEdit: true allowEdit: true
}); });

2
src/widget/multiselect/multiselect.combo.nobar.js

@ -10,7 +10,7 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, {
baseCls: "bi-multi-select-combo-no-bar", baseCls: "bi-multi-select-combo-no-bar",
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
itemHeight: 24, itemHeight: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
height: 24, height: 24,
}); });
}, },

2
src/widget/multiselect/multiselect.insert.combo.js

@ -11,7 +11,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, {
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
height: 24, height: 24,
itemHeight: 24, itemHeight: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
allowEdit: true allowEdit: true
}); });
}, },

2
src/widget/multiselect/multiselect.insert.combo.nobar.js

@ -10,7 +10,7 @@ BI.MultiSelectInsertNoBarCombo = BI.inherit(BI.Single, {
baseCls: "bi-multi-select-insert-combo-no-bar", baseCls: "bi-multi-select-insert-combo-no-bar",
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
itemsHeight: 24, itemHeight: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
height: 24, height: 24,
}); });
}, },

4
src/widget/multiselect/multiselect.loader.js

@ -18,7 +18,7 @@ BI.MultiSelectLoader = BI.inherit(BI.Widget, {
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
onLoaded: BI.emptyFn, onLoaded: BI.emptyFn,
itemHeight: 24 itemHeight: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
}); });
}, },
@ -126,7 +126,7 @@ BI.MultiSelectLoader = BI.inherit(BI.Widget, {
type: "bi.multi_select_item", type: "bi.multi_select_item",
logic: this.options.logic, logic: this.options.logic,
cls: "bi-list-item-active", cls: "bi-list-item-active",
height: this.options.itemHeight, height: this.options.itemHeight || BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
selected: this.isAllSelected(), selected: this.isAllSelected(),
iconWrapperWidth: 36 iconWrapperWidth: 36
}); });

4
src/widget/multiselect/multiselect.loader.nobar.js

@ -17,7 +17,7 @@ BI.MultiSelectNoBarLoader = BI.inherit(BI.Widget, {
}, },
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
itemHeight: 24, itemHeight: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
onLoaded: BI.emptyFn onLoaded: BI.emptyFn
}); });
}, },
@ -117,7 +117,7 @@ BI.MultiSelectNoBarLoader = BI.inherit(BI.Widget, {
type: "bi.multi_select_item", type: "bi.multi_select_item",
cls: "bi-list-item-active", cls: "bi-list-item-active",
logic: this.options.logic, logic: this.options.logic,
height: this.options.itemHeight, height: this.options.itemHeight || BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
iconWrapperWidth: 36 iconWrapperWidth: 36
}); });
}, },

2
src/widget/multiselect/multiselect.popup.view.js

@ -14,7 +14,7 @@ BI.MultiSelectPopupView = BI.inherit(BI.Widget, {
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
onLoaded: BI.emptyFn, onLoaded: BI.emptyFn,
itemHeight: 24, itemHeight: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
}); });
}, },

2
src/widget/multiselect/multiselect.popup.view.nobar.js

@ -13,7 +13,7 @@ BI.MultiSelectNoBarPopupView = BI.inherit(BI.Widget, {
maxHeight: 400, maxHeight: 400,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
itemHeight: 24, itemHeight: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
onLoaded: BI.emptyFn onLoaded: BI.emptyFn
}); });
}, },

4
src/widget/multiselect/search/multiselect.search.insert.pane.js

@ -30,7 +30,7 @@ BI.MultiSelectSearchInsertPane = BI.inherit(BI.Widget, {
this.addNotMatchTip = BI.createWidget({ this.addNotMatchTip = BI.createWidget({
type: "bi.label", type: "bi.label",
text: BI.i18nText("BI-Basic_Click_To_Add_Text", ""), text: BI.i18nText("BI-Basic_Click_To_Add_Text", ""),
height: this.constants.height, height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
cls: "bi-high-light", cls: "bi-high-light",
hgap: 5, hgap: 5,
}); });
@ -57,7 +57,7 @@ BI.MultiSelectSearchInsertPane = BI.inherit(BI.Widget, {
element: this, element: this,
items: [{ items: [{
el: this.addNotMatchTip, el: this.addNotMatchTip,
height: this.constants.height, height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
}, { }, {
el: this.loader, el: this.loader,
}], }],

2
src/widget/multiselect/search/multiselect.search.loader.js

@ -92,7 +92,7 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, {
logic: { logic: {
dynamic: false dynamic: false
}, },
height: this.options.itemHeight, height: this.options.itemHeight || BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
selected: this.isAllSelected(), selected: this.isAllSelected(),
cls: "bi-list-item-active", cls: "bi-list-item-active",
iconWrapperWidth: 36 iconWrapperWidth: 36

10
src/widget/multiselectlist/multiselectlist.insert.js

@ -7,8 +7,8 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
baseCls: "bi-multi-select-insert-list", baseCls: "bi-multi-select-insert-list",
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
searcherHeight: 24, searcherHeight: BI.SIZE_CONSANTS.TRIGGER_HEIGHT,
itemHeight: 24 itemHeight: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
}); });
}, },
_init: function () { _init: function () {
@ -71,7 +71,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
ref: function (ref) { ref: function (ref) {
self.editor = ref; self.editor = ref;
}, },
height: o.searcherHeight, height: o.searcherHeight || BI.SIZE_CONSANTS.TRIGGER_HEIGHT,
}, },
isAutoSearch: false, isAutoSearch: false,
isAutoSync: false, isAutoSync: false,
@ -164,7 +164,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
element: this, element: this,
items: [{ items: [{
el: this.trigger, el: this.trigger,
height: o.searcherHeight height: o.searcherHeight || BI.SIZE_CONSANTS.TRIGGER_HEIGHT,
}, { }, {
el: this.adapter, el: this.adapter,
height: "fill" height: "fill"
@ -175,7 +175,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, {
element: this, element: this,
items: [{ items: [{
el: this.searcherPane, el: this.searcherPane,
top: o.searcherHeight, top: o.searcherHeight || BI.SIZE_CONSANTS.TRIGGER_HEIGHT,
bottom: 0, bottom: 0,
left: 0, left: 0,
right: 0 right: 0

2
src/widget/multiselectlist/multiselectlist.insert.nobar.js

@ -7,7 +7,7 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, {
baseCls: "bi-multi-select-insert-list", baseCls: "bi-multi-select-insert-list",
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
searcherHeight: 24 searcherHeight: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
}); });
}, },
_init: function () { _init: function () {

2
src/widget/multiselectlist/multiselectlist.js

@ -8,7 +8,7 @@ BI.MultiSelectList = BI.inherit(BI.Widget, {
itemsCreator: BI.emptyFn, itemsCreator: BI.emptyFn,
valueFormatter: BI.emptyFn, valueFormatter: BI.emptyFn,
searcherHeight: 24, searcherHeight: 24,
itemHeight: 24 itemHeight: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
}); });
}, },
_init: function () { _init: function () {

2
src/widget/year/card.dynamic.year.js

@ -22,7 +22,7 @@ BI.DynamicYearCard = BI.inherit(BI.Widget, {
type: "bi.label", type: "bi.label",
text: BI.i18nText("BI-Multi_Date_Relative_Current_Time"), text: BI.i18nText("BI-Multi_Date_Relative_Current_Time"),
textAlign: "left", textAlign: "left",
height: 24 height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
}, { }, {
type: "bi.dynamic_date_param_item", type: "bi.dynamic_date_param_item",
ref: function () { ref: function () {

9
src/widget/year/popup.year.js

@ -8,7 +8,6 @@
BI.DynamicYearPopup = BI.inherit(BI.Widget, { BI.DynamicYearPopup = BI.inherit(BI.Widget, {
constants: { constants: {
tabHeight: 30, tabHeight: 30,
buttonHeight: 24
}, },
props: { props: {
@ -33,7 +32,7 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
items: [[{ items: [[{
type: "bi.text_button", type: "bi.text_button",
cls: "bi-split-top bi-high-light", cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1, textHeight: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT - 1,
shadow: true, shadow: true,
text: BI.i18nText("BI-Basic_Clear"), text: BI.i18nText("BI-Basic_Clear"),
listeners: [{ listeners: [{
@ -44,7 +43,7 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
}] }]
}, { }, {
type: "bi.text_button", type: "bi.text_button",
textHeight: c.buttonHeight - 1, textHeight: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT - 1,
cls: "bi-split-left bi-split-right bi-high-light bi-split-top", cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
shadow: true, shadow: true,
text: BI.i18nText("BI-Basic_Current_Year"), text: BI.i18nText("BI-Basic_Current_Year"),
@ -61,7 +60,7 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
}, { }, {
type: "bi.text_button", type: "bi.text_button",
cls: "bi-split-top bi-high-light", cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1, textHeight: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT - 1,
shadow: true, shadow: true,
text: BI.i18nText("BI-Basic_OK"), text: BI.i18nText("BI-Basic_OK"),
listeners: [{ listeners: [{
@ -76,7 +75,7 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, {
} }
}] }]
}]], }]],
height: 24 height: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT,
}, },
}] }]
}; };

2
src/widget/yearmonth/card.dynamic.yearmonth.js

@ -19,7 +19,7 @@ BI.DynamicYearMonthCard = BI.inherit(BI.Widget, {
type: "bi.label", type: "bi.label",
text: BI.i18nText("BI-Multi_Date_Relative_Current_Time"), text: BI.i18nText("BI-Multi_Date_Relative_Current_Time"),
textAlign: "left", textAlign: "left",
height: 24 height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
}, { }, {
type: "bi.vertical", type: "bi.vertical",
ref: function (_ref) { ref: function (_ref) {

4
src/widget/yearmonth/card.static.yearmonth.js

@ -25,7 +25,7 @@ BI.StaticYearMonthCard = BI.inherit(BI.Widget, {
whiteSpace: "nowrap", whiteSpace: "nowrap",
once: false, once: false,
forceSelected: true, forceSelected: true,
height: 23, height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT - 1,
width: 38, width: 38,
value: td, value: td,
text: td, text: td,
@ -77,7 +77,7 @@ BI.StaticYearMonthCard = BI.inherit(BI.Widget, {
columns: 2, columns: 2,
rows: 6, rows: 6,
columnSize: [1 / 2, 1 / 2], columnSize: [1 / 2, 1 / 2],
rowSize: 25 rowSize: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT + 1
})), { })), {
type: "bi.center_adapt", type: "bi.center_adapt",
vgap: 1, vgap: 1,

9
src/widget/yearmonth/popup.yearmonth.js

@ -8,7 +8,6 @@
BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, { BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
constants: { constants: {
tabHeight: 30, tabHeight: 30,
buttonHeight: 24
}, },
props: { props: {
@ -33,7 +32,7 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
items: [[{ items: [[{
type: "bi.text_button", type: "bi.text_button",
cls: "bi-split-top bi-high-light", cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1, textHeight: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT - 1,
shadow: true, shadow: true,
text: BI.i18nText("BI-Basic_Clear"), text: BI.i18nText("BI-Basic_Clear"),
listeners: [{ listeners: [{
@ -45,7 +44,7 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
}, { }, {
type: "bi.text_button", type: "bi.text_button",
cls: "bi-split-left bi-split-right bi-high-light bi-split-top", cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1, textHeight: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT - 1,
shadow: true, shadow: true,
text: BI.i18nText("BI-Basic_Current_Month"), text: BI.i18nText("BI-Basic_Current_Month"),
disabled: this._checkTodayValid(), disabled: this._checkTodayValid(),
@ -61,7 +60,7 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
}, { }, {
type: "bi.text_button", type: "bi.text_button",
cls: "bi-split-top bi-high-light", cls: "bi-split-top bi-high-light",
textHeight: c.buttonHeight - 1, textHeight: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT - 1,
shadow: true, shadow: true,
text: BI.i18nText("BI-Basic_OK"), text: BI.i18nText("BI-Basic_OK"),
listeners: [{ listeners: [{
@ -76,7 +75,7 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
} }
}] }]
}]], }]],
height: 24 height: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT
}, },
}] }]
}; };

2
src/widget/yearquarter/card.dynamic.yearquarter.js

@ -19,7 +19,7 @@ BI.DynamicYearQuarterCard = BI.inherit(BI.Widget, {
type: "bi.label", type: "bi.label",
text: BI.i18nText("BI-Multi_Date_Relative_Current_Time"), text: BI.i18nText("BI-Multi_Date_Relative_Current_Time"),
textAlign: "left", textAlign: "left",
height: 24 height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT,
}, { }, {
type: "bi.vertical", type: "bi.vertical",
ref: function (_ref) { ref: function (_ref) {

2
src/widget/yearquarter/card.static.yearquarter.js

@ -28,7 +28,7 @@ BI.StaticYearQuarterCard = BI.inherit(BI.Widget, {
whiteSpace: "nowrap", whiteSpace: "nowrap",
once: false, once: false,
forceSelected: true, forceSelected: true,
height: 24, height: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT,
ref: function (_ref) { ref: function (_ref) {
self.quarterMap[j + 1] = _ref; self.quarterMap[j + 1] = _ref;
} }

8
src/widget/yearquarter/popup.yearquarter.js

@ -27,7 +27,7 @@ BI.DynamicYearQuarterPopup = BI.inherit(BI.Widget, {
type: "bi.text_button", type: "bi.text_button",
cls: "bi-split-top bi-high-light", cls: "bi-split-top bi-high-light",
shadow: true, shadow: true,
textHeight: c.buttonHeight - 1, textHeight: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT - 1,
text: BI.i18nText("BI-Basic_Clear"), text: BI.i18nText("BI-Basic_Clear"),
listeners: [{ listeners: [{
eventName: BI.TextButton.EVENT_CHANGE, eventName: BI.TextButton.EVENT_CHANGE,
@ -38,7 +38,7 @@ BI.DynamicYearQuarterPopup = BI.inherit(BI.Widget, {
}, { }, {
type: "bi.text_button", type: "bi.text_button",
cls: "bi-split-left bi-split-right bi-high-light bi-split-top", cls: "bi-split-left bi-split-right bi-high-light bi-split-top",
textHeight: c.buttonHeight - 1, textHeight: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT - 1,
shadow: true, shadow: true,
text: BI.i18nText("BI-Basic_Current_Quarter"), text: BI.i18nText("BI-Basic_Current_Quarter"),
disabled: this._checkTodayValid(), disabled: this._checkTodayValid(),
@ -55,7 +55,7 @@ BI.DynamicYearQuarterPopup = BI.inherit(BI.Widget, {
type: "bi.text_button", type: "bi.text_button",
cls: "bi-split-top bi-high-light", cls: "bi-split-top bi-high-light",
shadow: true, shadow: true,
textHeight: c.buttonHeight - 1, textHeight: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT - 1,
text: BI.i18nText("BI-Basic_OK"), text: BI.i18nText("BI-Basic_OK"),
listeners: [{ listeners: [{
eventName: BI.TextButton.EVENT_CHANGE, eventName: BI.TextButton.EVENT_CHANGE,
@ -69,7 +69,7 @@ BI.DynamicYearQuarterPopup = BI.inherit(BI.Widget, {
} }
}] }]
}]], }]],
height: 24 height: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT
}, },
}] }]
}; };

Loading…
Cancel
Save