Browse Source

BI-18130 && BI-18215 && BI-18282 && BI-18267 && BI-18301 && BI-18336 && BI-18348 && BI-18330 && BI-18327 && BI-18326 && BI-18319 && BI-18309

es6
windy 7 years ago
parent
commit
b4d4973a48
  1. 2
      demo/js/widget/numberinterval/demo.number_interval.js
  2. 14
      demo/js/widget/yearmonth/demo.year_month_combo.js
  3. 3
      demo/version.js
  4. 18
      dist/_fineui.min.js
  5. 50
      dist/bundle.js
  6. 18
      dist/bundle.min.js
  7. 2
      dist/case.js
  8. 3
      dist/config.js
  9. 16
      dist/demo.js
  10. 18
      dist/fineui.min.js
  11. 45
      dist/widget.js
  12. 3
      public/js/index.js
  13. 2
      src/case/calendar/calendar.year.js
  14. 2
      src/widget/dynamicdate/dynamicdate.param.item.js
  15. 5
      src/widget/numberinterval/numberinterval.js
  16. 2
      src/widget/year/trigger.year.js
  17. 3
      src/widget/yearmonth/card.static.yearmonth.js
  18. 2
      src/widget/yearmonth/popup.yearmonth.js
  19. 13
      src/widget/yearmonth/trigger.yearmonth.js
  20. 3
      src/widget/yearquarter/card.static.yearquarter.js
  21. 2
      src/widget/yearquarter/popup.yearquarter.js
  22. 13
      src/widget/yearquarter/trigger.yearquarter.js
  23. 3
      ui/js/index.js

2
demo/js/widget/numberinterval/demo.number_interval.js

