From fc204aaee19ed6d3c3fbcccb8ef28af0b93eb032 Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Tue, 19 Jun 2018 10:01:52 +0800 Subject: [PATCH] BI-24464 --- dist/bundle.css | 19 ++++++++++++++++ dist/bundle.js | 3 ++- dist/core.css | 19 ++++++++++++++++ dist/core_without_normalize.css | 19 ++++++++++++++++ dist/fineui.css | 19 ++++++++++++++++ dist/fineui.js | 3 ++- dist/widget.js | 3 ++- src/css/core/utils/common.css | 19 ++++++++++++++++ src/less/core/utils/common.less | 22 +++++++++++++++++++ src/widget/yearquarter/trigger.yearquarter.js | 3 ++- 10 files changed, 125 insertions(+), 4 deletions(-) diff --git a/dist/bundle.css b/dist/bundle.css index d233227299..caeb1e6a97 100644 --- a/dist/bundle.css +++ b/dist/bundle.css @@ -439,6 +439,15 @@ textarea { .bi-high-light .bi-textarea { color: #3685f2; } +.bi-error { + color: #ff4949; +} +.bi-error .bi-input { + color: #ff4949; +} +.bi-error .bi-textarea { + color: #ff4949; +} .bi-high-light-background { background-color: #3685f2; color: #ffffff; @@ -449,6 +458,16 @@ textarea { .bi-high-light-background .bi-textarea { color: #ffffff; } +.bi-error-background { + background-color: #ff4949; + color: #ffffff; +} +.bi-error-background .bi-input { + color: #ffffff; +} +.bi-error-background .bi-textarea { + color: #ffffff; +} .bi-high-light-border { border-color: #3685f2; } diff --git a/dist/bundle.js b/dist/bundle.js index d92f1e173a..3a8270d2bf 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -111985,7 +111985,7 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna }); editor.on(BI.SignEditor.EVENT_CHANGE, function () { if(isYear) { - self._autoSwitch(editor.getValue()); + self._autoSwitch(editor); } }); @@ -112018,6 +112018,7 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna if (BI.isNotEmptyString(v) && BI.checkDateLegal(v)) { if (v.length === 4 && this._yearCheck(v)) { this._doEditorConfirm(editor); + this.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM); this.quarterEditor.focus(); } } diff --git a/dist/core.css b/dist/core.css index cadbb67b6a..fccaa957d1 100644 --- a/dist/core.css +++ b/dist/core.css @@ -439,6 +439,15 @@ textarea { .bi-high-light .bi-textarea { color: #3685f2; } +.bi-error { + color: #ff4949; +} +.bi-error .bi-input { + color: #ff4949; +} +.bi-error .bi-textarea { + color: #ff4949; +} .bi-high-light-background { background-color: #3685f2; color: #ffffff; @@ -449,6 +458,16 @@ textarea { .bi-high-light-background .bi-textarea { color: #ffffff; } +.bi-error-background { + background-color: #ff4949; + color: #ffffff; +} +.bi-error-background .bi-input { + color: #ffffff; +} +.bi-error-background .bi-textarea { + color: #ffffff; +} .bi-high-light-border { border-color: #3685f2; } diff --git a/dist/core_without_normalize.css b/dist/core_without_normalize.css index 1bd02394f0..f4ee6c298b 100644 --- a/dist/core_without_normalize.css +++ b/dist/core_without_normalize.css @@ -161,6 +161,15 @@ textarea { .bi-high-light .bi-textarea { color: #3685f2; } +.bi-error { + color: #ff4949; +} +.bi-error .bi-input { + color: #ff4949; +} +.bi-error .bi-textarea { + color: #ff4949; +} .bi-high-light-background { background-color: #3685f2; color: #ffffff; @@ -171,6 +180,16 @@ textarea { .bi-high-light-background .bi-textarea { color: #ffffff; } +.bi-error-background { + background-color: #ff4949; + color: #ffffff; +} +.bi-error-background .bi-input { + color: #ffffff; +} +.bi-error-background .bi-textarea { + color: #ffffff; +} .bi-high-light-border { border-color: #3685f2; } diff --git a/dist/fineui.css b/dist/fineui.css index 459b162c53..4e11b8d5ce 100644 --- a/dist/fineui.css +++ b/dist/fineui.css @@ -439,6 +439,15 @@ textarea { .bi-high-light .bi-textarea { color: #3685f2; } +.bi-error { + color: #ff4949; +} +.bi-error .bi-input { + color: #ff4949; +} +.bi-error .bi-textarea { + color: #ff4949; +} .bi-high-light-background { background-color: #3685f2; color: #ffffff; @@ -449,6 +458,16 @@ textarea { .bi-high-light-background .bi-textarea { color: #ffffff; } +.bi-error-background { + background-color: #ff4949; + color: #ffffff; +} +.bi-error-background .bi-input { + color: #ffffff; +} +.bi-error-background .bi-textarea { + color: #ffffff; +} .bi-high-light-border { border-color: #3685f2; } diff --git a/dist/fineui.js b/dist/fineui.js index 6ce45c4452..31899e3d29 100644 --- a/dist/fineui.js +++ b/dist/fineui.js @@ -112228,7 +112228,7 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna }); editor.on(BI.SignEditor.EVENT_CHANGE, function () { if(isYear) { - self._autoSwitch(editor.getValue()); + self._autoSwitch(editor); } }); @@ -112261,6 +112261,7 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna if (BI.isNotEmptyString(v) && BI.checkDateLegal(v)) { if (v.length === 4 && this._yearCheck(v)) { this._doEditorConfirm(editor); + this.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM); this.quarterEditor.focus(); } } diff --git a/dist/widget.js b/dist/widget.js index 7d19beb16e..1dcf3b2acf 100644 --- a/dist/widget.js +++ b/dist/widget.js @@ -24361,7 +24361,7 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna }); editor.on(BI.SignEditor.EVENT_CHANGE, function () { if(isYear) { - self._autoSwitch(editor.getValue()); + self._autoSwitch(editor); } }); @@ -24394,6 +24394,7 @@ BI.shortcut("bi.dynamic_year_quarter_popup", BI.DynamicYearQuarterPopup);BI.Dyna if (BI.isNotEmptyString(v) && BI.checkDateLegal(v)) { if (v.length === 4 && this._yearCheck(v)) { this._doEditorConfirm(editor); + this.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM); this.quarterEditor.focus(); } } diff --git a/src/css/core/utils/common.css b/src/css/core/utils/common.css index 62f7445962..5f3a2303ea 100644 --- a/src/css/core/utils/common.css +++ b/src/css/core/utils/common.css @@ -161,6 +161,15 @@ textarea { .bi-high-light .bi-textarea { color: #3685f2; } +.bi-error { + color: #ff4949; +} +.bi-error .bi-input { + color: #ff4949; +} +.bi-error .bi-textarea { + color: #ff4949; +} .bi-high-light-background { background-color: #3685f2; color: #ffffff; @@ -171,6 +180,16 @@ textarea { .bi-high-light-background .bi-textarea { color: #ffffff; } +.bi-error-background { + background-color: #ff4949; + color: #ffffff; +} +.bi-error-background .bi-input { + color: #ffffff; +} +.bi-error-background .bi-textarea { + color: #ffffff; +} .bi-high-light-border { border-color: #3685f2; } diff --git a/src/less/core/utils/common.less b/src/less/core/utils/common.less index 3670b6a48b..4b73876c33 100644 --- a/src/less/core/utils/common.less +++ b/src/less/core/utils/common.less @@ -205,6 +205,16 @@ textarea { } } +.bi-error { + color: @color-bi-text-failure; + & .bi-input { + color: @color-bi-text-failure; + } + & .bi-textarea { + color: @color-bi-text-failure; + } +} + .bi-high-light-background { background-color: @color-bi-background-highlight; color: @color-bi-text; @@ -216,6 +226,18 @@ textarea { } } +.bi-error-background { + background-color: @color-bi-background-failure; + color: @color-bi-text; + & .bi-input { + color: @color-bi-text; + } + & .bi-textarea { + color: @color-bi-text; + } +} + + .bi-high-light-border { border-color: @color-bi-border-highlight; } diff --git a/src/widget/yearquarter/trigger.yearquarter.js b/src/widget/yearquarter/trigger.yearquarter.js index 2cf7c9ee25..92d8e5f450 100644 --- a/src/widget/yearquarter/trigger.yearquarter.js +++ b/src/widget/yearquarter/trigger.yearquarter.js @@ -103,7 +103,7 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, { }); editor.on(BI.SignEditor.EVENT_CHANGE, function () { if(isYear) { - self._autoSwitch(editor.getValue()); + self._autoSwitch(editor); } }); @@ -136,6 +136,7 @@ BI.DynamicYearQuarterTrigger = BI.inherit(BI.Trigger, { if (BI.isNotEmptyString(v) && BI.checkDateLegal(v)) { if (v.length === 4 && this._yearCheck(v)) { this._doEditorConfirm(editor); + this.fireEvent(BI.DynamicYearQuarterTrigger.EVENT_CONFIRM); this.quarterEditor.focus(); } }