Browse Source

日期类型更新

master
windy 4 years ago
parent
commit
88a0a4e305
  1. 6
      src/case/calendar/calendar.js
  2. 8
      src/core/system.js
  3. 4
      src/widget/date/calendar/popup.month.js
  4. 4
      src/widget/dynamicdate/dynamicdate.card.js
  5. 9
      src/widget/dynamicdate/dynamicdate.popup.js
  6. 8
      src/widget/dynamicdatetime/dynamicdatetime.popup.js
  7. 6
      src/widget/dynamicdatetime/dynamicdatetime.timeselect.js
  8. 2
      src/widget/yearmonth/card.dynamic.yearmonth.js
  9. 4
      src/widget/yearmonth/card.static.yearmonth.js
  10. 9
      src/widget/yearmonth/popup.yearmonth.js
  11. 2
      src/widget/yearquarter/card.dynamic.yearquarter.js
  12. 2
      src/widget/yearquarter/card.static.yearquarter.js
  13. 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) {
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,

8
src/core/system.js

@ -37,3 +37,11 @@
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,
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,

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");
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,

9
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
},
}]
});

8
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
}
}]
});

6
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
}]
}]
};

2
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) {

4
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,

9
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
},
}]
};

2
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) {

2
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;
}

8
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
},
}]
};

Loading…
Cancel
Save