Browse Source

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	dist/_fineui.min.js
#	dist/bundle.min.js
#	dist/fineui.min.js
master
guy 7 years ago
parent
commit
85d6287cf1
  1. 2
      demo/js/widget/multiselect/demo.multi_select_tree.js
  2. 2
      demo/js/widget/numberinterval/demo.number_interval.js
  3. 14
      demo/js/widget/yearmonth/demo.year_month_combo.js
  4. 3
      demo/version.js
  5. 28
      dist/_fineui.min.js
  6. 67
      dist/bundle.js
  7. 28
      dist/bundle.min.js
  8. 2
      dist/case.js
  9. 3
      dist/config.js
  10. 18
      dist/demo.js
  11. 28
      dist/fineui.min.js
  12. 62
      dist/widget.js
  13. 3
      public/js/index.js
  14. 2
      src/case/calendar/calendar.year.js
  15. 2
      src/widget/dynamicdate/dynamicdate.param.item.js
  16. 9
      src/widget/editor/editor.search.js
  17. 2
      src/widget/multiselectlist/multiselectlist.insert.js
  18. 5
      src/widget/numberinterval/numberinterval.js
  19. 2
      src/widget/year/trigger.year.js
  20. 3
      src/widget/yearmonth/card.static.yearmonth.js
  21. 2
      src/widget/yearmonth/combo.yearmonth.js
  22. 2
      src/widget/yearmonth/popup.yearmonth.js
  23. 15
      src/widget/yearmonth/trigger.yearmonth.js
  24. 3
      src/widget/yearquarter/card.static.yearquarter.js
  25. 2
      src/widget/yearquarter/combo.yearquarter.js
  26. 2
      src/widget/yearquarter/popup.yearquarter.js
  27. 13
      src/widget/yearquarter/trigger.yearquarter.js
  28. 3
      ui/js/index.js

2
demo/js/widget/multiselect/demo.multi_select_tree.js

