Browse Source

更新

master
windy 3 years ago
parent
commit
c8a2c2577a
  1. 4
      src/widget/dynamicdate/dynamicdate.trigger.js
  2. 4
      src/widget/dynamicdatetime/dynamicdatetime.trigger.js
  3. 5
      src/widget/year/trigger.year.js
  4. 5
      src/widget/yearmonth/trigger.yearmonth.js
  5. 5
      src/widget/yearquarter/trigger.yearquarter.js

4
src/widget/dynamicdate/dynamicdate.trigger.js

@ -22,8 +22,6 @@ BI.DynamicDateTrigger = BI.inherit(BI.Trigger, {
BI.DynamicDateTrigger.superclass._init.apply(this, arguments);
var self = this, o = this.options, c = this._const;
this.storeTriggerValue = "";
var start = BI.parseDateTime(o.min, "%Y-%X-%d");
var end = BI.parseDateTime(o.max, "%Y-%X-%d");
this.editor = BI.createWidget({
type: "bi.sign_editor",
height: o.height,
@ -50,6 +48,8 @@ BI.DynamicDateTrigger = BI.inherit(BI.Trigger, {
if (!self._dateCheck(v)) {
str = self.editor.isEditing() ? BI.i18nText("BI-Date_Trigger_Error_Text") : BI.i18nText("BI-Year_Trigger_Invalid_Text");
} else {
var start = BI.parseDateTime(o.min, "%Y-%X-%d");
var end = BI.parseDateTime(o.max, "%Y-%X-%d");
str = BI.i18nText("BI-Basic_Date_Range_Error",
start.getFullYear(),
start.getMonth() + 1,

4
src/widget/dynamicdatetime/dynamicdatetime.trigger.js

@ -22,8 +22,6 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, {
BI.DynamicDateTimeTrigger.superclass._init.apply(this, arguments);
var self = this, o = this.options, c = this._const;
this.storeTriggerValue = "";
var start = BI.parseDateTime(o.min, "%Y-%X-%d");
var end = BI.parseDateTime(o.max, "%Y-%X-%d");
this.editor = BI.createWidget({
type: "bi.sign_editor",
height: o.height,
@ -50,6 +48,8 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, {
if (!self._dateCheck(v)) {
str = self.editor.isEditing() ? BI.i18nText("BI-Date_Trigger_Error_Text") : BI.i18nText("BI-Year_Trigger_Invalid_Text");
} else {
var start = BI.parseDateTime(o.min, "%Y-%X-%d");
var end = BI.parseDateTime(o.max, "%Y-%X-%d");
str = BI.i18nText("BI-Basic_Date_Range_Error",
start.getFullYear(),
start.getMonth() + 1,

5
src/widget/year/trigger.year.js

@ -22,8 +22,6 @@ BI.DynamicYearTrigger = BI.inherit(BI.Trigger, {
_init: function () {
BI.DynamicYearTrigger.superclass._init.apply(this, arguments);
var self = this, o = this.options, c = this._const;
var start = BI.parseDateTime(o.min, "%Y-%X-%d");
var end = BI.parseDateTime(o.max, "%Y-%X-%d");
this.editor = BI.createWidget({
type: "bi.sign_editor",
height: o.height,
@ -39,6 +37,9 @@ BI.DynamicYearTrigger = BI.inherit(BI.Trigger, {
allowBlank: true,
errorText: function (v) {
if (BI.isPositiveInteger(v)) {
var start = BI.parseDateTime(o.min, "%Y-%X-%d");
var end = BI.parseDateTime(o.max, "%Y-%X-%d");
return BI.i18nText("BI-Basic_Year_Range_Error",
start.getFullYear(),
end.getFullYear());

5
src/widget/yearmonth/trigger.yearmonth.js

@ -65,8 +65,6 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
_createEditor: function (isYear) {
var self = this, o = this.options, c = this._const;
var start = BI.parseDateTime(o.min, "%Y-%X-%d");
var end = BI.parseDateTime(o.max, "%Y-%X-%d");
var editor = BI.createWidget({
type: "bi.sign_editor",
height: o.height,
@ -89,6 +87,9 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
return BI.i18nText("BI-Year_Trigger_Invalid_Text");
}
var start = BI.parseDateTime(o.min, "%Y-%X-%d");
var end = BI.parseDateTime(o.max, "%Y-%X-%d");
return BI.i18nText("BI-Basic_Year_Month_Range_Error",
start.getFullYear(),
start.getMonth() + 1,

5
src/widget/yearquarter/trigger.yearquarter.js

@ -60,8 +60,6 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {
_createEditor: function (isYear) {
var self = this, o = this.options, c = this._const;
var start = BI.parseDateTime(o.min, "%Y-%X-%d");
var end = BI.parseDateTime(o.max, "%Y-%X-%d");
var editor = BI.createWidget({
type: "bi.sign_editor",
height: o.height,
@ -83,6 +81,9 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {
return BI.i18nText("BI-Year_Trigger_Invalid_Text");
}
var start = BI.parseDateTime(o.min, "%Y-%X-%d");
var end = BI.parseDateTime(o.max, "%Y-%X-%d");
return BI.i18nText("BI-Basic_Year_Quarter_Range_Error",
start.getFullYear(),
BI.getQuarter(start),

Loading…
Cancel
Save