fay 7 years ago
parent
commit
c7fc741dea
  1. 5
      src/widget/month/trigger.month.js
  2. 6
      src/widget/year/trigger.year.js
  3. 6
      src/widget/yearmonth/trigger.yearmonth.js
  4. 6
      src/widget/yearquarter/trigger.yearquarter.js

5
src/widget/month/trigger.month.js

@ -8,8 +8,7 @@
BI.MonthTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4,
vgap: 2,
errorText: BI.i18nText("BI-Month_Trigger_Error_Text")
vgap: 2
},
_defaultConfig: function () {
@ -33,7 +32,7 @@ BI.MonthTrigger = BI.inherit(BI.Trigger, {
hgap: c.hgap,
vgap: c.vgap,
allowBlank: true,
errorText: c.errorText
errorText: BI.i18nText("BI-Month_Trigger_Error_Text")
});
this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {
self.fireEvent(BI.MonthTrigger.EVENT_FOCUS);

6
src/widget/year/trigger.year.js

@ -1,9 +1,7 @@
BI.DynamicYearTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4,
vgap: 2,
errorText: BI.i18nText("BI-Please_Input_Positive_Integer"),
errorTextInvalid: BI.i18nText("BI-Year_Trigger_Invalid_Text")
vgap: 2
},
_defaultConfig: function () {
@ -31,7 +29,7 @@ BI.DynamicYearTrigger = BI.inherit(BI.Trigger, {
watermark: BI.i18nText("BI-Basic_Unrestricted"),
allowBlank: true,
errorText: function (v) {
return !BI.isPositiveInteger(v) ? c.errorText : c.errorTextInvalid;
return !BI.isPositiveInteger(v) ? BI.i18nText("BI-Please_Input_Positive_Integer") : BI.i18nText("BI-Year_Trigger_Invalid_Text");
}
});
this.editor.on(BI.SignEditor.EVENT_FOCUS, function () {

6
src/widget/yearmonth/trigger.yearmonth.js

@ -1,9 +1,7 @@
BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4,
vgap: 2,
errorText: BI.i18nText("BI-Please_Input_Positive_Integer"),
errorTextInvalid: BI.i18nText("BI-Year_Trigger_Invalid_Text")
vgap: 2
},
props: {
@ -72,7 +70,7 @@ BI.DynamicYearMonthTrigger = BI.inherit(BI.Trigger, {
},
watermark: BI.i18nText("BI-Basic_Unrestricted"),
errorText: function (v) {
return !BI.isPositiveInteger(v) ? c.errorText : c.errorTextInvalid;
return !BI.isPositiveInteger(v) ? BI.i18nText("BI-Please_Input_Positive_Integer") : BI.i18nText("BI-Year_Trigger_Invalid_Text");
},
hgap: c.hgap,
vgap: c.vgap,

6
src/widget/yearquarter/trigger.yearquarter.js

@ -1,9 +1,7 @@
BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {
_const: {
hgap: 4,
vgap: 2,
errorText: BI.i18nText("BI-Please_Input_Positive_Integer"),
errorTextInvalid: BI.i18nText("BI-Year_Trigger_Invalid_Text")
vgap: 2
},
props: {
@ -71,7 +69,7 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, {
return false;
},
errorText: function (v) {
return !BI.isPositiveInteger(v) ? c.errorText : c.errorTextInvalid;
return !BI.isPositiveInteger(v) ? BI.i18nText("BI-Please_Input_Positive_Integer") : BI.i18nText("BI-Year_Trigger_Invalid_Text");
},
watermark: BI.i18nText("BI-Basic_Unrestricted"),
hgap: c.hgap,

Loading…
Cancel
Save