@ -13,7 +13,7 @@ Demo.MultiSelectList = BI.inherit(BI.Widget, {
_createMultiSelectCombo: function () {
var self = this;
var widget = BI.createWidget({
type: "bi.multi_select_list",
type: "bi.multi_select_insert_list",
ref: function (ref) {
self.list = ref;
},

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

@ -9,7 +9,7 @@ Demo.NumericalInterval = BI.inherit(BI.Widget, {
mounted: function () {
var numerical = this.numerical;
var label = this.label;
numerical.on(BI.NumberInterval.EVENT_CHANGE, function () {
numerical.on(BI.NumberInterval.EVENT_CONFIRM, function () {
var temp = numerical.getValue();
var res = "大于" + (temp.closemin ? "等于 " : " ") + temp.min + " 小于" + (temp.closemax ? "等于 " : " ") + temp.max;
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;
},
width: 300,
value: {
type: 1,
value: {
year: 2018,
month: 1
}
}
// value: {
// type: 1,
// value: {
// year: 2018,
// month: 1
// }
// }
}, {
type: "bi.button",
text: "getValue",

3
demo/version.js

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

28
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

67
dist/bundle.js vendored

@ -74127,7 +74127,7 @@ BI.extend(BI.YearCalendar, {
},
getEndYear: function (year) {
return BI.YearCalendar.getStartYear(year) + BI.YearCalendar.INTERVAL;
return BI.YearCalendar.getStartYear(year) + BI.YearCalendar.INTERVAL - 1;
},
getPageByYear: function (year) {
@ -90626,7 +90626,7 @@ BI.extend(BI.DynamicDateCombo, {
},
errorText: function (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");
},
@ -92195,6 +92195,15 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
}
},
getKeywords: function () {
var val = this.editor.getValue();
var keywords = val.match(/[\S]+/g);
if (BI.isEndWithBlank(val)) {
return keywords.concat([" "]);
}
return keywords;
},
getLastValidValue: function () {
return this.editor.getLastValidValue();
},
@ -98837,7 +98846,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Widget, {
}, {
eventName: BI.Searcher.EVENT_SEARCHING,
action: function () {
var keywords = this.getKeyword();
var keywords = this.getKeywords();
var last = BI.last(keywords);
keywords = BI.initial(keywords || []);
if (keywords.length > 0) {
@ -100908,6 +100917,9 @@ BI.NumberInterval = BI.inherit(BI.Single, {
}
self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
});
w.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.NumberInterval.EVENT_CONFIRM);
});
},
_setComboValueChangedEvent: function (w) {
@ -100928,6 +100940,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
break;
default :
self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
self.fireEvent(BI.NumberInterval.EVENT_CONFIRM);
self.fireEvent(BI.NumberInterval.EVENT_VALID);
}
});
@ -101030,6 +101043,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
}
});
BI.NumberInterval.EVENT_CHANGE = "EVENT_CHANGE";
BI.NumberInterval.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.NumberInterval.EVENT_VALID = "EVENT_VALID";
BI.NumberInterval.EVENT_ERROR = "EVENT_ERROR";
BI.shortcut("bi.number_interval", BI.NumberInterval);/**
@ -108347,7 +108361,7 @@ BI.shortcut("bi.dynamic_year_popup", BI.DynamicYearPopup);BI.DynamicYearTrigger
value = value || {};
this.editor.setState(value.year);
this.editor.setValue(value.year);
this.editor.setTitle(value.year);
this.setTitle(value.year);
break;
}
},
@ -108542,11 +108556,10 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
obj.month = obj.month || 0;
if (BI.checkDateVoid(obj.year, obj.month, 1, o.min, o.max)[0]) {
var year = BI.getDate().getFullYear();
var month = BI.getDate().getMonth();
this.selectedYear = "";
this.selectedMonth = "";
this.yearPicker.setValue(year);
this.month.setValue(month);
this.month.setValue();
} else {
this.selectedYear = BI.parseInt(obj.year);
this.selectedMonth = BI.parseInt(obj.month);
@ -108631,7 +108644,7 @@ BI.shortcut("bi.static_year_month_card", BI.StaticYearMonthCard);BI.DynamicYearM
eventName: BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE,
action: function () {
var date = BI.getDate();
self.setValue({year: date.getFullYear()});
self.setValue({year: date.getFullYear(), month: date.getMonth() + 1});
self.combo.hideView();
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);
}
@ -108826,7 +108839,7 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
cls: "bi-border-bottom",
height: this.constants.tabHeight,
items: BI.createItems([{
text: BI.i18nText("BI-Basic_Year_Fen"),
text: BI.i18nText("BI-Basic_Year_Month"),
value: BI.DynamicYearCombo.Static
}, {
text: BI.i18nText("BI-Basic_Dynamic_Title"),
@ -109027,10 +109040,11 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
type: BI.DynamicDateCombo.Static,
value: {
year: self.yearEditor.getValue(),
month: BI.isEmptyString(self.monthEditor.getValue()) ? "" : monthValue - 1
month: BI.isEmptyString(self.monthEditor.getValue()) ? "" : monthValue
}
};
}
self.setTitle(self._getStaticTitle(self.storeValue.value));
self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM);
});
@ -109078,11 +109092,11 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
_getText: function (obj) {
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"));
}
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;
},
@ -109094,6 +109108,13 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
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) {
var type, value;
var date = BI.getDate();
@ -109116,6 +109137,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
this.yearEditor.setTitle(value.year);
this.monthEditor.setValue(month);
this.monthEditor.setTitle(month);
this.setTitle(this._getStaticTitle(value));
break;
}
},
@ -109482,11 +109504,10 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
obj.quarter = obj.quarter || 0;
if (BI.checkDateVoid(obj.year, obj.quarter, 1, o.min, o.max)[0]) {
var year = BI.getDate().getFullYear();
var quarter = BI.getDate().getQuarter();
this.selectedYear = "";
this.selectedQuarter = "";
this.yearPicker.setValue(year);
this.quarter.setValue(quarter);
this.quarter.setValue();
} else {
this.selectedYear = BI.parseInt(obj.year);
this.selectedQuarter = BI.parseInt(obj.quarter);
@ -109564,7 +109585,7 @@ BI.shortcut("bi.static_year_quarter_card", BI.StaticYearQuarterCard);BI.DynamicY
eventName: BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE,
action: function () {
var date = BI.getDate();
self.setValue({year: date.getFullYear()});
self.setValue({year: date.getFullYear(), quarter: date.getQuarter()});
self.combo.hideView();
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);
}
@ -109741,7 +109762,7 @@ BI.extend(BI.DynamicYearQuarterCombo, {
cls: "bi-border-bottom",
height: this.constants.tabHeight,
items: BI.createItems([{
text: BI.i18nText("BI-Basic_Year_Fen"),
text: BI.i18nText("BI-Basic_Year_Quarter"),
value: BI.DynamicYearQuarterCombo.Static
}, {
text: BI.i18nText("BI-Basic_Dynamic_Title"),
@ -109946,6 +109967,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);
});
@ -109982,13 +110004,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) {
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"));
}
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;
},
@ -110022,6 +110051,7 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
this.yearEditor.setTitle(value.year);
this.quarterEditor.setValue(quarter);
this.quarterEditor.setTitle(quarter);
this.setTitle(this._getStaticTitle(value));
break;
}
},
@ -112176,5 +112206,6 @@ BI.i18n = {
"BI-Conf_Condition_Or": "或条件",
"BI-Microsoft_YaHei": "微软雅黑",
"BI-Apple_Light": "苹方-light",
"BI-Font_Family": "字体"
"BI-Font_Family": "字体",
"BI-Basic_Please_Input_Content": "请输入内容"
};

28
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) {
return BI.YearCalendar.getStartYear(year) + BI.YearCalendar.INTERVAL;
return BI.YearCalendar.getStartYear(year) + BI.YearCalendar.INTERVAL - 1;
},
getPageByYear: function (year) {

3
dist/config.js vendored

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

18
dist/demo.js vendored

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

28
dist/fineui.min.js vendored

File diff suppressed because one or more lines are too long

62
dist/widget.js vendored

@ -3725,7 +3725,7 @@ BI.extend(BI.DynamicDateCombo, {
},
errorText: function (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");
},
@ -5294,6 +5294,15 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
}
},
getKeywords: function () {
var val = this.editor.getValue();
var keywords = val.match(/[\S]+/g);
if (BI.isEndWithBlank(val)) {
return keywords.concat([" "]);
}
return keywords;
},
getLastValidValue: function () {
return this.editor.getLastValidValue();
},
@ -11936,7 +11945,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Widget, {
}, {
eventName: BI.Searcher.EVENT_SEARCHING,
action: function () {
var keywords = this.getKeyword();
var keywords = this.getKeywords();
var last = BI.last(keywords);
keywords = BI.initial(keywords || []);
if (keywords.length > 0) {
@ -14007,6 +14016,9 @@ BI.NumberInterval = BI.inherit(BI.Single, {
}
self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
});
w.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.NumberInterval.EVENT_CONFIRM);
});
},
_setComboValueChangedEvent: function (w) {
@ -14027,6 +14039,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
break;
default :
self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
self.fireEvent(BI.NumberInterval.EVENT_CONFIRM);
self.fireEvent(BI.NumberInterval.EVENT_VALID);
}
});
@ -14129,6 +14142,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
}
});
BI.NumberInterval.EVENT_CHANGE = "EVENT_CHANGE";
BI.NumberInterval.EVENT_CONFIRM = "EVENT_CONFIRM";
BI.NumberInterval.EVENT_VALID = "EVENT_VALID";
BI.NumberInterval.EVENT_ERROR = "EVENT_ERROR";
BI.shortcut("bi.number_interval", BI.NumberInterval);/**
@ -21446,7 +21460,7 @@ BI.shortcut("bi.dynamic_year_popup", BI.DynamicYearPopup);BI.DynamicYearTrigger
value = value || {};
this.editor.setState(value.year);
this.editor.setValue(value.year);
this.editor.setTitle(value.year);
this.setTitle(value.year);
break;
}
},
@ -21641,11 +21655,10 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
obj.month = obj.month || 0;
if (BI.checkDateVoid(obj.year, obj.month, 1, o.min, o.max)[0]) {
var year = BI.getDate().getFullYear();
var month = BI.getDate().getMonth();
this.selectedYear = "";
this.selectedMonth = "";
this.yearPicker.setValue(year);
this.month.setValue(month);
this.month.setValue();
} else {
this.selectedYear = BI.parseInt(obj.year);
this.selectedMonth = BI.parseInt(obj.month);
@ -21730,7 +21743,7 @@ BI.shortcut("bi.static_year_month_card", BI.StaticYearMonthCard);BI.DynamicYearM
eventName: BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE,
action: function () {
var date = BI.getDate();
self.setValue({year: date.getFullYear()});
self.setValue({year: date.getFullYear(), month: date.getMonth() + 1});
self.combo.hideView();
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);
}
@ -21925,7 +21938,7 @@ BI.DynamicYearMonthPopup = BI.inherit(BI.Widget, {
cls: "bi-border-bottom",
height: this.constants.tabHeight,
items: BI.createItems([{
text: BI.i18nText("BI-Basic_Year_Fen"),
text: BI.i18nText("BI-Basic_Year_Month"),
value: BI.DynamicYearCombo.Static
}, {
text: BI.i18nText("BI-Basic_Dynamic_Title"),
@ -22126,10 +22139,11 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
type: BI.DynamicDateCombo.Static,
value: {
year: self.yearEditor.getValue(),
month: BI.isEmptyString(self.monthEditor.getValue()) ? "" : monthValue - 1
month: BI.isEmptyString(self.monthEditor.getValue()) ? "" : monthValue
}
};
}
self.setTitle(self._getStaticTitle(self.storeValue.value));
self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM);
});
@ -22177,11 +22191,11 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
_getText: function (obj) {
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"));
}
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;
},
@ -22193,6 +22207,13 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
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) {
var type, value;
var date = BI.getDate();
@ -22215,6 +22236,7 @@ BI.shortcut("bi.dynamic_year_month_popup", BI.DynamicYearMonthPopup);BI.DynamicY
this.yearEditor.setTitle(value.year);
this.monthEditor.setValue(month);
this.monthEditor.setTitle(month);
this.setTitle(this._getStaticTitle(value));
break;
}
},
@ -22581,11 +22603,10 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
obj.quarter = obj.quarter || 0;
if (BI.checkDateVoid(obj.year, obj.quarter, 1, o.min, o.max)[0]) {
var year = BI.getDate().getFullYear();
var quarter = BI.getDate().getQuarter();
this.selectedYear = "";
this.selectedQuarter = "";
this.yearPicker.setValue(year);
this.quarter.setValue(quarter);
this.quarter.setValue();
} else {
this.selectedYear = BI.parseInt(obj.year);
this.selectedQuarter = BI.parseInt(obj.quarter);
@ -22663,7 +22684,7 @@ BI.shortcut("bi.static_year_quarter_card", BI.StaticYearQuarterCard);BI.DynamicY
eventName: BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE,
action: function () {
var date = BI.getDate();
self.setValue({year: date.getFullYear()});
self.setValue({year: date.getFullYear(), quarter: date.getQuarter()});
self.combo.hideView();
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);
}
@ -22840,7 +22861,7 @@ BI.extend(BI.DynamicYearQuarterCombo, {
cls: "bi-border-bottom",
height: this.constants.tabHeight,
items: BI.createItems([{
text: BI.i18nText("BI-Basic_Year_Fen"),
text: BI.i18nText("BI-Basic_Year_Quarter"),
value: BI.DynamicYearQuarterCombo.Static
}, {
text: BI.i18nText("BI-Basic_Dynamic_Title"),
@ -23045,6 +23066,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);
});
@ -23081,13 +23103,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) {
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"));
}
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;
},
@ -23121,6 +23150,7 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna
this.yearEditor.setTitle(value.year);
this.quarterEditor.setValue(quarter);
this.quarterEditor.setTitle(quarter);
this.setTitle(this._getStaticTitle(value));
break;
}
},

3
public/js/index.js

@ -158,5 +158,6 @@ BI.i18n = {
"BI-Conf_Condition_Or": "或条件",
"BI-Microsoft_YaHei": "微软雅黑",
"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) {
return BI.YearCalendar.getStartYear(year) + BI.YearCalendar.INTERVAL;
return BI.YearCalendar.getStartYear(year) + BI.YearCalendar.INTERVAL - 1;
},
getPageByYear: function (year) {

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

@ -26,7 +26,7 @@ BI.DynamicDateParamItem = BI.inherit(BI.Widget, {
},
errorText: function (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");
},

9
src/widget/editor/editor.search.js

@ -147,6 +147,15 @@ BI.SearchEditor = BI.inherit(BI.Widget, {
}
},
getKeywords: function () {
var val = this.editor.getValue();
var keywords = val.match(/[\S]+/g);
if (BI.isEndWithBlank(val)) {
return keywords.concat([" "]);
}
return keywords;
},
getLastValidValue: function () {
return this.editor.getLastValidValue();
},

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

@ -114,7 +114,7 @@ BI.MultiSelectInsertList = BI.inherit(BI.Widget, {
}, {
eventName: BI.Searcher.EVENT_SEARCHING,
action: function () {
var keywords = this.getKeyword();
var keywords = this.getKeywords();
var last = BI.last(keywords);
keywords = BI.initial(keywords || []);
if (keywords.length > 0) {

5
src/widget/numberinterval/numberinterval.js

@ -402,6 +402,9 @@ BI.NumberInterval = BI.inherit(BI.Single, {
}
self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
});
w.on(BI.Editor.EVENT_CONFIRM, function () {
self.fireEvent(BI.NumberInterval.EVENT_CONFIRM);
});
},
_setComboValueChangedEvent: function (w) {
@ -422,6 +425,7 @@ BI.NumberInterval = BI.inherit(BI.Single, {
break;
default :
self.fireEvent(BI.NumberInterval.EVENT_CHANGE);
self.fireEvent(BI.NumberInterval.EVENT_CONFIRM);
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_CONFIRM = "EVENT_CONFIRM";
BI.NumberInterval.EVENT_VALID = "EVENT_VALID";
BI.NumberInterval.EVENT_ERROR = "EVENT_ERROR";
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 || {};
this.editor.setState(value.year);
this.editor.setValue(value.year);
this.editor.setTitle(value.year);
this.setTitle(value.year);
break;
}
},

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

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

2
src/widget/yearmonth/combo.yearmonth.js

@ -73,7 +73,7 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
eventName: BI.DynamicYearMonthPopup.BUTTON_lABEL_EVENT_CHANGE,
action: function () {
var date = BI.getDate();
self.setValue({year: date.getFullYear()});
self.setValue({year: date.getFullYear(), month: date.getMonth() + 1});
self.combo.hideView();
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);
}

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

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

15
src/widget/yearmonth/trigger.yearmonth.js

@ -95,10 +95,11 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
type: BI.DynamicDateCombo.Static,
value: {
year: self.yearEditor.getValue(),
month: BI.isEmptyString(self.monthEditor.getValue()) ? "" : monthValue - 1
month: BI.isEmptyString(self.monthEditor.getValue()) ? "" : monthValue
}
};
}
self.setTitle(self._getStaticTitle(self.storeValue.value));
self.fireEvent(BI.DynamicYearMonthTrigger.EVENT_CONFIRM);
});
@ -146,11 +147,11 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
_getText: function (obj) {
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"));
}
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;
},
@ -162,6 +163,13 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
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) {
var type, value;
var date = BI.getDate();
@ -184,6 +192,7 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
this.yearEditor.setTitle(value.year);
this.monthEditor.setValue(month);
this.monthEditor.setTitle(month);
this.setTitle(this._getStaticTitle(value));
break;
}
},

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

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

2
src/widget/yearquarter/combo.yearquarter.js

@ -66,7 +66,7 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
eventName: BI.DynamicYearQuarterPopup.BUTTON_lABEL_EVENT_CHANGE,
action: function () {
var date = BI.getDate();
self.setValue({year: date.getFullYear()});
self.setValue({year: date.getFullYear(), quarter: date.getQuarter()});
self.combo.hideView();
self.fireEvent(BI.DynamicDateCombo.EVENT_CONFIRM);
}

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

@ -92,7 +92,7 @@ BI.DynamicYearQuarterPopup = BI.inherit(BI.Widget, {
cls: "bi-border-bottom",
height: this.constants.tabHeight,
items: BI.createItems([{
text: BI.i18nText("BI-Basic_Year_Fen"),
text: BI.i18nText("BI-Basic_Year_Quarter"),
value: BI.DynamicYearQuarterCombo.Static
}, {
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);
});
@ -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) {
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"));
}
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;
},
@ -175,6 +183,7 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {
this.yearEditor.setTitle(value.year);
this.quarterEditor.setValue(quarter);
this.quarterEditor.setTitle(quarter);
this.setTitle(this._getStaticTitle(value));
break;
}
},

3
ui/js/index.js

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