Browse Source

无JIRA任务 处理工作日输入框的标红

es6
windy 4 years ago
parent
commit
42d1e3f438
  1. 3
      src/widget/dynamicdate/dynamicdate.card.js
  2. 2
      src/widget/yearmonth/combo.yearmonth.js
  3. 2
      src/widget/yearmonth/trigger.yearmonth.js
  4. 2
      src/widget/yearmonthinterval/yearmonthinterval.js

3
src/widget/dynamicdate/dynamicdate.card.js

@ -298,6 +298,9 @@ BI.DynamicDateCard = BI.inherit(BI.Widget, {
case BI.DynamicDateCard.TYPE.DAY: case BI.DynamicDateCard.TYPE.DAY:
valueMap.day = (value.offset === 0 ? -value.value : value.value); valueMap.day = (value.offset === 0 ? -value.value : value.value);
break; break;
case BI.DynamicDateCard.TYPE.WORK_DAY:
valueMap.workDay = (value.offset === 0 ? -value.value : value.value);
break;
default: default:
break; break;
} }

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

@ -188,7 +188,7 @@ BI.DynamicYearMonthCombo = BI.inherit(BI.Single, {
return this.trigger.getKey(); return this.trigger.getKey();
}, },
isValid: function () { isStateValid: function () {
return this.trigger.isValid(); return this.trigger.isValid();
} }

2
src/widget/yearmonth/trigger.yearmonth.js

@ -259,7 +259,7 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
return this.yearEditor.getValue() + "-" + this.monthEditor.getValue(); return this.yearEditor.getValue() + "-" + this.monthEditor.getValue();
}, },
isValid: function () { isStateValid: function () {
return this.yearEditor.isValid() && this.monthEditor.isValid(); return this.yearEditor.isValid() && this.monthEditor.isValid();
} }
}); });

2
src/widget/yearmonthinterval/yearmonthinterval.js

@ -100,7 +100,7 @@ BI.YearMonthInterval = BI.inherit(BI.Single, {
combo.on(BI.DynamicYearMonthCombo.EVENT_CONFIRM, function () { combo.on(BI.DynamicYearMonthCombo.EVENT_CONFIRM, function () {
BI.Bubbles.hide("error"); BI.Bubbles.hide("error");
var smallDate = self.left.getKey(), bigDate = self.right.getKey(); var smallDate = self.left.getKey(), bigDate = self.right.getKey();
if (self.left.isValid() && self.right.isValid() && self._check(smallDate, bigDate) && self._compare(smallDate, bigDate)) { if (self.left.isStateValid() && self.right.isStateValid() && self._check(smallDate, bigDate) && self._compare(smallDate, bigDate)) {
self._setTitle(BI.i18nText("BI-Time_Interval_Error_Text")); self._setTitle(BI.i18nText("BI-Time_Interval_Error_Text"));
self.element.addClass(self.constants.timeErrorCls); self.element.addClass(self.constants.timeErrorCls);
self.fireEvent(BI.YearMonthInterval.EVENT_ERROR); self.fireEvent(BI.YearMonthInterval.EVENT_ERROR);

Loading…
Cancel
Save