Browse Source

Merge branch 'master' into bugfix/BI-20841

# Conflicts:
#	dist/_fineui.min.js
#	dist/bundle.min.js
#	dist/fineui.min.js
es6
iapyang 7 years ago
parent
commit
1e78b991f0
  1. 2
      demo/js/widget/date/demo.multidate_combo.js
  2. 5
      demo/version.js
  3. 44
      dist/_fineui.min.js
  4. 7
      dist/base.js
  5. 111
      dist/bundle.js
  6. 1
      dist/case.js
  7. 5
      dist/config.js
  8. 2
      dist/demo.js
  9. 111
      dist/fineui.js
  10. 97
      dist/widget.js
  11. 6
      public/js/index.js
  12. 7
      src/base/single/single.js
  13. 1
      src/case/richeditor/plugins/combo.fontfamily.js
  14. 4
      src/widget/datepane/card.static.datepane.js
  15. 7
      src/widget/datetime/datetime.select.js
  16. 1
      src/widget/datetimepane/card.static.datetimepane.js
  17. 5
      src/widget/dynamicdate/dynamicdate.combo.js
  18. 5
      src/widget/dynamicdatetime/dynamicdatetime.combo.js
  19. 21
      src/widget/dynamicdatetime/dynamicdatetime.timeselect.js
  20. 2
      src/widget/intervalslider/intervalslider.js
  21. 2
      src/widget/multiselectlist/multiselectlist.insert.js
  22. 2
      src/widget/multiselecttree/multiselecttree.js
  23. 4
      src/widget/numberinterval/numberinterval.js
  24. 2
      src/widget/singleselect/singleselectlist.insert.js
  25. 14
      src/widget/yearmonth/card.static.yearmonth.js
  26. 7
      src/widget/yearmonth/combo.yearmonth.js
  27. 14
      src/widget/yearquarter/card.static.yearquarter.js
  28. 7
      src/widget/yearquarter/combo.yearquarter.js
  29. 6
      ui/js/index.js

2
demo/js/widget/date/demo.multidate_combo.js

