From 653443f142ffc221be40a38575a7b85fa8fdd747 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Mon, 14 May 2018 11:47:41 +0800 Subject: [PATCH] BI-19718 --- dist/bundle.js | 28 ++++++++++++++----- dist/fineui.js | 28 ++++++++++++++----- dist/widget.js | 28 ++++++++++++++----- src/widget/datetime/datetime.select.js | 7 ++++- .../dynamicdatetime.timeselect.js | 21 ++++++++++---- 5 files changed, 84 insertions(+), 28 deletions(-) diff --git a/dist/bundle.js b/dist/bundle.js index 94dd27fe2..734f696a5 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -89220,7 +89220,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); } @@ -92040,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, @@ -92074,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, @@ -92106,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, diff --git a/dist/fineui.js b/dist/fineui.js index d31aa62fb..50a22b43e 100644 --- a/dist/fineui.js +++ b/dist/fineui.js @@ -89463,7 +89463,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); } @@ -92283,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, @@ -92317,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, @@ -92349,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, diff --git a/dist/widget.js b/dist/widget.js index 6eb79f07d..1eab5e1b0 100644 --- a/dist/widget.js +++ b/dist/widget.js @@ -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); } @@ -4486,8 +4491,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, @@ -4520,8 +4528,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, @@ -4552,8 +4563,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, diff --git a/src/widget/datetime/datetime.select.js b/src/widget/datetime/datetime.select.js index 4f1b77b69..6dcdd04f7 100644 --- a/src/widget/datetime/datetime.select.js +++ b/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); } diff --git a/src/widget/dynamicdatetime/dynamicdatetime.timeselect.js b/src/widget/dynamicdatetime/dynamicdatetime.timeselect.js index f0753d69b..b5b23766b 100644 --- a/src/widget/dynamicdatetime/dynamicdatetime.timeselect.js +++ b/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,