@ -9,7 +9,7 @@ Demo.NumericalInterval = BI.inherit(BI.Widget, {
mounted: function () { mounted: function () {
var numerical = this.numerical; var numerical = this.numerical;
var label = this.label; var label = this.label;
numerical.on(BI.NumberInterval.EVENT_CHANGE, function () { numerical.on(BI.NumberInterval.EVENT_CONFIRM, function () {
var temp = numerical.getValue(); var temp = numerical.getValue();
var res = "大于" + (temp.closemin ? "等于 " : " ") + temp.min + " 小于" + (temp.closemax ? "等于 " : " ") + temp.max; var res = "大于" + (temp.closemin ? "等于 " : " ") + temp.min + " 小于" + (temp.closemax ? "等于 " : " ") + temp.max;
label.setValue(res); label.setValue(res);

14
demo/js/widget/yearmonth/demo.year_month_combo.js

@ -16,13 +16,13 @@ Demo.YearMonthCombo = BI.inherit(BI.Widget, {
self.widget = _ref; self.widget = _ref;
}, },
width: 300, width: 300,
value: { // value: {
type: 1, // type: 1,
value: { // value: {
year: 2018, // year: 2018,
month: 1 // month: 1
} // }
} // }
}, { }, {
type: "bi.button", type: "bi.button",
text: "getValue", text: "getValue",

3
demo/version.js

@ -158,5 +158,6 @@ BI.i18n = {
"BI-Conf_Condition_Or": "或条件", "BI-Conf_Condition_Or": "或条件",
"BI-Microsoft_YaHei": "微软雅黑", "BI-Microsoft_YaHei": "微软雅黑",
"BI-Apple_Light": "苹方-light", "BI-Apple_Light": "苹方-light",
"BI-Font_Family": "字体" "BI-Font_Family": "字体",
"BI-Basic_Please_Input_Content": "请输入内容"
}; };

18
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

50
dist/bundle.js vendored

@ -73862,7 +73862,7 @@ BI.extend(BI.YearCalendar, {
}, },
getEndYear: function (year) { getEndYear: function (year) {
return BI.YearCalendar.getStartYear(year) + BI.YearCalendar.INTERVAL; return BI.YearCalendar.getStartYear(year) + BI.YearCalendar.INTERVAL - 1;
}, },
getPageByYear: function (year) { getPageByYear: function (year) {
@ -90361,7 +90361,7 @@ BI.extend(BI.DynamicDateCombo, {
}, },
errorText: function (v) { errorText: function (v) {
if(BI.isEmptyString(v)) { if(BI.isEmptyString(v)) {
return BI.i18nText("BI-Basic_Input_Can_Not_Null"); return BI.i18nText("BI-Basic_Please_Input_Content");
} }
return BI.i18nText("BI-Please_Input_Positive_Integer"); return BI.i18nText("BI-Please_Input_Positive_Integer");
}, },
@ -100652,6 +100652,9 @@ BI.NumberInterval = BI.inherit(BI.Single, {
} }
self.fireEvent(BI.NumberInterval.EVENT_CHANGE); self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
}); });
w.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.NumberInterval.EVENT_CONFIRM);
});
}, },
_setComboValueChangedEvent: function (w) { _setComboValueChangedEvent: function (w) {
@ -100672,6 +100675,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
break; break;
default : default :
self.fireEvent(BI.NumberInterval.EVENT_CHANGE); self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
self.fireEvent(BI.NumberInterval.EVENT_CONFIRM);
self.fireEvent(BI.NumberInterval.EVENT_VALID); self.fireEvent(BI.NumberInterval.EVENT_VALID);
} }
}); });
@ -100774,6 +100778,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
} }
}); });
BI.NumberInterval.EVENT_CHANGE = "EVENT_CHANGE"; BI.NumberInterval.EVENT_CHANGE = "EVENT_CHANGE";
BI.NumberInterval.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.NumberInterval.EVENT_VALID = "EVENT_VALID"; BI.NumberInterval.EVENT_VALID = "EVENT_VALID";
BI.NumberInterval.EVENT_ERROR = "EVENT_ERROR"; BI.NumberInterval.EVENT_ERROR = "EVENT_ERROR";
BI.shortcut("bi.number_interval", BI.NumberInterval);/** BI.shortcut("bi.number_interval", BI.NumberInterval);/**
@ -108090,7 +108095,7 @@ BI.shortcut("bi.dynamic_year_popup", BI.DynamicYearPopup);BI.DynamicYearTrigger
value = value || {}; value = value || {};
this.editor.setState(value.year); this.editor.setState(value.year);
this.editor.setValue(value.year); this.editor.setValue(value.year);
this.editor.setTitle(value.year); this.setTitle(value.year);
break; break;
} }
}, },
@ -108285,11 +108290,10 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
obj.month = obj.month || 0; obj.month = obj.month || 0;
if (BI.checkDateVoid(obj.year, obj.month, 1, o.min, o.max)[0]) { if (BI.checkDateVoid(obj.year, obj.month, 1, o.min, o.max)[0]) {
var year = BI.getDate().getFullYear(); var year = BI.getDate().getFullYear();
var month = BI.getDate().getMonth();
this.selectedYear = ""; this.selectedYear = "";
this.selectedMonth = ""; this.selectedMonth = "";
this.yearPicker.setValue(year); this.yearPicker.setValue(year);
this.month.setValue(month); this.month.setValue();
} else { } else {
this.selectedYear = BI.parseInt(obj.year); this.selectedYear = BI.parseInt(obj.year);
this.selectedMonth = BI.parseInt(obj.month); this.selectedMonth = BI.parseInt(obj.month);
@ -108569,7 +108573,7 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
cls: "bi-border-bottom", cls: "bi-border-bottom",
height: this.constants.tabHeight, height: this.constants.tabHeight,
items: BI.createItems([{ items: BI.createItems([{
text: BI.i18nText("BI-Basic_Year_Fen"), text: BI.i18nText("BI-Basic_Year_Month"),
value: BI.DynamicYearCombo.Static value: BI.DynamicYearCombo.Static
}, { }, {
text: BI.i18nText("BI-Basic_Dynamic_Title"), text: BI.i18nText("BI-Basic_Dynamic_Title"),
@ -108774,6 +108778,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
} }
}; };
} }
self.setTitle(self._getStaticTitle(self.storeValue.value));
self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM); self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM);
}); });
@ -108821,11 +108826,11 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
_getText: function (obj) { _getText: function (obj) {
var value = ""; var value = "";
if(BI.isNotNull(obj.year)) { if(BI.isNotNull(obj.year) && obj.year !== 0) {
value += Math.abs(obj.year) + BI.i18nText("BI-Basic_Year") + (obj.year < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind")); value += Math.abs(obj.year) + BI.i18nText("BI-Basic_Year") + (obj.year < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind"));
} }
if(BI.isNotNull(obj.month) && obj.month !== 0) { if(BI.isNotNull(obj.month) && obj.month !== 0) {
value += Math.abs(obj.month) + BI.i18nText("BI-Basic_Year") + (obj.month < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind")); value += Math.abs(obj.month) + BI.i18nText("BI-Basic_Month") + (obj.month < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind"));
} }
return value; return value;
}, },
@ -108837,6 +108842,13 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
this.setTitle(BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr)); this.setTitle(BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr));
}, },
_getStaticTitle: function (value) {
value = value || {};
var yearStr = (BI.isNull(value.year) || BI.isEmptyString(value.year)) ? "" : value.year + "-";
var monthStr = (BI.isNull(value.month) || BI.isEmptyString(value.month)) ? "" : value.month;
return yearStr + monthStr;
},
setValue: function (v) { setValue: function (v) {
var type, value; var type, value;
var date = BI.getDate(); var date = BI.getDate();
@ -108859,6 +108871,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
this.yearEditor.setTitle(value.year); this.yearEditor.setTitle(value.year);
this.monthEditor.setValue(month); this.monthEditor.setValue(month);
this.monthEditor.setTitle(month); this.monthEditor.setTitle(month);
this.setTitle(this._getStaticTitle(value));
break; break;
} }
}, },
@ -109225,11 +109238,10 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
obj.quarter = obj.quarter || 0; obj.quarter = obj.quarter || 0;
if (BI.checkDateVoid(obj.year, obj.quarter, 1, o.min, o.max)[0]) { if (BI.checkDateVoid(obj.year, obj.quarter, 1, o.min, o.max)[0]) {
var year = BI.getDate().getFullYear(); var year = BI.getDate().getFullYear();
var quarter = BI.getDate().getQuarter();
this.selectedYear = ""; this.selectedYear = "";
this.selectedQuarter = ""; this.selectedQuarter = "";
this.yearPicker.setValue(year); this.yearPicker.setValue(year);
this.quarter.setValue(quarter); this.quarter.setValue();
} else { } else {
this.selectedYear = BI.parseInt(obj.year); this.selectedYear = BI.parseInt(obj.year);
this.selectedQuarter = BI.parseInt(obj.quarter); this.selectedQuarter = BI.parseInt(obj.quarter);
@ -109484,7 +109496,7 @@ BI.extend(BI.DynamicYearQuarterCombo, {
cls: "bi-border-bottom", cls: "bi-border-bottom",
height: this.constants.tabHeight, height: this.constants.tabHeight,
items: BI.createItems([{ items: BI.createItems([{
text: BI.i18nText("BI-Basic_Year_Fen"), text: BI.i18nText("BI-Basic_Year_Quarter"),
value: BI.DynamicYearQuarterCombo.Static value: BI.DynamicYearQuarterCombo.Static
}, { }, {
text: BI.i18nText("BI-Basic_Dynamic_Title"), text: BI.i18nText("BI-Basic_Dynamic_Title"),
@ -109689,6 +109701,7 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
} }
}; };
} }
self.setTitle(self._getStaticTitle(self.storeValue.value));
self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM); self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM);
}); });
@ -109725,13 +109738,20 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
} }
}, },
_getStaticTitle: function (value) {
value = value || {};
var yearStr = (BI.isNull(value.year) || BI.isEmptyString(value.year)) ? "" : value.year + "-";
var quarterStr = (BI.isNull(value.quarter) || BI.isEmptyString(value.quarter)) ? "" : value.quarter;
return yearStr + quarterStr;
},
_getText: function (obj) { _getText: function (obj) {
var value = ""; var value = "";
if(BI.isNotNull(obj.year)) { if(BI.isNotNull(obj.year) && obj.year !== 0) {
value += Math.abs(obj.year) + BI.i18nText("BI-Basic_Year") + (obj.year < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind")); value += Math.abs(obj.year) + BI.i18nText("BI-Basic_Year") + (obj.year < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind"));
} }
if(BI.isNotNull(obj.quarter) && obj.quarter !== 0) { if(BI.isNotNull(obj.quarter) && obj.quarter !== 0) {
value += Math.abs(obj.quarter) + BI.i18nText("BI-Basic_Year") + (obj.quarter < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind")); value += Math.abs(obj.quarter) + BI.i18nText("BI-Basic_Single_Quarter") + (obj.quarter < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind"));
} }
return value; return value;
}, },
@ -109765,6 +109785,7 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
this.yearEditor.setTitle(value.year); this.yearEditor.setTitle(value.year);
this.quarterEditor.setValue(quarter); this.quarterEditor.setValue(quarter);
this.quarterEditor.setTitle(quarter); this.quarterEditor.setTitle(quarter);
this.setTitle(this._getStaticTitle(value));
break; break;
} }
}, },
@ -111924,5 +111945,6 @@ BI.i18n = {
"BI-Conf_Condition_Or": "或条件", "BI-Conf_Condition_Or": "或条件",
"BI-Microsoft_YaHei": "微软雅黑", "BI-Microsoft_YaHei": "微软雅黑",
"BI-Apple_Light": "苹方-light", "BI-Apple_Light": "苹方-light",
"BI-Font_Family": "字体" "BI-Font_Family": "字体",
"BI-Basic_Please_Input_Content": "请输入内容"
}; };

18
dist/bundle.min.js vendored

File diff suppressed because one or more lines are too long

2
dist/case.js vendored

@ -1922,7 +1922,7 @@ BI.extend(BI.YearCalendar, {
}, },
getEndYear: function (year) { getEndYear: function (year) {
return BI.YearCalendar.getStartYear(year) + BI.YearCalendar.INTERVAL; return BI.YearCalendar.getStartYear(year) + BI.YearCalendar.INTERVAL - 1;
}, },
getPageByYear: function (year) { getPageByYear: function (year) {

3
dist/config.js vendored

@ -158,5 +158,6 @@ BI.i18n = {
"BI-Conf_Condition_Or": "或条件", "BI-Conf_Condition_Or": "或条件",
"BI-Microsoft_YaHei": "微软雅黑", "BI-Microsoft_YaHei": "微软雅黑",
"BI-Apple_Light": "苹方-light", "BI-Apple_Light": "苹方-light",
"BI-Font_Family": "字体" "BI-Font_Family": "字体",
"BI-Basic_Please_Input_Content": "请输入内容"
}; };

16
dist/demo.js vendored

@ -12990,7 +12990,7 @@ Demo.NumericalInterval = BI.inherit(BI.Widget, {
mounted: function () { mounted: function () {
var numerical = this.numerical; var numerical = this.numerical;
var label = this.label; var label = this.label;
numerical.on(BI.NumberInterval.EVENT_CHANGE, function () { numerical.on(BI.NumberInterval.EVENT_CONFIRM, function () {
var temp = numerical.getValue(); var temp = numerical.getValue();
var res = "大于" + (temp.closemin ? "等于 " : " ") + temp.min + " 小于" + (temp.closemax ? "等于 " : " ") + temp.max; var res = "大于" + (temp.closemin ? "等于 " : " ") + temp.min + " 小于" + (temp.closemax ? "等于 " : " ") + temp.max;
label.setValue(res); label.setValue(res);
@ -14600,13 +14600,13 @@ Demo.YearMonthCombo = BI.inherit(BI.Widget, {
self.widget = _ref; self.widget = _ref;
}, },
width: 300, width: 300,
value: { // value: {
type: 1, // type: 1,
value: { // value: {
year: 2018, // year: 2018,
month: 1 // month: 1
} // }
} // }
}, { }, {
type: "bi.button", type: "bi.button",
text: "getValue", text: "getValue",

18
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

45
dist/widget.js vendored

@ -3725,7 +3725,7 @@ BI.extend(BI.DynamicDateCombo, {
}, },
errorText: function (v) { errorText: function (v) {
if(BI.isEmptyString(v)) { if(BI.isEmptyString(v)) {
return BI.i18nText("BI-Basic_Input_Can_Not_Null"); return BI.i18nText("BI-Basic_Please_Input_Content");
} }
return BI.i18nText("BI-Please_Input_Positive_Integer"); return BI.i18nText("BI-Please_Input_Positive_Integer");
}, },
@ -14016,6 +14016,9 @@ BI.NumberInterval = BI.inherit(BI.Single, {
} }
self.fireEvent(BI.NumberInterval.EVENT_CHANGE); self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
}); });
w.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.NumberInterval.EVENT_CONFIRM);
});
}, },
_setComboValueChangedEvent: function (w) { _setComboValueChangedEvent: function (w) {
@ -14036,6 +14039,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
break; break;
default : default :
self.fireEvent(BI.NumberInterval.EVENT_CHANGE); self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
self.fireEvent(BI.NumberInterval.EVENT_CONFIRM);
self.fireEvent(BI.NumberInterval.EVENT_VALID); self.fireEvent(BI.NumberInterval.EVENT_VALID);
} }
}); });
@ -14138,6 +14142,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
} }
}); });
BI.NumberInterval.EVENT_CHANGE = "EVENT_CHANGE"; BI.NumberInterval.EVENT_CHANGE = "EVENT_CHANGE";
BI.NumberInterval.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.NumberInterval.EVENT_VALID = "EVENT_VALID"; BI.NumberInterval.EVENT_VALID = "EVENT_VALID";
BI.NumberInterval.EVENT_ERROR = "EVENT_ERROR"; BI.NumberInterval.EVENT_ERROR = "EVENT_ERROR";
BI.shortcut("bi.number_interval", BI.NumberInterval);/** BI.shortcut("bi.number_interval", BI.NumberInterval);/**
@ -21454,7 +21459,7 @@ BI.shortcut("bi.dynamic_year_popup", BI.DynamicYearPopup);BI.DynamicYearTrigger
value = value || {}; value = value || {};
this.editor.setState(value.year); this.editor.setState(value.year);
this.editor.setValue(value.year); this.editor.setValue(value.year);
this.editor.setTitle(value.year); this.setTitle(value.year);
break; break;
} }
}, },
@ -21649,11 +21654,10 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
obj.month = obj.month || 0; obj.month = obj.month || 0;
if (BI.checkDateVoid(obj.year, obj.month, 1, o.min, o.max)[0]) { if (BI.checkDateVoid(obj.year, obj.month, 1, o.min, o.max)[0]) {
var year = BI.getDate().getFullYear(); var year = BI.getDate().getFullYear();
var month = BI.getDate().getMonth();
this.selectedYear = ""; this.selectedYear = "";
this.selectedMonth = ""; this.selectedMonth = "";
this.yearPicker.setValue(year); this.yearPicker.setValue(year);
this.month.setValue(month); this.month.setValue();
} else { } else {
this.selectedYear = BI.parseInt(obj.year); this.selectedYear = BI.parseInt(obj.year);
this.selectedMonth = BI.parseInt(obj.month); this.selectedMonth = BI.parseInt(obj.month);
@ -21933,7 +21937,7 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
cls: "bi-border-bottom", cls: "bi-border-bottom",
height: this.constants.tabHeight, height: this.constants.tabHeight,
items: BI.createItems([{ items: BI.createItems([{
text: BI.i18nText("BI-Basic_Year_Fen"), text: BI.i18nText("BI-Basic_Year_Month"),
value: BI.DynamicYearCombo.Static value: BI.DynamicYearCombo.Static
}, { }, {
text: BI.i18nText("BI-Basic_Dynamic_Title"), text: BI.i18nText("BI-Basic_Dynamic_Title"),
@ -22138,6 +22142,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
} }
}; };
} }
self.setTitle(self._getStaticTitle(self.storeValue.value));
self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM); self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM);
}); });
@ -22185,11 +22190,11 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
_getText: function (obj) { _getText: function (obj) {
var value = ""; var value = "";
if(BI.isNotNull(obj.year)) { if(BI.isNotNull(obj.year) && obj.year !== 0) {
value += Math.abs(obj.year) + BI.i18nText("BI-Basic_Year") + (obj.year < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind")); value += Math.abs(obj.year) + BI.i18nText("BI-Basic_Year") + (obj.year < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind"));
} }
if(BI.isNotNull(obj.month) && obj.month !== 0) { if(BI.isNotNull(obj.month) && obj.month !== 0) {
value += Math.abs(obj.month) + BI.i18nText("BI-Basic_Year") + (obj.month < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind")); value += Math.abs(obj.month) + BI.i18nText("BI-Basic_Month") + (obj.month < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind"));
} }
return value; return value;
}, },
@ -22201,6 +22206,13 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
this.setTitle(BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr)); this.setTitle(BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr));
}, },
_getStaticTitle: function (value) {
value = value || {};
var yearStr = (BI.isNull(value.year) || BI.isEmptyString(value.year)) ? "" : value.year + "-";
var monthStr = (BI.isNull(value.month) || BI.isEmptyString(value.month)) ? "" : value.month;
return yearStr + monthStr;
},
setValue: function (v) { setValue: function (v) {
var type, value; var type, value;
var date = BI.getDate(); var date = BI.getDate();
@ -22223,6 +22235,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
this.yearEditor.setTitle(value.year); this.yearEditor.setTitle(value.year);
this.monthEditor.setValue(month); this.monthEditor.setValue(month);
this.monthEditor.setTitle(month); this.monthEditor.setTitle(month);
this.setTitle(this._getStaticTitle(value));
break; break;
} }
}, },
@ -22589,11 +22602,10 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
obj.quarter = obj.quarter || 0; obj.quarter = obj.quarter || 0;
if (BI.checkDateVoid(obj.year, obj.quarter, 1, o.min, o.max)[0]) { if (BI.checkDateVoid(obj.year, obj.quarter, 1, o.min, o.max)[0]) {
var year = BI.getDate().getFullYear(); var year = BI.getDate().getFullYear();
var quarter = BI.getDate().getQuarter();
this.selectedYear = ""; this.selectedYear = "";
this.selectedQuarter = ""; this.selectedQuarter = "";
this.yearPicker.setValue(year); this.yearPicker.setValue(year);
this.quarter.setValue(quarter); this.quarter.setValue();
} else { } else {
this.selectedYear = BI.parseInt(obj.year); this.selectedYear = BI.parseInt(obj.year);
this.selectedQuarter = BI.parseInt(obj.quarter); this.selectedQuarter = BI.parseInt(obj.quarter);
@ -22848,7 +22860,7 @@ BI.extend(BI.DynamicYearQuarterCombo, {
cls: "bi-border-bottom", cls: "bi-border-bottom",
height: this.constants.tabHeight, height: this.constants.tabHeight,
items: BI.createItems([{ items: BI.createItems([{
text: BI.i18nText("BI-Basic_Year_Fen"), text: BI.i18nText("BI-Basic_Year_Quarter"),
value: BI.DynamicYearQuarterCombo.Static value: BI.DynamicYearQuarterCombo.Static
}, { }, {
text: BI.i18nText("BI-Basic_Dynamic_Title"), text: BI.i18nText("BI-Basic_Dynamic_Title"),
@ -23053,6 +23065,7 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
} }
}; };
} }
self.setTitle(self._getStaticTitle(self.storeValue.value));
self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM); self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM);
}); });
@ -23089,13 +23102,20 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
} }
}, },
_getStaticTitle: function (value) {
value = value || {};
var yearStr = (BI.isNull(value.year) || BI.isEmptyString(value.year)) ? "" : value.year + "-";
var quarterStr = (BI.isNull(value.quarter) || BI.isEmptyString(value.quarter)) ? "" : value.quarter;
return yearStr + quarterStr;
},
_getText: function (obj) { _getText: function (obj) {
var value = ""; var value = "";
if(BI.isNotNull(obj.year)) { if(BI.isNotNull(obj.year) && obj.year !== 0) {
value += Math.abs(obj.year) + BI.i18nText("BI-Basic_Year") + (obj.year < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind")); value += Math.abs(obj.year) + BI.i18nText("BI-Basic_Year") + (obj.year < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind"));
} }
if(BI.isNotNull(obj.quarter) && obj.quarter !== 0) { if(BI.isNotNull(obj.quarter) && obj.quarter !== 0) {
value += Math.abs(obj.quarter) + BI.i18nText("BI-Basic_Year") + (obj.quarter < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind")); value += Math.abs(obj.quarter) + BI.i18nText("BI-Basic_Single_Quarter") + (obj.quarter < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind"));
} }
return value; return value;
}, },
@ -23129,6 +23149,7 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
this.yearEditor.setTitle(value.year); this.yearEditor.setTitle(value.year);
this.quarterEditor.setValue(quarter); this.quarterEditor.setValue(quarter);
this.quarterEditor.setTitle(quarter); this.quarterEditor.setTitle(quarter);
this.setTitle(this._getStaticTitle(value));
break; break;
} }
}, },

3
public/js/index.js

@ -158,5 +158,6 @@ BI.i18n = {
"BI-Conf_Condition_Or": "或条件", "BI-Conf_Condition_Or": "或条件",
"BI-Microsoft_YaHei": "微软雅黑", "BI-Microsoft_YaHei": "微软雅黑",
"BI-Apple_Light": "苹方-light", "BI-Apple_Light": "苹方-light",
"BI-Font_Family": "字体" "BI-Font_Family": "字体",
"BI-Basic_Please_Input_Content": "请输入内容"
}; };

2
src/case/calendar/calendar.year.js

@ -130,7 +130,7 @@ BI.extend(BI.YearCalendar, {
}, },
getEndYear: function (year) { getEndYear: function (year) {
return BI.YearCalendar.getStartYear(year) + BI.YearCalendar.INTERVAL; return BI.YearCalendar.getStartYear(year) + BI.YearCalendar.INTERVAL - 1;
}, },
getPageByYear: function (year) { getPageByYear: function (year) {

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

@ -26,7 +26,7 @@ BI.DynamicDateParamItem = BI.inherit(BI.Widget, {
}, },
errorText: function (v) { errorText: function (v) {
if(BI.isEmptyString(v)) { if(BI.isEmptyString(v)) {
return BI.i18nText("BI-Basic_Input_Can_Not_Null"); return BI.i18nText("BI-Basic_Please_Input_Content");
} }
return BI.i18nText("BI-Please_Input_Positive_Integer"); return BI.i18nText("BI-Please_Input_Positive_Integer");
}, },

5
src/widget/numberinterval/numberinterval.js

@ -402,6 +402,9 @@ BI.NumberInterval = BI.inherit(BI.Single, {
} }
self.fireEvent(BI.NumberInterval.EVENT_CHANGE); self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
}); });
w.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.NumberInterval.EVENT_CONFIRM);
});
}, },
_setComboValueChangedEvent: function (w) { _setComboValueChangedEvent: function (w) {
@ -422,6 +425,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
break; break;
default : default :
self.fireEvent(BI.NumberInterval.EVENT_CHANGE); self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
self.fireEvent(BI.NumberInterval.EVENT_CONFIRM);
self.fireEvent(BI.NumberInterval.EVENT_VALID); self.fireEvent(BI.NumberInterval.EVENT_VALID);
} }
}); });
@ -524,6 +528,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
} }
}); });
BI.NumberInterval.EVENT_CHANGE = "EVENT_CHANGE"; BI.NumberInterval.EVENT_CHANGE = "EVENT_CHANGE";
BI.NumberInterval.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.NumberInterval.EVENT_VALID = "EVENT_VALID"; BI.NumberInterval.EVENT_VALID = "EVENT_VALID";
BI.NumberInterval.EVENT_ERROR = "EVENT_ERROR"; BI.NumberInterval.EVENT_ERROR = "EVENT_ERROR";
BI.shortcut("bi.number_interval", BI.NumberInterval); BI.shortcut("bi.number_interval", BI.NumberInterval);

2
src/widget/year/trigger.year.js

@ -125,7 +125,7 @@ BI.DynamicYearTrigger = BI.inherit(BI.Trigger, {
value = value || {}; value = value || {};
this.editor.setState(value.year); this.editor.setState(value.year);
this.editor.setValue(value.year); this.editor.setValue(value.year);
this.editor.setTitle(value.year); this.setTitle(value.year);
break; break;
} }
}, },

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

@ -100,11 +100,10 @@ BI.StaticYearMonthCard = BI.inherit(BI.Widget, {
obj.month = obj.month || 0; obj.month = obj.month || 0;
if (BI.checkDateVoid(obj.year, obj.month, 1, o.min, o.max)[0]) { if (BI.checkDateVoid(obj.year, obj.month, 1, o.min, o.max)[0]) {
var year = BI.getDate().getFullYear(); var year = BI.getDate().getFullYear();
var month = BI.getDate().getMonth();
this.selectedYear = ""; this.selectedYear = "";
this.selectedMonth = ""; this.selectedMonth = "";
this.yearPicker.setValue(year); this.yearPicker.setValue(year);
this.month.setValue(month); this.month.setValue();
} else { } else {
this.selectedYear = BI.parseInt(obj.year); this.selectedYear = BI.parseInt(obj.year);
this.selectedMonth = BI.parseInt(obj.month); this.selectedMonth = BI.parseInt(obj.month);

2
src/widget/yearmonth/popup.yearmonth.js

@ -99,7 +99,7 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
cls: "bi-border-bottom", cls: "bi-border-bottom",
height: this.constants.tabHeight, height: this.constants.tabHeight,
items: BI.createItems([{ items: BI.createItems([{
text: BI.i18nText("BI-Basic_Year_Fen"), text: BI.i18nText("BI-Basic_Year_Month"),
value: BI.DynamicYearCombo.Static value: BI.DynamicYearCombo.Static
}, { }, {
text: BI.i18nText("BI-Basic_Dynamic_Title"), text: BI.i18nText("BI-Basic_Dynamic_Title"),

13
src/widget/yearmonth/trigger.yearmonth.js

@ -99,6 +99,7 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
} }
}; };
} }
self.setTitle(self._getStaticTitle(self.storeValue.value));
self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM); self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM);
}); });
@ -146,11 +147,11 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
_getText: function (obj) { _getText: function (obj) {
var value = ""; var value = "";
if(BI.isNotNull(obj.year)) { if(BI.isNotNull(obj.year) && obj.year !== 0) {
value += Math.abs(obj.year) + BI.i18nText("BI-Basic_Year") + (obj.year < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind")); value += Math.abs(obj.year) + BI.i18nText("BI-Basic_Year") + (obj.year < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind"));
} }
if(BI.isNotNull(obj.month) && obj.month !== 0) { if(BI.isNotNull(obj.month) && obj.month !== 0) {
value += Math.abs(obj.month) + BI.i18nText("BI-Basic_Year") + (obj.month < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind")); value += Math.abs(obj.month) + BI.i18nText("BI-Basic_Month") + (obj.month < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind"));
} }
return value; return value;
}, },
@ -162,6 +163,13 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
this.setTitle(BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr)); this.setTitle(BI.isEmptyString(text) ? dateStr : (text + ":" + dateStr));
}, },
_getStaticTitle: function (value) {
value = value || {};
var yearStr = (BI.isNull(value.year) || BI.isEmptyString(value.year)) ? "" : value.year + "-";
var monthStr = (BI.isNull(value.month) || BI.isEmptyString(value.month)) ? "" : value.month;
return yearStr + monthStr;
},
setValue: function (v) { setValue: function (v) {
var type, value; var type, value;
var date = BI.getDate(); var date = BI.getDate();
@ -184,6 +192,7 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
this.yearEditor.setTitle(value.year); this.yearEditor.setTitle(value.year);
this.monthEditor.setValue(month); this.monthEditor.setValue(month);
this.monthEditor.setTitle(month); this.monthEditor.setTitle(month);
this.setTitle(this._getStaticTitle(value));
break; break;
} }
}, },

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

@ -92,11 +92,10 @@ BI.StaticYearQuarterCard = BI.inherit(BI.Widget, {
obj.quarter = obj.quarter || 0; obj.quarter = obj.quarter || 0;
if (BI.checkDateVoid(obj.year, obj.quarter, 1, o.min, o.max)[0]) { if (BI.checkDateVoid(obj.year, obj.quarter, 1, o.min, o.max)[0]) {
var year = BI.getDate().getFullYear(); var year = BI.getDate().getFullYear();
var quarter = BI.getDate().getQuarter();
this.selectedYear = ""; this.selectedYear = "";
this.selectedQuarter = ""; this.selectedQuarter = "";
this.yearPicker.setValue(year); this.yearPicker.setValue(year);
this.quarter.setValue(quarter); this.quarter.setValue();
} else { } else {
this.selectedYear = BI.parseInt(obj.year); this.selectedYear = BI.parseInt(obj.year);
this.selectedQuarter = BI.parseInt(obj.quarter); this.selectedQuarter = BI.parseInt(obj.quarter);

2
src/widget/yearquarter/popup.yearquarter.js

@ -92,7 +92,7 @@ BI.DynamicYearQuarterPopup = BI.inherit(BI.Widget, {
cls: "bi-border-bottom", cls: "bi-border-bottom",
height: this.constants.tabHeight, height: this.constants.tabHeight,
items: BI.createItems([{ items: BI.createItems([{
text: BI.i18nText("BI-Basic_Year_Fen"), text: BI.i18nText("BI-Basic_Year_Quarter"),
value: BI.DynamicYearQuarterCombo.Static value: BI.DynamicYearQuarterCombo.Static
}, { }, {
text: BI.i18nText("BI-Basic_Dynamic_Title"), text: BI.i18nText("BI-Basic_Dynamic_Title"),

13
src/widget/yearquarter/trigger.yearquarter.js

@ -99,6 +99,7 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {
} }
}; };
} }
self.setTitle(self._getStaticTitle(self.storeValue.value));
self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM); self.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM);
}); });
@ -135,13 +136,20 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {
} }
}, },
_getStaticTitle: function (value) {
value = value || {};
var yearStr = (BI.isNull(value.year) || BI.isEmptyString(value.year)) ? "" : value.year + "-";
var quarterStr = (BI.isNull(value.quarter) || BI.isEmptyString(value.quarter)) ? "" : value.quarter;
return yearStr + quarterStr;
},
_getText: function (obj) { _getText: function (obj) {
var value = ""; var value = "";
if(BI.isNotNull(obj.year)) { if(BI.isNotNull(obj.year) && obj.year !== 0) {
value += Math.abs(obj.year) + BI.i18nText("BI-Basic_Year") + (obj.year < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind")); value += Math.abs(obj.year) + BI.i18nText("BI-Basic_Year") + (obj.year < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind"));
} }
if(BI.isNotNull(obj.quarter) && obj.quarter !== 0) { if(BI.isNotNull(obj.quarter) && obj.quarter !== 0) {
value += Math.abs(obj.quarter) + BI.i18nText("BI-Basic_Year") + (obj.quarter < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind")); value += Math.abs(obj.quarter) + BI.i18nText("BI-Basic_Single_Quarter") + (obj.quarter < 0 ? BI.i18nText("BI-Basic_Front") : BI.i18nText("BI-Basic_Behind"));
} }
return value; return value;
}, },
@ -175,6 +183,7 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {
this.yearEditor.setTitle(value.year); this.yearEditor.setTitle(value.year);
this.quarterEditor.setValue(quarter); this.quarterEditor.setValue(quarter);
this.quarterEditor.setTitle(quarter); this.quarterEditor.setTitle(quarter);
this.setTitle(this._getStaticTitle(value));
break; break;
} }
}, },

3
ui/js/index.js

@ -158,5 +158,6 @@ BI.i18n = {
"BI-Conf_Condition_Or": "或条件", "BI-Conf_Condition_Or": "或条件",
"BI-Microsoft_YaHei": "微软雅黑", "BI-Microsoft_YaHei": "微软雅黑",
"BI-Apple_Light": "苹方-light", "BI-Apple_Light": "苹方-light",
"BI-Font_Family": "字体" "BI-Font_Family": "字体",
"BI-Basic_Please_Input_Content": "请输入内容"
}; };
Loading…
Cancel
Save