@ -20,7 +20,7 @@ Demo.Date = BI.inherit(BI.Widget, {
ref: function () {
self.datecombo = this;
},
width: 300,
width: 300
// value: {
// type: 1,
// value: {

5
demo/version.js

@ -160,5 +160,8 @@ BI.i18n = {
"BI-Apple_Light": "苹方-light",
"BI-Font_Family": "字体",
"BI-Basic_Please_Input_Content": "请输入内容",
"BI-Basic_Please_Enter_Number_Between": "请输入{R1}-{R2}的值"
"BI-Basic_Please_Enter_Number_Between": "请输入{R1}-{R2}的值",
"BI-Word_Align_Center": "文字居中",
"BI-More_Than": "大于",
"BI-More_And_Equal": "大于等于"
};

44
dist/_fineui.min.js vendored

File diff suppressed because one or more lines are too long

7
dist/base.js vendored

@ -342,7 +342,8 @@ BI.Single = BI.inherit(BI.Widget, {
title: null,
warningTitle: null,
tipType: null, // success或warning
value: null
value: null,
belowMouse: false // title是否跟随鼠标
});
},
@ -371,7 +372,9 @@ BI.Single = BI.inherit(BI.Widget, {
var self = this, o = this.options;
if (BI.isKey(o.title) || BI.isKey(o.warningTitle)
|| BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) {
this.enableHover();
this.enableHover({
belowMouse: o.belowMouse
});
}
},

111
dist/bundle.js vendored

@ -36108,7 +36108,8 @@ BI.Single = BI.inherit(BI.Widget, {
title: null,
warningTitle: null,
tipType: null, // success或warning
value: null
value: null,
belowMouse: false // title是否跟随鼠标
});
},
@ -36137,7 +36138,9 @@ BI.Single = BI.inherit(BI.Widget, {
var self = this, o = this.options;
if (BI.isKey(o.title) || BI.isKey(o.warningTitle)
|| BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) {
this.enableHover();
this.enableHover({
belowMouse: o.belowMouse
});
}
},
@ -83941,7 +83944,6 @@ BI.shortcut("bi.rich_editor_color_chooser", BI.RichEditorColorChooser);BI.RichEd
el: this.trigger,
adjustLength: 1,
popup: {
maxWidth: 70,
minWidth: 70,
el: {
type: "bi.button_group",
@ -88685,9 +88687,9 @@ BI.StaticDatePaneCard = BI.inherit(BI.Widget, {
}
self.selectedTime = {
year: value.year,
month: value.month,
day: day
month: value.month
};
day !== 0 && (self.selectedTime.day = day);
self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime));
self.calendar.setValue(self.selectedTime);
day !== 0 && self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE);
@ -89224,7 +89226,12 @@ BI.DateTimeSelect = BI.inherit(BI.Widget, {
type: "bi.sign_editor",
value: this._alertInEditorValue(o.min),
allowBlank: false,
errorText: BI.i18nText("BI-Please_Input_Natural_Number"),
errorText: function (v) {
if(BI.isNumeric(v)) {
return BI.i18nText("BI-Please_Input_Natural_Number");
}
return BI.i18nText("BI-Numerical_Interval_Input_Data");
},
validationChecker: function (v) {
return BI.isNaturalNumber(v);
}
@ -89412,6 +89419,7 @@ BI.shortcut("bi.date_time_trigger", BI.DateTimeTrigger);BI.StaticDateTimePaneCar
month: value.month,
day: day
});
day !== 0 && (self.selectedTime.day = day);
self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime));
self.calendar.setValue(self.selectedTime);
day !== 0 && self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE);
@ -90869,10 +90877,7 @@ BI.extend(BI.DynamicDateCard, {
},
mounted: function () {
var o = this.options;
if(BI.isNotNull(o.value)) {
this._checkDynamicValue(o.value);
}
this._checkDynamicValue(this.storeValue);
},
_checkDynamicValue: function (v) {
@ -91732,10 +91737,7 @@ BI.shortcut("bi.dynamic_date_trigger", BI.DynamicDateTrigger);BI.DynamicDateTime
},
mounted: function () {
var o = this.options;
if(BI.isNotNull(o.value)) {
this._checkDynamicValue(o.value);
}
this._checkDynamicValue(this.storeValue);
},
_checkDynamicValue: function (v) {
@ -92043,8 +92045,11 @@ BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDat
validationChecker: function (v) {
return BI.isNaturalNumber(v) && BI.parseInt(v) < 24;
},
errorText: function () {
return BI.i18nText("BI-Basic_Input_From_To_Number", "\"00-23\"");
errorText: function (v) {
if(BI.isNumeric(v)) {
return BI.i18nText("BI-Basic_Input_From_To_Number", "\"00-23\"");
}
return BI.i18nText("BI-Numerical_Interval_Input_Data");
},
listeners: [{
eventName: BI.SignEditor.EVENT_CONFIRM,
@ -92077,8 +92082,11 @@ BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDat
validationChecker: function (v) {
return BI.isNaturalNumber(v) && BI.parseInt(v) < 60;
},
errorText: function () {
return BI.i18nText("BI-Basic_Input_From_To_Number", "\"00-59\"");
errorText: function (v) {
if(BI.isNumeric(v)) {
return BI.i18nText("BI-Basic_Input_From_To_Number", "\"00-59\"");
}
return BI.i18nText("BI-Numerical_Interval_Input_Data");
},
listeners: [{
eventName: BI.SignEditor.EVENT_CONFIRM,
@ -92109,8 +92117,11 @@ BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDat
validationChecker: function (v) {
return BI.isNaturalNumber(v) && BI.parseInt(v) < 60;
},
errorText: function () {
return BI.i18nText("BI-Basic_Input_From_To_Number", "\"00-59\"");
errorText: function (v) {
if(BI.isNumeric(v)) {
return BI.i18nText("BI-Basic_Input_From_To_Number", "\"00-59\"");
}
return BI.i18nText("BI-Numerical_Interval_Input_Data");
},
listeners: [{
eventName: BI.SignEditor.EVENT_CONFIRM,
@ -94724,7 +94735,7 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
},
_setErrorText: function () {
var errorText = BI.i18nText("BI-Please_Enter") + this.min + "-" + this.max + BI.i18nText("BI-Basic_De") + BI.i18nText("BI-Basic_Number");
var errorText = BI.i18nText("BI-Basic_Please_Enter_Number_Between", this.min, this.max);
this.labelOne.setErrorText(errorText);
this.labelTwo.setErrorText(errorText);
},
@ -99167,7 +99178,7 @@ BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW = "MultiSelectCheckSe
BI.shortcut("bi.multi_select_check_selected_switcher", BI.MultiSelectCheckSelectedSwitcher);/**
* Created by zcf_1 on 2017/5/2.
*/
BI.MultiSelectInsertList = BI.inherit(BI.Widget, {
BI.MultiSelectInsertList = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.MultiSelectInsertList.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-insert-list",
@ -99838,7 +99849,7 @@ BI.MultiSelectList.EVENT_CHANGE = "BI.MultiSelectList.EVENT_CHANGE";
BI.shortcut("bi.multi_select_list", BI.MultiSelectList);/**
* Created by zcf_1 on 2017/5/11.
*/
BI.MultiSelectTree = BI.inherit(BI.Widget, {
BI.MultiSelectTree = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.MultiSelectTree.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-tree",
@ -101083,11 +101094,11 @@ BI.NumberInterval = BI.inherit(BI.Single, {
cls: "number-interval-small-combo bi-border",
height: o.height - 2,
items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")",
text: "(" + BI.i18nText("BI-More_Than") + ")",
iconCls: "less-font",
value: 0
}, {
text: "(" + BI.i18nText("BI-Less_And_Equal") + ")",
text: "(" + BI.i18nText("BI-More_And_Equal") + ")",
value: 1,
iconCls: "less-equal-font"
}]
@ -104897,7 +104908,7 @@ BI.shortcut("bi.single_select_trigger", BI.SingleSelectTrigger);/**
* @createdAt: 2018/3/28
* @Description
*/
BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
BI.SingleSelectInsertList = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-insert-list",
@ -109001,18 +109012,18 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
setValue: function (obj) {
var o = this.options;
obj = obj || {};
obj.year = obj.year || 0;
obj.month = obj.month || 0;
if (obj.year === 0 || obj.month === 0 || BI.checkDateVoid(obj.year, obj.month, 1, o.min, o.max)[0]) {
var year = obj.year || BI.getDate().getFullYear();
var newObj = {};
newObj.year = obj.year || 0;
newObj.month = obj.month || 0;
if (newObj.year === 0 || newObj.month === 0 || BI.checkDateVoid(newObj.year, newObj.month, 1, o.min, o.max)[0]) {
var year = newObj.year || BI.getDate().getFullYear();
this.selectedYear = year;
this.selectedMonth = "";
this.yearPicker.setValue(year);
this.month.setValue();
} else {
this.selectedYear = BI.parseInt(obj.year);
this.selectedMonth = BI.parseInt(obj.month);
this.selectedYear = BI.parseInt(newObj.year);
this.selectedMonth = BI.parseInt(newObj.month);
this.yearPicker.setValue(this.selectedYear);
this.month.setValue(this.selectedMonth);
}
@ -109058,9 +109069,10 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
self.fireEvent(BI.DynamicYearMonthCombo.EVENT_VALID);
});
this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_CONFIRM, function () {
if (self.combo.isViewVisible()) {
return;
}
// 没看出来干啥的,先去掉
// if (self.combo.isViewVisible()) {
// return;
// }
var dateStore = self.storeTriggerValue;
var dateObj = self.trigger.getKey();
if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {
@ -110002,18 +110014,18 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
setValue: function (obj) {
var o = this.options;
obj = obj || {};
obj.year = obj.year || 0;
obj.quarter = obj.quarter || 0;
if (obj.quarter === 0 || obj.year === 0 || BI.checkDateVoid(obj.year, obj.quarter, 1, o.min, o.max)[0]) {
var year = obj.year || BI.getDate().getFullYear();
var newObj = {};
newObj.year = obj.year || 0;
newObj.quarter = obj.quarter || 0;
if (newObj.quarter === 0 || newObj.year === 0 || BI.checkDateVoid(newObj.year, newObj.quarter, 1, o.min, o.max)[0]) {
var year = newObj.year || BI.getDate().getFullYear();
this.selectedYear = year;
this.selectedQuarter = "";
this.yearPicker.setValue(year);
this.quarter.setValue();
} else {
this.selectedYear = BI.parseInt(obj.year);
this.selectedQuarter = BI.parseInt(obj.quarter);
this.selectedYear = BI.parseInt(newObj.year);
this.selectedQuarter = BI.parseInt(newObj.quarter);
this.yearPicker.setValue(this.selectedYear);
this.quarter.setValue(this.selectedQuarter);
}
@ -110055,9 +110067,10 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
self.combo.isViewVisible() && self.combo.hideView();
});
this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM, function () {
if (self.combo.isViewVisible()) {
return;
}
// 没看出来干啥的,先去掉
// if (self.combo.isViewVisible()) {
// return;
// }
var dateStore = self.storeTriggerValue;
var dateObj = self.trigger.getKey();
if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {
@ -112748,5 +112761,9 @@ BI.i18n = {
"BI-Microsoft_YaHei": "微软雅黑",
"BI-Apple_Light": "苹方-light",
"BI-Font_Family": "字体",
"BI-Basic_Please_Input_Content": "请输入内容"
"BI-Basic_Please_Input_Content": "请输入内容",
"BI-Word_Align_Center": "文字居中",
"BI-Basic_Please_Enter_Number_Between": "请输入{R1}-{R2}的值",
"BI-More_Than": "大于",
"BI-More_And_Equal": "大于等于"
};

1
dist/case.js vendored

@ -11468,7 +11468,6 @@ BI.shortcut("bi.rich_editor_color_chooser", BI.RichEditorColorChooser);BI.RichEd
el: this.trigger,
adjustLength: 1,
popup: {
maxWidth: 70,
minWidth: 70,
el: {
type: "bi.button_group",

5
dist/config.js vendored

@ -160,5 +160,8 @@ BI.i18n = {
"BI-Apple_Light": "苹方-light",
"BI-Font_Family": "字体",
"BI-Basic_Please_Input_Content": "请输入内容",
"BI-Basic_Please_Enter_Number_Between": "请输入{R1}-{R2}的值"
"BI-Basic_Please_Enter_Number_Between": "请输入{R1}-{R2}的值",
"BI-Word_Align_Center": "文字居中",
"BI-More_Than": "大于",
"BI-More_And_Equal": "大于等于"
};

2
dist/demo.js vendored

@ -12275,7 +12275,7 @@ Demo.Date = BI.inherit(BI.Widget, {
ref: function () {
self.datecombo = this;
},
width: 300,
width: 300
// value: {
// type: 1,
// value: {

111
dist/fineui.js vendored

@ -36351,7 +36351,8 @@ BI.Single = BI.inherit(BI.Widget, {
title: null,
warningTitle: null,
tipType: null, // success或warning
value: null
value: null,
belowMouse: false // title是否跟随鼠标
});
},
@ -36380,7 +36381,9 @@ BI.Single = BI.inherit(BI.Widget, {
var self = this, o = this.options;
if (BI.isKey(o.title) || BI.isKey(o.warningTitle)
|| BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) {
this.enableHover();
this.enableHover({
belowMouse: o.belowMouse
});
}
},
@ -84184,7 +84187,6 @@ BI.shortcut("bi.rich_editor_color_chooser", BI.RichEditorColorChooser);BI.RichEd
el: this.trigger,
adjustLength: 1,
popup: {
maxWidth: 70,
minWidth: 70,
el: {
type: "bi.button_group",
@ -88928,9 +88930,9 @@ BI.StaticDatePaneCard = BI.inherit(BI.Widget, {
}
self.selectedTime = {
year: value.year,
month: value.month,
day: day
month: value.month
};
day !== 0 && (self.selectedTime.day = day);
self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime));
self.calendar.setValue(self.selectedTime);
day !== 0 && self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE);
@ -89467,7 +89469,12 @@ BI.DateTimeSelect = BI.inherit(BI.Widget, {
type: "bi.sign_editor",
value: this._alertInEditorValue(o.min),
allowBlank: false,
errorText: BI.i18nText("BI-Please_Input_Natural_Number"),
errorText: function (v) {
if(BI.isNumeric(v)) {
return BI.i18nText("BI-Please_Input_Natural_Number");
}
return BI.i18nText("BI-Numerical_Interval_Input_Data");
},
validationChecker: function (v) {
return BI.isNaturalNumber(v);
}
@ -89655,6 +89662,7 @@ BI.shortcut("bi.date_time_trigger", BI.DateTimeTrigger);BI.StaticDateTimePaneCar
month: value.month,
day: day
});
day !== 0 && (self.selectedTime.day = day);
self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime));
self.calendar.setValue(self.selectedTime);
day !== 0 && self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE);
@ -91112,10 +91120,7 @@ BI.extend(BI.DynamicDateCard, {
},
mounted: function () {
var o = this.options;
if(BI.isNotNull(o.value)) {
this._checkDynamicValue(o.value);
}
this._checkDynamicValue(this.storeValue);
},
_checkDynamicValue: function (v) {
@ -91975,10 +91980,7 @@ BI.shortcut("bi.dynamic_date_trigger", BI.DynamicDateTrigger);BI.DynamicDateTime
},
mounted: function () {
var o = this.options;
if(BI.isNotNull(o.value)) {
this._checkDynamicValue(o.value);
}
this._checkDynamicValue(this.storeValue);
},
_checkDynamicValue: function (v) {
@ -92286,8 +92288,11 @@ BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDat
validationChecker: function (v) {
return BI.isNaturalNumber(v) && BI.parseInt(v) < 24;
},
errorText: function () {
return BI.i18nText("BI-Basic_Input_From_To_Number", "\"00-23\"");
errorText: function (v) {
if(BI.isNumeric(v)) {
return BI.i18nText("BI-Basic_Input_From_To_Number", "\"00-23\"");
}
return BI.i18nText("BI-Numerical_Interval_Input_Data");
},
listeners: [{
eventName: BI.SignEditor.EVENT_CONFIRM,
@ -92320,8 +92325,11 @@ BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDat
validationChecker: function (v) {
return BI.isNaturalNumber(v) && BI.parseInt(v) < 60;
},
errorText: function () {
return BI.i18nText("BI-Basic_Input_From_To_Number", "\"00-59\"");
errorText: function (v) {
if(BI.isNumeric(v)) {
return BI.i18nText("BI-Basic_Input_From_To_Number", "\"00-59\"");
}
return BI.i18nText("BI-Numerical_Interval_Input_Data");
},
listeners: [{
eventName: BI.SignEditor.EVENT_CONFIRM,
@ -92352,8 +92360,11 @@ BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDat
validationChecker: function (v) {
return BI.isNaturalNumber(v) && BI.parseInt(v) < 60;
},
errorText: function () {
return BI.i18nText("BI-Basic_Input_From_To_Number", "\"00-59\"");
errorText: function (v) {
if(BI.isNumeric(v)) {
return BI.i18nText("BI-Basic_Input_From_To_Number", "\"00-59\"");
}
return BI.i18nText("BI-Numerical_Interval_Input_Data");
},
listeners: [{
eventName: BI.SignEditor.EVENT_CONFIRM,
@ -94967,7 +94978,7 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
},
_setErrorText: function () {
var errorText = BI.i18nText("BI-Please_Enter") + this.min + "-" + this.max + BI.i18nText("BI-Basic_De") + BI.i18nText("BI-Basic_Number");
var errorText = BI.i18nText("BI-Basic_Please_Enter_Number_Between", this.min, this.max);
this.labelOne.setErrorText(errorText);
this.labelTwo.setErrorText(errorText);
},
@ -99410,7 +99421,7 @@ BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW = "MultiSelectCheckSe
BI.shortcut("bi.multi_select_check_selected_switcher", BI.MultiSelectCheckSelectedSwitcher);/**
* Created by zcf_1 on 2017/5/2.
*/
BI.MultiSelectInsertList = BI.inherit(BI.Widget, {
BI.MultiSelectInsertList = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.MultiSelectInsertList.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-insert-list",
@ -100081,7 +100092,7 @@ BI.MultiSelectList.EVENT_CHANGE = "BI.MultiSelectList.EVENT_CHANGE";
BI.shortcut("bi.multi_select_list", BI.MultiSelectList);/**
* Created by zcf_1 on 2017/5/11.
*/
BI.MultiSelectTree = BI.inherit(BI.Widget, {
BI.MultiSelectTree = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.MultiSelectTree.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-tree",
@ -101326,11 +101337,11 @@ BI.NumberInterval = BI.inherit(BI.Single, {
cls: "number-interval-small-combo bi-border",
height: o.height - 2,
items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")",
text: "(" + BI.i18nText("BI-More_Than") + ")",
iconCls: "less-font",
value: 0
}, {
text: "(" + BI.i18nText("BI-Less_And_Equal") + ")",
text: "(" + BI.i18nText("BI-More_And_Equal") + ")",
value: 1,
iconCls: "less-equal-font"
}]
@ -105140,7 +105151,7 @@ BI.shortcut("bi.single_select_trigger", BI.SingleSelectTrigger);/**
* @createdAt: 2018/3/28
* @Description
*/
BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
BI.SingleSelectInsertList = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-insert-list",
@ -109244,18 +109255,18 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
setValue: function (obj) {
var o = this.options;
obj = obj || {};
obj.year = obj.year || 0;
obj.month = obj.month || 0;
if (obj.year === 0 || obj.month === 0 || BI.checkDateVoid(obj.year, obj.month, 1, o.min, o.max)[0]) {
var year = obj.year || BI.getDate().getFullYear();
var newObj = {};
newObj.year = obj.year || 0;
newObj.month = obj.month || 0;
if (newObj.year === 0 || newObj.month === 0 || BI.checkDateVoid(newObj.year, newObj.month, 1, o.min, o.max)[0]) {
var year = newObj.year || BI.getDate().getFullYear();
this.selectedYear = year;
this.selectedMonth = "";
this.yearPicker.setValue(year);
this.month.setValue();
} else {
this.selectedYear = BI.parseInt(obj.year);
this.selectedMonth = BI.parseInt(obj.month);
this.selectedYear = BI.parseInt(newObj.year);
this.selectedMonth = BI.parseInt(newObj.month);
this.yearPicker.setValue(this.selectedYear);
this.month.setValue(this.selectedMonth);
}
@ -109301,9 +109312,10 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
self.fireEvent(BI.DynamicYearMonthCombo.EVENT_VALID);
});
this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_CONFIRM, function () {
if (self.combo.isViewVisible()) {
return;
}
// 没看出来干啥的,先去掉
// if (self.combo.isViewVisible()) {
// return;
// }
var dateStore = self.storeTriggerValue;
var dateObj = self.trigger.getKey();
if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {
@ -110245,18 +110257,18 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
setValue: function (obj) {
var o = this.options;
obj = obj || {};
obj.year = obj.year || 0;
obj.quarter = obj.quarter || 0;
if (obj.quarter === 0 || obj.year === 0 || BI.checkDateVoid(obj.year, obj.quarter, 1, o.min, o.max)[0]) {
var year = obj.year || BI.getDate().getFullYear();
var newObj = {};
newObj.year = obj.year || 0;
newObj.quarter = obj.quarter || 0;
if (newObj.quarter === 0 || newObj.year === 0 || BI.checkDateVoid(newObj.year, newObj.quarter, 1, o.min, o.max)[0]) {
var year = newObj.year || BI.getDate().getFullYear();
this.selectedYear = year;
this.selectedQuarter = "";
this.yearPicker.setValue(year);
this.quarter.setValue();
} else {
this.selectedYear = BI.parseInt(obj.year);
this.selectedQuarter = BI.parseInt(obj.quarter);
this.selectedYear = BI.parseInt(newObj.year);
this.selectedQuarter = BI.parseInt(newObj.quarter);
this.yearPicker.setValue(this.selectedYear);
this.quarter.setValue(this.selectedQuarter);
}
@ -110298,9 +110310,10 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
self.combo.isViewVisible() && self.combo.hideView();
});
this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM, function () {
if (self.combo.isViewVisible()) {
return;
}
// 没看出来干啥的,先去掉
// if (self.combo.isViewVisible()) {
// return;
// }
var dateStore = self.storeTriggerValue;
var dateObj = self.trigger.getKey();
if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {
@ -112991,5 +113004,9 @@ BI.i18n = {
"BI-Microsoft_YaHei": "微软雅黑",
"BI-Apple_Light": "苹方-light",
"BI-Font_Family": "字体",
"BI-Basic_Please_Input_Content": "请输入内容"
"BI-Basic_Please_Input_Content": "请输入内容",
"BI-Word_Align_Center": "文字居中",
"BI-Basic_Please_Enter_Number_Between": "请输入{R1}-{R2}的值",
"BI-More_Than": "大于",
"BI-More_And_Equal": "大于等于"
};

97
dist/widget.js vendored

@ -1127,9 +1127,9 @@ BI.StaticDatePaneCard = BI.inherit(BI.Widget, {
}
self.selectedTime = {
year: value.year,
month: value.month,
day: day
month: value.month
};
day !== 0 && (self.selectedTime.day = day);
self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime));
self.calendar.setValue(self.selectedTime);
day !== 0 && self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE);
@ -1666,7 +1666,12 @@ BI.DateTimeSelect = BI.inherit(BI.Widget, {
type: "bi.sign_editor",
value: this._alertInEditorValue(o.min),
allowBlank: false,
errorText: BI.i18nText("BI-Please_Input_Natural_Number"),
errorText: function (v) {
if(BI.isNumeric(v)) {
return BI.i18nText("BI-Please_Input_Natural_Number");
}
return BI.i18nText("BI-Numerical_Interval_Input_Data");
},
validationChecker: function (v) {
return BI.isNaturalNumber(v);
}
@ -1854,6 +1859,7 @@ BI.shortcut("bi.date_time_trigger", BI.DateTimeTrigger);BI.StaticDateTimePaneCar
month: value.month,
day: day
});
day !== 0 && (self.selectedTime.day = day);
self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime));
self.calendar.setValue(self.selectedTime);
day !== 0 && self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE);
@ -3311,10 +3317,7 @@ BI.extend(BI.DynamicDateCard, {
},
mounted: function () {
var o = this.options;
if(BI.isNotNull(o.value)) {
this._checkDynamicValue(o.value);
}
this._checkDynamicValue(this.storeValue);
},
_checkDynamicValue: function (v) {
@ -4174,10 +4177,7 @@ BI.shortcut("bi.dynamic_date_trigger", BI.DynamicDateTrigger);BI.DynamicDateTime
},
mounted: function () {
var o = this.options;
if(BI.isNotNull(o.value)) {
this._checkDynamicValue(o.value);
}
this._checkDynamicValue(this.storeValue);
},
_checkDynamicValue: function (v) {
@ -4485,8 +4485,11 @@ BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDat
validationChecker: function (v) {
return BI.isNaturalNumber(v) && BI.parseInt(v) < 24;
},
errorText: function () {
return BI.i18nText("BI-Basic_Input_From_To_Number", "\"00-23\"");
errorText: function (v) {
if(BI.isNumeric(v)) {
return BI.i18nText("BI-Basic_Input_From_To_Number", "\"00-23\"");
}
return BI.i18nText("BI-Numerical_Interval_Input_Data");
},
listeners: [{
eventName: BI.SignEditor.EVENT_CONFIRM,
@ -4519,8 +4522,11 @@ BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDat
validationChecker: function (v) {
return BI.isNaturalNumber(v) && BI.parseInt(v) < 60;
},
errorText: function () {
return BI.i18nText("BI-Basic_Input_From_To_Number", "\"00-59\"");
errorText: function (v) {
if(BI.isNumeric(v)) {
return BI.i18nText("BI-Basic_Input_From_To_Number", "\"00-59\"");
}
return BI.i18nText("BI-Numerical_Interval_Input_Data");
},
listeners: [{
eventName: BI.SignEditor.EVENT_CONFIRM,
@ -4551,8 +4557,11 @@ BI.shortcut("bi.dynamic_date_time_popup", BI.DynamicDateTimePopup);BI.DynamicDat
validationChecker: function (v) {
return BI.isNaturalNumber(v) && BI.parseInt(v) < 60;
},
errorText: function () {
return BI.i18nText("BI-Basic_Input_From_To_Number", "\"00-59\"");
errorText: function (v) {
if(BI.isNumeric(v)) {
return BI.i18nText("BI-Basic_Input_From_To_Number", "\"00-59\"");
}
return BI.i18nText("BI-Numerical_Interval_Input_Data");
},
listeners: [{
eventName: BI.SignEditor.EVENT_CONFIRM,
@ -7166,7 +7175,7 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
},
_setErrorText: function () {
var errorText = BI.i18nText("BI-Please_Enter") + this.min + "-" + this.max + BI.i18nText("BI-Basic_De") + BI.i18nText("BI-Basic_Number");
var errorText = BI.i18nText("BI-Basic_Please_Enter_Number_Between", this.min, this.max);
this.labelOne.setErrorText(errorText);
this.labelTwo.setErrorText(errorText);
},
@ -11609,7 +11618,7 @@ BI.MultiSelectCheckSelectedSwitcher.EVENT_BEFORE_POPUPVIEW = "MultiSelectCheckSe
BI.shortcut("bi.multi_select_check_selected_switcher", BI.MultiSelectCheckSelectedSwitcher);/**
* Created by zcf_1 on 2017/5/2.
*/
BI.MultiSelectInsertList = BI.inherit(BI.Widget, {
BI.MultiSelectInsertList = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.MultiSelectInsertList.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-insert-list",
@ -12280,7 +12289,7 @@ BI.MultiSelectList.EVENT_CHANGE = "BI.MultiSelectList.EVENT_CHANGE";
BI.shortcut("bi.multi_select_list", BI.MultiSelectList);/**
* Created by zcf_1 on 2017/5/11.
*/
BI.MultiSelectTree = BI.inherit(BI.Widget, {
BI.MultiSelectTree = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.MultiSelectTree.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-tree",
@ -13525,11 +13534,11 @@ BI.NumberInterval = BI.inherit(BI.Single, {
cls: "number-interval-small-combo bi-border",
height: o.height - 2,
items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")",
text: "(" + BI.i18nText("BI-More_Than") + ")",
iconCls: "less-font",
value: 0
}, {
text: "(" + BI.i18nText("BI-Less_And_Equal") + ")",
text: "(" + BI.i18nText("BI-More_And_Equal") + ")",
value: 1,
iconCls: "less-equal-font"
}]
@ -17339,7 +17348,7 @@ BI.shortcut("bi.single_select_trigger", BI.SingleSelectTrigger);/**
* @createdAt: 2018/3/28
* @Description
*/
BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
BI.SingleSelectInsertList = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-insert-list",
@ -21443,18 +21452,18 @@ BI.shortcut("bi.dynamic_year_month_card", BI.DynamicYearMonthCard);BI.StaticYear
setValue: function (obj) {
var o = this.options;
obj = obj || {};
obj.year = obj.year || 0;
obj.month = obj.month || 0;
if (obj.year === 0 || obj.month === 0 || BI.checkDateVoid(obj.year, obj.month, 1, o.min, o.max)[0]) {
var year = obj.year || BI.getDate().getFullYear();
var newObj = {};
newObj.year = obj.year || 0;
newObj.month = obj.month || 0;
if (newObj.year === 0 || newObj.month === 0 || BI.checkDateVoid(newObj.year, newObj.month, 1, o.min, o.max)[0]) {
var year = newObj.year || BI.getDate().getFullYear();
this.selectedYear = year;
this.selectedMonth = "";
this.yearPicker.setValue(year);
this.month.setValue();
} else {
this.selectedYear = BI.parseInt(obj.year);
this.selectedMonth = BI.parseInt(obj.month);
this.selectedYear = BI.parseInt(newObj.year);
this.selectedMonth = BI.parseInt(newObj.month);
this.yearPicker.setValue(this.selectedYear);
this.month.setValue(this.selectedMonth);
}
@ -21500,9 +21509,10 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
self.fireEvent(BI.DynamicYearMonthCombo.EVENT_VALID);
});
this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_CONFIRM, function () {
if (self.combo.isViewVisible()) {
return;
}
// 没看出来干啥的,先去掉
// if (self.combo.isViewVisible()) {
// return;
// }
var dateStore = self.storeTriggerValue;
var dateObj = self.trigger.getKey();
if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {
@ -22444,18 +22454,18 @@ BI.shortcut("bi.dynamic_year_quarter_card", BI.DynamicYearQuarterCard);BI.Static
setValue: function (obj) {
var o = this.options;
obj = obj || {};
obj.year = obj.year || 0;
obj.quarter = obj.quarter || 0;
if (obj.quarter === 0 || obj.year === 0 || BI.checkDateVoid(obj.year, obj.quarter, 1, o.min, o.max)[0]) {
var year = obj.year || BI.getDate().getFullYear();
var newObj = {};
newObj.year = obj.year || 0;
newObj.quarter = obj.quarter || 0;
if (newObj.quarter === 0 || newObj.year === 0 || BI.checkDateVoid(newObj.year, newObj.quarter, 1, o.min, o.max)[0]) {
var year = newObj.year || BI.getDate().getFullYear();
this.selectedYear = year;
this.selectedQuarter = "";
this.yearPicker.setValue(year);
this.quarter.setValue();
} else {
this.selectedYear = BI.parseInt(obj.year);
this.selectedQuarter = BI.parseInt(obj.quarter);
this.selectedYear = BI.parseInt(newObj.year);
this.selectedQuarter = BI.parseInt(newObj.quarter);
this.yearPicker.setValue(this.selectedYear);
this.quarter.setValue(this.selectedQuarter);
}
@ -22497,9 +22507,10 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
self.combo.isViewVisible() && self.combo.hideView();
});
this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM, function () {
if (self.combo.isViewVisible()) {
return;
}
// 没看出来干啥的,先去掉
// if (self.combo.isViewVisible()) {
// return;
// }
var dateStore = self.storeTriggerValue;
var dateObj = self.trigger.getKey();
if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {

6
public/js/index.js

@ -159,5 +159,9 @@ BI.i18n = {
"BI-Microsoft_YaHei": "微软雅黑",
"BI-Apple_Light": "苹方-light",
"BI-Font_Family": "字体",
"BI-Basic_Please_Input_Content": "请输入内容"
"BI-Basic_Please_Input_Content": "请输入内容",
"BI-Word_Align_Center": "文字居中",
"BI-Basic_Please_Enter_Number_Between": "请输入{R1}-{R2}的值",
"BI-More_Than": "大于",
"BI-More_And_Equal": "大于等于"
};

7
src/base/single/single.js

@ -18,7 +18,8 @@ BI.Single = BI.inherit(BI.Widget, {
title: null,
warningTitle: null,
tipType: null, // success或warning
value: null
value: null,
belowMouse: false // title是否跟随鼠标
});
},
@ -47,7 +48,9 @@ BI.Single = BI.inherit(BI.Widget, {
var self = this, o = this.options;
if (BI.isKey(o.title) || BI.isKey(o.warningTitle)
|| BI.isFunction(o.title) || BI.isFunction(o.warningTitle)) {
this.enableHover();
this.enableHover({
belowMouse: o.belowMouse
});
}
},

1
src/case/richeditor/plugins/combo.fontfamily.js

@ -25,7 +25,6 @@ BI.RichEditorFontChooser = BI.inherit(BI.RichEditorAction, {
el: this.trigger,
adjustLength: 1,
popup: {
maxWidth: 70,
minWidth: 70,
el: {
type: "bi.button_group",

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

@ -38,9 +38,9 @@ BI.StaticDatePaneCard = BI.inherit(BI.Widget, {
}
self.selectedTime = {
year: value.year,
month: value.month,
day: day
month: value.month
};
day !== 0 && (self.selectedTime.day = day);
self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime));
self.calendar.setValue(self.selectedTime);
day !== 0 && self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE);

7
src/widget/datetime/datetime.select.js

@ -17,7 +17,12 @@ BI.DateTimeSelect = BI.inherit(BI.Widget, {
type: "bi.sign_editor",
value: this._alertInEditorValue(o.min),
allowBlank: false,
errorText: BI.i18nText("BI-Please_Input_Natural_Number"),
errorText: function (v) {
if(BI.isNumeric(v)) {
return BI.i18nText("BI-Please_Input_Natural_Number");
}
return BI.i18nText("BI-Numerical_Interval_Input_Data");
},
validationChecker: function (v) {
return BI.isNaturalNumber(v);
}

1
src/widget/datetimepane/card.static.datetimepane.js

@ -38,6 +38,7 @@ BI.StaticDateTimePaneCard = BI.inherit(BI.Widget, {
month: value.month,
day: day
});
day !== 0 && (self.selectedTime.day = day);
self.calendar.setSelect(BI.Calendar.getPageByDateJSON(self.selectedTime));
self.calendar.setValue(self.selectedTime);
day !== 0 && self.fireEvent(BI.DateCalendarPopup.EVENT_CHANGE);

5
src/widget/dynamicdate/dynamicdate.combo.js

@ -211,10 +211,7 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, {
},
mounted: function () {
var o = this.options;
if(BI.isNotNull(o.value)) {
this._checkDynamicValue(o.value);
}
this._checkDynamicValue(this.storeValue);
},
_checkDynamicValue: function (v) {

5
src/widget/dynamicdatetime/dynamicdatetime.combo.js

@ -214,10 +214,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, {
},
mounted: function () {
var o = this.options;
if(BI.isNotNull(o.value)) {
this._checkDynamicValue(o.value);
}
this._checkDynamicValue(this.storeValue);
},
_checkDynamicValue: function (v) {

21
src/widget/dynamicdatetime/dynamicdatetime.timeselect.js

@ -19,8 +19,11 @@ BI.DynamicDateTimeSelect = BI.inherit(BI.Widget, {
validationChecker: function (v) {
return BI.isNaturalNumber(v) && BI.parseInt(v) < 24;
},
errorText: function () {
return BI.i18nText("BI-Basic_Input_From_To_Number", "\"00-23\"");
errorText: function (v) {
if(BI.isNumeric(v)) {
return BI.i18nText("BI-Basic_Input_From_To_Number", "\"00-23\"");
}
return BI.i18nText("BI-Numerical_Interval_Input_Data");
},
listeners: [{
eventName: BI.SignEditor.EVENT_CONFIRM,
@ -53,8 +56,11 @@ BI.DynamicDateTimeSelect = BI.inherit(BI.Widget, {
validationChecker: function (v) {
return BI.isNaturalNumber(v) && BI.parseInt(v) < 60;
},
errorText: function () {
return BI.i18nText("BI-Basic_Input_From_To_Number", "\"00-59\"");
errorText: function (v) {
if(BI.isNumeric(v)) {
return BI.i18nText("BI-Basic_Input_From_To_Number", "\"00-59\"");
}
return BI.i18nText("BI-Numerical_Interval_Input_Data");
},
listeners: [{
eventName: BI.SignEditor.EVENT_CONFIRM,
@ -85,8 +91,11 @@ BI.DynamicDateTimeSelect = BI.inherit(BI.Widget, {
validationChecker: function (v) {
return BI.isNaturalNumber(v) && BI.parseInt(v) < 60;
},
errorText: function () {
return BI.i18nText("BI-Basic_Input_From_To_Number", "\"00-59\"");
errorText: function (v) {
if(BI.isNumeric(v)) {
return BI.i18nText("BI-Basic_Input_From_To_Number", "\"00-59\"");
}
return BI.i18nText("BI-Numerical_Interval_Input_Data");
},
listeners: [{
eventName: BI.SignEditor.EVENT_CONFIRM,

2
src/widget/intervalslider/intervalslider.js

@ -383,7 +383,7 @@ BI.IntervalSlider = BI.inherit(BI.Widget, {
},
_setErrorText: function () {
var errorText = BI.i18nText("BI-Please_Enter") + this.min + "-" + this.max + BI.i18nText("BI-Basic_De") + BI.i18nText("BI-Basic_Number");
var errorText = BI.i18nText("BI-Basic_Please_Enter_Number_Between", this.min, this.max);
this.labelOne.setErrorText(errorText);
this.labelTwo.setErrorText(errorText);
},

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

@ -1,7 +1,7 @@
/**
* Created by zcf_1 on 2017/5/2.
*/
BI.MultiSelectInsertList = BI.inherit(BI.Widget, {
BI.MultiSelectInsertList = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.MultiSelectInsertList.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-insert-list",

2
src/widget/multiselecttree/multiselecttree.js

@ -1,7 +1,7 @@
/**
* Created by zcf_1 on 2017/5/11.
*/
BI.MultiSelectTree = BI.inherit(BI.Widget, {
BI.MultiSelectTree = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.MultiSelectTree.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-tree",

4
src/widget/numberinterval/numberinterval.js

@ -124,11 +124,11 @@ BI.NumberInterval = BI.inherit(BI.Single, {
cls: "number-interval-small-combo bi-border",
height: o.height - 2,
items: [{
text: "(" + BI.i18nText("BI-Less_Than") + ")",
text: "(" + BI.i18nText("BI-More_Than") + ")",
iconCls: "less-font",
value: 0
}, {
text: "(" + BI.i18nText("BI-Less_And_Equal") + ")",
text: "(" + BI.i18nText("BI-More_And_Equal") + ")",
value: 1,
iconCls: "less-equal-font"
}]

2
src/widget/singleselect/singleselectlist.insert.js

@ -3,7 +3,7 @@
* @createdAt: 2018/3/28
* @Description
*/
BI.SingleSelectInsertList = BI.inherit(BI.Widget, {
BI.SingleSelectInsertList = BI.inherit(BI.Single, {
_defaultConfig: function () {
return BI.extend(BI.SingleSelectInsertList.superclass._defaultConfig.apply(this, arguments), {
baseCls: "bi-multi-select-insert-list",

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

@ -96,18 +96,18 @@ BI.StaticYearMonthCard = BI.inherit(BI.Widget, {
setValue: function (obj) {
var o = this.options;
obj = obj || {};
obj.year = obj.year || 0;
obj.month = obj.month || 0;
if (obj.year === 0 || obj.month === 0 || BI.checkDateVoid(obj.year, obj.month, 1, o.min, o.max)[0]) {
var year = obj.year || BI.getDate().getFullYear();
var newObj = {};
newObj.year = obj.year || 0;
newObj.month = obj.month || 0;
if (newObj.year === 0 || newObj.month === 0 || BI.checkDateVoid(newObj.year, newObj.month, 1, o.min, o.max)[0]) {
var year = newObj.year || BI.getDate().getFullYear();
this.selectedYear = year;
this.selectedMonth = "";
this.yearPicker.setValue(year);
this.month.setValue();
} else {
this.selectedYear = BI.parseInt(obj.year);
this.selectedMonth = BI.parseInt(obj.month);
this.selectedYear = BI.parseInt(newObj.year);
this.selectedMonth = BI.parseInt(newObj.month);
this.yearPicker.setValue(this.selectedYear);
this.month.setValue(this.selectedMonth);
}

7
src/widget/yearmonth/combo.yearmonth.js

@ -36,9 +36,10 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
self.fireEvent(BI.DynamicYearMonthCombo.EVENT_VALID);
});
this.trigger.on(BI.DynamicYearMonthTrigger.EVENT_CONFIRM, function () {
if (self.combo.isViewVisible()) {
return;
}
// 没看出来干啥的,先去掉
// if (self.combo.isViewVisible()) {
// return;
// }
var dateStore = self.storeTriggerValue;
var dateObj = self.trigger.getKey();
if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {

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

@ -88,18 +88,18 @@ BI.StaticYearQuarterCard = BI.inherit(BI.Widget, {
setValue: function (obj) {
var o = this.options;
obj = obj || {};
obj.year = obj.year || 0;
obj.quarter = obj.quarter || 0;
if (obj.quarter === 0 || obj.year === 0 || BI.checkDateVoid(obj.year, obj.quarter, 1, o.min, o.max)[0]) {
var year = obj.year || BI.getDate().getFullYear();
var newObj = {};
newObj.year = obj.year || 0;
newObj.quarter = obj.quarter || 0;
if (newObj.quarter === 0 || newObj.year === 0 || BI.checkDateVoid(newObj.year, newObj.quarter, 1, o.min, o.max)[0]) {
var year = newObj.year || BI.getDate().getFullYear();
this.selectedYear = year;
this.selectedQuarter = "";
this.yearPicker.setValue(year);
this.quarter.setValue();
} else {
this.selectedYear = BI.parseInt(obj.year);
this.selectedQuarter = BI.parseInt(obj.quarter);
this.selectedYear = BI.parseInt(newObj.year);
this.selectedQuarter = BI.parseInt(newObj.quarter);
this.yearPicker.setValue(this.selectedYear);
this.quarter.setValue(this.selectedQuarter);
}

7
src/widget/yearquarter/combo.yearquarter.js

@ -32,9 +32,10 @@ BI.DynamicYearQuarterCombo = BI.inherit(BI.Widget, {
self.combo.isViewVisible() && self.combo.hideView();
});
this.trigger.on(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM, function () {
if (self.combo.isViewVisible()) {
return;
}
// 没看出来干啥的,先去掉
// if (self.combo.isViewVisible()) {
// return;
// }
var dateStore = self.storeTriggerValue;
var dateObj = self.trigger.getKey();
if (BI.isNotEmptyString(dateObj) && !BI.isEqual(dateObj, dateStore)) {

6
ui/js/index.js

@ -159,5 +159,9 @@ BI.i18n = {
"BI-Microsoft_YaHei": "微软雅黑",
"BI-Apple_Light": "苹方-light",
"BI-Font_Family": "字体",
"BI-Basic_Please_Input_Content": "请输入内容"
"BI-Basic_Please_Input_Content": "请输入内容",
"BI-Word_Align_Center": "文字居中",
"BI-Basic_Please_Enter_Number_Between": "请输入{R1}-{R2}的值",
"BI-More_Than": "大于",
"BI-More_And_Equal": "大于等于"
};
Loading…
Cancel
Save