diff --git a/src/case/calendar/calendar.js b/src/case/calendar/calendar.js index 56507ab349..fb762da7e3 100644 --- a/src/case/calendar/calendar.js +++ b/src/case/calendar/calendar.js @@ -78,7 +78,7 @@ BI.Calendar = BI.inherit(BI.Widget, { var items = BI.map(this._getWeekLabel(), function (i, value) { return { type: "bi.label", - height: 24, + height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, text: value }; }); @@ -100,7 +100,7 @@ BI.Calendar = BI.inherit(BI.Widget, { columns: 7, rows: 6, 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 }))] }); @@ -159,7 +159,7 @@ BI.Calendar = BI.inherit(BI.Widget, { whiteSpace: "normal", once: false, forceSelected: true, - height: 24, + height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, value: o.year + "-" + month + "-" + td.text, disabled: td.lastMonth || td.nextMonth || td.disabled, lgap: 5, diff --git a/src/case/calendar/calendar.year.js b/src/case/calendar/calendar.year.js index 2d9d968417..7de7811594 100644 --- a/src/case/calendar/calendar.year.js +++ b/src/case/calendar/calendar.year.js @@ -51,7 +51,7 @@ BI.YearCalendar = BI.inherit(BI.Widget, { columns: 2, rows: 6, columnSize: [1 / 2, 1 / 2], - rowSize: 24 + rowSize: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, })), { type: "bi.center_adapt", vgap: 1 @@ -110,7 +110,7 @@ BI.YearCalendar = BI.inherit(BI.Widget, { whiteSpace: "normal", once: false, forceSelected: true, - height: 24, + height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, width: 45, value: td.text, disabled: td.disabled diff --git a/src/case/combo/iconcombo/popup.iconcombo.js b/src/case/combo/iconcombo/popup.iconcombo.js index 3cc4fcd32f..0c6067bac0 100644 --- a/src/case/combo/iconcombo/popup.iconcombo.js +++ b/src/case/combo/iconcombo/popup.iconcombo.js @@ -19,7 +19,7 @@ BI.IconComboPopup = BI.inherit(BI.Pane, { type: "bi.button_group", items: BI.createItems(o.items, { type: "bi.single_select_icon_text_item", - height: 24 + height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, }), chooseType: o.chooseType, layouts: [{ @@ -47,7 +47,7 @@ BI.IconComboPopup = BI.inherit(BI.Pane, { BI.IconComboPopup.superclass.populate.apply(this, arguments); items = BI.createItems(items, { type: "bi.single_select_icon_text_item", - height: 24 + height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, }); this.popup.populate(items); }, diff --git a/src/case/combo/icontextvaluecombo/popup.icontextvalue.js b/src/case/combo/icontextvaluecombo/popup.icontextvalue.js index 424b0dd806..993bceb456 100644 --- a/src/case/combo/icontextvaluecombo/popup.icontextvalue.js +++ b/src/case/combo/icontextvaluecombo/popup.icontextvalue.js @@ -20,7 +20,7 @@ BI.IconTextValueComboPopup = BI.inherit(BI.Pane, { type: "bi.button_group", items: BI.createItems(o.items, { type: "bi.single_select_icon_text_item", - height: 24, + height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, iconHeight: o.iconHeight, iconWidth: o.iconWidth, iconWrapperWidth: o.iconWrapperWidth @@ -55,10 +55,10 @@ BI.IconTextValueComboPopup = BI.inherit(BI.Pane, { var o = this.options; items = BI.createItems(items, { type: "bi.single_select_icon_text_item", - height: 24, + height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, iconWrapperWidth: o.iconWrapperWidth, iconHeight: o.iconHeight, - iconWidth: o.iconWidth + iconWidth: o.iconWidth, }); this.popup.populate(items, keyword); }, diff --git a/src/case/combo/textvaluecombo/popup.textvalue.js b/src/case/combo/textvaluecombo/popup.textvalue.js index cf68deefa9..5b3c0a8ee1 100644 --- a/src/case/combo/textvaluecombo/popup.textvalue.js +++ b/src/case/combo/textvaluecombo/popup.textvalue.js @@ -14,7 +14,7 @@ BI.TextValueComboPopup = BI.inherit(BI.Pane, { items: BI.createItems(o.items, { type: "bi.single_select_item", textAlign: o.textAlign, - height: 24 + height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, }), chooseType: o.chooseType, layouts: [{ @@ -43,7 +43,7 @@ BI.TextValueComboPopup = BI.inherit(BI.Pane, { BI.TextValueComboPopup.superclass.populate.apply(this, arguments); items = BI.createItems(items, { type: "bi.single_select_item", - height: 24 + height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, }); this.popup.populate(items); }, diff --git a/src/case/layer/layer.multipopup.js b/src/case/layer/layer.multipopup.js index ec937a172c..3979c69271 100644 --- a/src/case/layer/layer.multipopup.js +++ b/src/case/layer/layer.multipopup.js @@ -31,7 +31,7 @@ BI.MultiPopupView = BI.inherit(BI.PopupView, { this.buttongroup = BI.createWidget({ type: "bi.button_group", cls: "list-view-toolbar bi-high-light bi-split-top", - height: 24, + height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, items: BI.createItems(text, { type: "bi.text_button", once: false, diff --git a/src/core/system.js b/src/core/system.js new file mode 100644 index 0000000000..3a3852e051 --- /dev/null +++ b/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, + }) +}); diff --git a/src/widget/date/calendar/popup.month.js b/src/widget/date/calendar/popup.month.js index 2add27d544..195b9302f1 100644 --- a/src/widget/date/calendar/popup.month.js +++ b/src/widget/date/calendar/popup.month.js @@ -31,7 +31,7 @@ BI.MonthPopup = BI.inherit(BI.Widget, { columns: 2, rows: 6, columnSize: [1 / 2, 1 / 2], - rowSize: 25 + rowSize: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT + 1 })), { type: "bi.center_adapt", vgap: 1, @@ -68,7 +68,7 @@ BI.MonthPopup = BI.inherit(BI.Widget, { whiteSpace: "nowrap", once: false, forceSelected: true, - height: 23, + height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT - 1, width: 38, value: td, text: td, diff --git a/src/widget/downlist/item.downlist.js b/src/widget/downlist/item.downlist.js index f05fa2e5d0..068c94fabe 100644 --- a/src/widget/downlist/item.downlist.js +++ b/src/widget/downlist/item.downlist.js @@ -4,7 +4,7 @@ BI.DownListItem = BI.inherit(BI.BasicButton, { return BI.extend(conf, { baseCls: "bi-down-list-item bi-list-item-active", cls: "", - height: 24, + height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, logic: { dynamic: true }, diff --git a/src/widget/downlist/popup.downlist.js b/src/widget/downlist/popup.downlist.js index fbf2c2492a..b9ebed40e7 100644 --- a/src/widget/downlist/popup.downlist.js +++ b/src/widget/downlist/popup.downlist.js @@ -98,7 +98,7 @@ BI.DownListPopup = BI.inherit(BI.Pane, { item.el.logic = { 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.popup = { lgap: 1, diff --git a/src/widget/dynamicdate/dynamicdate.card.js b/src/widget/dynamicdate/dynamicdate.card.js index 00d3c12b86..b2fd221ccf 100644 --- a/src/widget/dynamicdate/dynamicdate.card.js +++ b/src/widget/dynamicdate/dynamicdate.card.js @@ -166,7 +166,7 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, { comboItems[0].text = BI.i18nText("BI-Basic_Empty"); items.push({ type: "bi.text_value_combo", - height: 24, + height: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, items: comboItems, container: null, 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) { items.push({ type: "bi.text_value_combo", - height: 24, + height: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, container: null, items: this._getText(BI.last(values).dateType), value: positionValue || BI.DynamicDateCard.OFFSET.CURRENT, diff --git a/src/widget/dynamicdate/dynamicdate.param.item.js b/src/widget/dynamicdate/dynamicdate.param.item.js index 1db32d44c9..c8771e9080 100644 --- a/src/widget/dynamicdate/dynamicdate.param.item.js +++ b/src/widget/dynamicdate/dynamicdate.param.item.js @@ -1,14 +1,16 @@ BI.DynamicDateParamItem = BI.inherit(BI.Widget, { - props: { - baseCls: "bi-dynamic-date-param-item", - dateType: BI.DynamicDateCard.TYPE.YEAR, - validationChecker: function() { - return true; - }, - value: 0, - offset: 0, - height: 24 + props: function() { + return { + baseCls: "bi-dynamic-date-param-item", + dateType: BI.DynamicDateCard.TYPE.YEAR, + validationChecker: function() { + return true; + }, + value: 0, + offset: 0, + height: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, + } }, render: function () { @@ -19,7 +21,7 @@ BI.DynamicDateParamItem = BI.inherit(BI.Widget, { el: { type: "bi.sign_editor", cls: "bi-border", - height: 22, + height: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT - 2, validationChecker: function (v) { return BI.isNaturalNumber(v); }, @@ -47,13 +49,13 @@ BI.DynamicDateParamItem = BI.inherit(BI.Widget, { }, { el: { type: "bi.label", - height: 24, + height: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, text: this._getText() }, width: o.dateType === BI.DynamicDateCard.TYPE.WORK_DAY ? 60 : 20 }, { type: "bi.text_value_combo", - height: 24, + height: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, items: [{ text: BI.i18nText("BI-Basic_Front"), value: 0 diff --git a/src/widget/dynamicdate/dynamicdate.popup.js b/src/widget/dynamicdate/dynamicdate.popup.js index 0c4052e0cf..9e058e9218 100644 --- a/src/widget/dynamicdate/dynamicdate.popup.js +++ b/src/widget/dynamicdate/dynamicdate.popup.js @@ -1,7 +1,6 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, { constants: { tabHeight: 30, - buttonHeight: 24 }, props: { @@ -27,7 +26,7 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, { cls: "bi-high-light bi-split-top", shadow: true, text: BI.i18nText("BI-Basic_Clear"), - textHeight: c.buttonHeight - 1, + textHeight: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT - 1, listeners: [{ eventName: BI.TextButton.EVENT_CHANGE, action: function () { @@ -38,7 +37,7 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, { type: "bi.text_button", cls: "bi-split-left bi-split-right bi-high-light bi-split-top", shadow: true, - textHeight: c.buttonHeight - 1, + textHeight: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT - 1, text: BI.i18nText("BI-Multi_Date_Today"), disabled: this._checkTodayValid(), ref: function () { @@ -53,7 +52,7 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, { }, { type: "bi.text_button", cls: "bi-high-light bi-split-top", - textHeight: c.buttonHeight - 1, + textHeight: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT - 1, shadow: true, text: BI.i18nText("BI-Basic_OK"), listeners: [{ @@ -68,7 +67,7 @@ BI.DynamicDatePopup = BI.inherit(BI.Widget, { } }] }]], - height: 24 + height: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT }, }] }); diff --git a/src/widget/dynamicdatetime/dynamicdatetime.popup.js b/src/widget/dynamicdatetime/dynamicdatetime.popup.js index 701320eb33..a4a5281714 100644 --- a/src/widget/dynamicdatetime/dynamicdatetime.popup.js +++ b/src/widget/dynamicdatetime/dynamicdatetime.popup.js @@ -25,7 +25,7 @@ BI.DynamicDateTimePopup = BI.inherit(BI.Widget, { items: [[{ type: "bi.text_button", cls: "bi-high-light bi-split-top", - textHeight: c.buttonHeight - 1, + textHeight: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT - 1, shadow: true, text: BI.i18nText("BI-Basic_Clear"), listeners: [{ @@ -37,7 +37,7 @@ BI.DynamicDateTimePopup = BI.inherit(BI.Widget, { }, { type: "bi.text_button", 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, text: BI.i18nText("BI-Multi_Date_Today"), disabled: this._checkTodayValid(), @@ -53,7 +53,7 @@ BI.DynamicDateTimePopup = BI.inherit(BI.Widget, { }, { type: "bi.text_button", cls: "bi-high-light bi-split-top", - textHeight: c.buttonHeight - 1, + textHeight: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT - 1, shadow: true, text: BI.i18nText("BI-Basic_OK"), listeners: [{ @@ -63,7 +63,7 @@ BI.DynamicDateTimePopup = BI.inherit(BI.Widget, { } }] }]], - height: 24 + height: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT } }] }); diff --git a/src/widget/dynamicdatetime/dynamicdatetime.timeselect.js b/src/widget/dynamicdatetime/dynamicdatetime.timeselect.js index adf6dfb4bf..5642cb7998 100644 --- a/src/widget/dynamicdatetime/dynamicdatetime.timeselect.js +++ b/src/widget/dynamicdatetime/dynamicdatetime.timeselect.js @@ -41,7 +41,7 @@ BI.DynamicDateTimeSelect = BI.inherit(BI.Widget, { } }], width: 60, - height: 24 + height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT } }, { type: "bi.label", @@ -77,7 +77,7 @@ BI.DynamicDateTimeSelect = BI.inherit(BI.Widget, { } }], width: 60, - height: 24 + height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT }, { type: "bi.label", text: ":", @@ -106,7 +106,7 @@ BI.DynamicDateTimeSelect = BI.inherit(BI.Widget, { } }], width: 60, - height: 24 + height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT }] }] }; diff --git a/src/widget/multiselect/multiselect.combo.js b/src/widget/multiselect/multiselect.combo.js index b57185335e..339e02af0b 100644 --- a/src/widget/multiselect/multiselect.combo.js +++ b/src/widget/multiselect/multiselect.combo.js @@ -10,7 +10,7 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { baseCls: "bi-multi-select-combo", itemsCreator: BI.emptyFn, valueFormatter: BI.emptyFn, - itemHeight: 24, + itemHeight: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, height: 24, allowEdit: true }); diff --git a/src/widget/multiselect/multiselect.combo.nobar.js b/src/widget/multiselect/multiselect.combo.nobar.js index 6203175e4a..70c6b5db22 100644 --- a/src/widget/multiselect/multiselect.combo.nobar.js +++ b/src/widget/multiselect/multiselect.combo.nobar.js @@ -10,7 +10,7 @@ BI.MultiSelectNoBarCombo = BI.inherit(BI.Single, { baseCls: "bi-multi-select-combo-no-bar", itemsCreator: BI.emptyFn, valueFormatter: BI.emptyFn, - itemHeight: 24, + itemHeight: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, height: 24, }); }, diff --git a/src/widget/multiselect/multiselect.insert.combo.js b/src/widget/multiselect/multiselect.insert.combo.js index db225e95f0..9c3b979095 100644 --- a/src/widget/multiselect/multiselect.insert.combo.js +++ b/src/widget/multiselect/multiselect.insert.combo.js @@ -11,7 +11,7 @@ BI.MultiSelectInsertCombo = BI.inherit(BI.Single, { itemsCreator: BI.emptyFn, valueFormatter: BI.emptyFn, height: 24, - itemHeight: 24, + itemHeight: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, allowEdit: true }); }, diff --git a/src/widget/multiselect/multiselect.insert.combo.nobar.js b/src/widget/multiselect/multiselect.insert.combo.nobar.js index 2fb735ba61..0bd836397e 100644 --- a/src/widget/multiselect/multiselect.insert.combo.nobar.js +++ b/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", itemsCreator: BI.emptyFn, valueFormatter: BI.emptyFn, - itemsHeight: 24, + itemHeight: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, height: 24, }); }, diff --git a/src/widget/multiselect/multiselect.loader.js b/src/widget/multiselect/multiselect.loader.js index fdfb2d1aa7..4996f12daa 100644 --- a/src/widget/multiselect/multiselect.loader.js +++ b/src/widget/multiselect/multiselect.loader.js @@ -18,7 +18,7 @@ BI.MultiSelectLoader = BI.inherit(BI.Widget, { valueFormatter: BI.emptyFn, itemsCreator: 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", logic: this.options.logic, cls: "bi-list-item-active", - height: this.options.itemHeight, + height: this.options.itemHeight || BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, selected: this.isAllSelected(), iconWrapperWidth: 36 }); diff --git a/src/widget/multiselect/multiselect.loader.nobar.js b/src/widget/multiselect/multiselect.loader.nobar.js index 8f469e62e4..d7744d042f 100644 --- a/src/widget/multiselect/multiselect.loader.nobar.js +++ b/src/widget/multiselect/multiselect.loader.nobar.js @@ -17,7 +17,7 @@ BI.MultiSelectNoBarLoader = BI.inherit(BI.Widget, { }, valueFormatter: BI.emptyFn, itemsCreator: BI.emptyFn, - itemHeight: 24, + itemHeight: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, onLoaded: BI.emptyFn }); }, @@ -117,7 +117,7 @@ BI.MultiSelectNoBarLoader = BI.inherit(BI.Widget, { type: "bi.multi_select_item", cls: "bi-list-item-active", logic: this.options.logic, - height: this.options.itemHeight, + height: this.options.itemHeight || BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, iconWrapperWidth: 36 }); }, diff --git a/src/widget/multiselect/multiselect.popup.view.js b/src/widget/multiselect/multiselect.popup.view.js index 1343eb2f09..9c6bac7f0f 100644 --- a/src/widget/multiselect/multiselect.popup.view.js +++ b/src/widget/multiselect/multiselect.popup.view.js @@ -14,7 +14,7 @@ BI.MultiSelectPopupView = BI.inherit(BI.Widget, { valueFormatter: BI.emptyFn, itemsCreator: BI.emptyFn, onLoaded: BI.emptyFn, - itemHeight: 24, + itemHeight: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, }); }, diff --git a/src/widget/multiselect/multiselect.popup.view.nobar.js b/src/widget/multiselect/multiselect.popup.view.nobar.js index 55428df4f1..f5ba1cebd0 100644 --- a/src/widget/multiselect/multiselect.popup.view.nobar.js +++ b/src/widget/multiselect/multiselect.popup.view.nobar.js @@ -13,7 +13,7 @@ BI.MultiSelectNoBarPopupView = BI.inherit(BI.Widget, { maxHeight: 400, valueFormatter: BI.emptyFn, itemsCreator: BI.emptyFn, - itemHeight: 24, + itemHeight: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, onLoaded: BI.emptyFn }); }, diff --git a/src/widget/multiselect/search/multiselect.search.insert.pane.js b/src/widget/multiselect/search/multiselect.search.insert.pane.js index 7513408fe0..d5195979c5 100644 --- a/src/widget/multiselect/search/multiselect.search.insert.pane.js +++ b/src/widget/multiselect/search/multiselect.search.insert.pane.js @@ -30,7 +30,7 @@ BI.MultiSelectSearchInsertPane = BI.inherit(BI.Widget, { this.addNotMatchTip = BI.createWidget({ type: "bi.label", text: BI.i18nText("BI-Basic_Click_To_Add_Text", ""), - height: this.constants.height, + height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, cls: "bi-high-light", hgap: 5, }); @@ -57,7 +57,7 @@ BI.MultiSelectSearchInsertPane = BI.inherit(BI.Widget, { element: this, items: [{ el: this.addNotMatchTip, - height: this.constants.height, + height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, }, { el: this.loader, }], diff --git a/src/widget/multiselect/search/multiselect.search.loader.js b/src/widget/multiselect/search/multiselect.search.loader.js index 2ea43383c4..c32bbc0a32 100644 --- a/src/widget/multiselect/search/multiselect.search.loader.js +++ b/src/widget/multiselect/search/multiselect.search.loader.js @@ -92,7 +92,7 @@ BI.MultiSelectSearchLoader = BI.inherit(BI.Widget, { logic: { dynamic: false }, - height: this.options.itemHeight, + height: this.options.itemHeight || BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, selected: this.isAllSelected(), cls: "bi-list-item-active", iconWrapperWidth: 36 diff --git a/src/widget/multiselectlist/multiselectlist.insert.js b/src/widget/multiselectlist/multiselectlist.insert.js index f4cea55c3d..419e96eb3c 100644 --- a/src/widget/multiselectlist/multiselectlist.insert.js +++ b/src/widget/multiselectlist/multiselectlist.insert.js @@ -7,8 +7,8 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, { baseCls: "bi-multi-select-insert-list", itemsCreator: BI.emptyFn, valueFormatter: BI.emptyFn, - searcherHeight: 24, - itemHeight: 24 + searcherHeight: BI.SIZE_CONSANTS.TRIGGER_HEIGHT, + itemHeight: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, }); }, _init: function () { @@ -71,7 +71,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, { ref: function (ref) { self.editor = ref; }, - height: o.searcherHeight, + height: o.searcherHeight || BI.SIZE_CONSANTS.TRIGGER_HEIGHT, }, isAutoSearch: false, isAutoSync: false, @@ -164,7 +164,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, { element: this, items: [{ el: this.trigger, - height: o.searcherHeight + height: o.searcherHeight || BI.SIZE_CONSANTS.TRIGGER_HEIGHT, }, { el: this.adapter, height: "fill" @@ -175,7 +175,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Single, { element: this, items: [{ el: this.searcherPane, - top: o.searcherHeight, + top: o.searcherHeight || BI.SIZE_CONSANTS.TRIGGER_HEIGHT, bottom: 0, left: 0, right: 0 diff --git a/src/widget/multiselectlist/multiselectlist.insert.nobar.js b/src/widget/multiselectlist/multiselectlist.insert.nobar.js index bbb6c23bbf..9b0e7b21e9 100644 --- a/src/widget/multiselectlist/multiselectlist.insert.nobar.js +++ b/src/widget/multiselectlist/multiselectlist.insert.nobar.js @@ -7,7 +7,7 @@ BI.MultiSelectInsertNoBarList = BI.inherit(BI.Single, { baseCls: "bi-multi-select-insert-list", itemsCreator: BI.emptyFn, valueFormatter: BI.emptyFn, - searcherHeight: 24 + searcherHeight: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, }); }, _init: function () { diff --git a/src/widget/multiselectlist/multiselectlist.js b/src/widget/multiselectlist/multiselectlist.js index e4a046793b..feea0fb2fd 100644 --- a/src/widget/multiselectlist/multiselectlist.js +++ b/src/widget/multiselectlist/multiselectlist.js @@ -8,7 +8,7 @@ BI.MultiSelectList = BI.inherit(BI.Widget, { itemsCreator: BI.emptyFn, valueFormatter: BI.emptyFn, searcherHeight: 24, - itemHeight: 24 + itemHeight: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, }); }, _init: function () { diff --git a/src/widget/year/card.dynamic.year.js b/src/widget/year/card.dynamic.year.js index 536fc01636..b38d55119e 100644 --- a/src/widget/year/card.dynamic.year.js +++ b/src/widget/year/card.dynamic.year.js @@ -22,7 +22,7 @@ BI.DynamicYearCard = BI.inherit(BI.Widget, { type: "bi.label", text: BI.i18nText("BI-Multi_Date_Relative_Current_Time"), textAlign: "left", - height: 24 + height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, }, { type: "bi.dynamic_date_param_item", ref: function () { diff --git a/src/widget/year/popup.year.js b/src/widget/year/popup.year.js index 0782b43f13..73afd9681d 100644 --- a/src/widget/year/popup.year.js +++ b/src/widget/year/popup.year.js @@ -8,7 +8,6 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, { constants: { tabHeight: 30, - buttonHeight: 24 }, props: { @@ -33,7 +32,7 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, { items: [[{ type: "bi.text_button", cls: "bi-split-top bi-high-light", - textHeight: c.buttonHeight - 1, + textHeight: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT - 1, shadow: true, text: BI.i18nText("BI-Basic_Clear"), listeners: [{ @@ -44,7 +43,7 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, { }] }, { 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", shadow: true, text: BI.i18nText("BI-Basic_Current_Year"), @@ -61,7 +60,7 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, { }, { type: "bi.text_button", cls: "bi-split-top bi-high-light", - textHeight: c.buttonHeight - 1, + textHeight: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT - 1, shadow: true, text: BI.i18nText("BI-Basic_OK"), listeners: [{ @@ -76,7 +75,7 @@ BI.DynamicYearPopup = BI.inherit(BI.Widget, { } }] }]], - height: 24 + height: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, }, }] }; diff --git a/src/widget/yearmonth/card.dynamic.yearmonth.js b/src/widget/yearmonth/card.dynamic.yearmonth.js index 9b6ffb66de..786b22a00f 100644 --- a/src/widget/yearmonth/card.dynamic.yearmonth.js +++ b/src/widget/yearmonth/card.dynamic.yearmonth.js @@ -19,7 +19,7 @@ BI.DynamicYearMonthCard = BI.inherit(BI.Widget, { type: "bi.label", text: BI.i18nText("BI-Multi_Date_Relative_Current_Time"), textAlign: "left", - height: 24 + height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, }, { type: "bi.vertical", ref: function (_ref) { diff --git a/src/widget/yearmonth/card.static.yearmonth.js b/src/widget/yearmonth/card.static.yearmonth.js index 9e905d9ee4..09ff4ac2fa 100644 --- a/src/widget/yearmonth/card.static.yearmonth.js +++ b/src/widget/yearmonth/card.static.yearmonth.js @@ -25,7 +25,7 @@ BI.StaticYearMonthCard = BI.inherit(BI.Widget, { whiteSpace: "nowrap", once: false, forceSelected: true, - height: 23, + height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT - 1, width: 38, value: td, text: td, @@ -77,7 +77,7 @@ BI.StaticYearMonthCard = BI.inherit(BI.Widget, { columns: 2, rows: 6, columnSize: [1 / 2, 1 / 2], - rowSize: 25 + rowSize: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT + 1 })), { type: "bi.center_adapt", vgap: 1, diff --git a/src/widget/yearmonth/popup.yearmonth.js b/src/widget/yearmonth/popup.yearmonth.js index 8ebaaefc07..66dec8de29 100644 --- a/src/widget/yearmonth/popup.yearmonth.js +++ b/src/widget/yearmonth/popup.yearmonth.js @@ -8,7 +8,6 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, { constants: { tabHeight: 30, - buttonHeight: 24 }, props: { @@ -33,7 +32,7 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, { items: [[{ type: "bi.text_button", cls: "bi-split-top bi-high-light", - textHeight: c.buttonHeight - 1, + textHeight: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT - 1, shadow: true, text: BI.i18nText("BI-Basic_Clear"), listeners: [{ @@ -45,7 +44,7 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, { }, { type: "bi.text_button", 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, text: BI.i18nText("BI-Basic_Current_Month"), disabled: this._checkTodayValid(), @@ -61,7 +60,7 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, { }, { type: "bi.text_button", cls: "bi-split-top bi-high-light", - textHeight: c.buttonHeight - 1, + textHeight: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT - 1, shadow: true, text: BI.i18nText("BI-Basic_OK"), listeners: [{ @@ -76,7 +75,7 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, { } }] }]], - height: 24 + height: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT }, }] }; diff --git a/src/widget/yearquarter/card.dynamic.yearquarter.js b/src/widget/yearquarter/card.dynamic.yearquarter.js index 588aa05cf1..9e66e52028 100644 --- a/src/widget/yearquarter/card.dynamic.yearquarter.js +++ b/src/widget/yearquarter/card.dynamic.yearquarter.js @@ -19,7 +19,7 @@ BI.DynamicYearQuarterCard = BI.inherit(BI.Widget, { type: "bi.label", text: BI.i18nText("BI-Multi_Date_Relative_Current_Time"), textAlign: "left", - height: 24 + height: BI.SIZE_CONSANTS.LIST_ITEM_HEIGHT, }, { type: "bi.vertical", ref: function (_ref) { diff --git a/src/widget/yearquarter/card.static.yearquarter.js b/src/widget/yearquarter/card.static.yearquarter.js index 5fdd231ff7..62e3291300 100644 --- a/src/widget/yearquarter/card.static.yearquarter.js +++ b/src/widget/yearquarter/card.static.yearquarter.js @@ -28,7 +28,7 @@ BI.StaticYearQuarterCard = BI.inherit(BI.Widget, { whiteSpace: "nowrap", once: false, forceSelected: true, - height: 24, + height: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT, ref: function (_ref) { self.quarterMap[j + 1] = _ref; } diff --git a/src/widget/yearquarter/popup.yearquarter.js b/src/widget/yearquarter/popup.yearquarter.js index e1e001d1b5..de49b4ef60 100644 --- a/src/widget/yearquarter/popup.yearquarter.js +++ b/src/widget/yearquarter/popup.yearquarter.js @@ -27,7 +27,7 @@ BI.DynamicYearQuarterPopup = BI.inherit(BI.Widget, { type: "bi.text_button", cls: "bi-split-top bi-high-light", shadow: true, - textHeight: c.buttonHeight - 1, + textHeight: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT - 1, text: BI.i18nText("BI-Basic_Clear"), listeners: [{ eventName: BI.TextButton.EVENT_CHANGE, @@ -38,7 +38,7 @@ BI.DynamicYearQuarterPopup = BI.inherit(BI.Widget, { }, { type: "bi.text_button", 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, text: BI.i18nText("BI-Basic_Current_Quarter"), disabled: this._checkTodayValid(), @@ -55,7 +55,7 @@ BI.DynamicYearQuarterPopup = BI.inherit(BI.Widget, { type: "bi.text_button", cls: "bi-split-top bi-high-light", shadow: true, - textHeight: c.buttonHeight - 1, + textHeight: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT - 1, text: BI.i18nText("BI-Basic_OK"), listeners: [{ eventName: BI.TextButton.EVENT_CHANGE, @@ -69,7 +69,7 @@ BI.DynamicYearQuarterPopup = BI.inherit(BI.Widget, { } }] }]], - height: 24 + height: BI.SIZE_CONSANTS.TOOL_BAR_HEIGHT }, }] };