From bad6380f9ac5a92737c74cb25b6c78754f75adde Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Mon, 27 May 2019 14:10:49 +0800 Subject: [PATCH 1/3] =?UTF-8?q?BI-45337=20&&=20KERNEL-620=20textarea?= =?UTF-8?q?=E9=97=B4=E8=B7=9D=20&&=20=E6=97=B6=E5=88=86=E7=A7=92=E6=8E=A7?= =?UTF-8?q?=E4=BB=B6=E4=BA=8B=E4=BB=B6=E8=A1=A5=E5=85=85=20&&=20=E5=8E=BBs?= =?UTF-8?q?troke-width?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo/js/case/combo/demo.bubble_combo.js | 2 +- public/css/font.css | 1 - src/base/single/editor/editor.textarea.js | 6 +++--- src/css/core/normalize2.css | 1 - src/css/resource/font.css | 1 - src/less/core/normalize2.less | 1 - src/less/image.less | 1 - src/widget/dynamicdate/dynamicdate.combo.js | 1 + src/widget/dynamicdate/dynamicdate.trigger.js | 7 ++++--- src/widget/dynamicdatetime/dynamicdatetime.combo.js | 1 + src/widget/dynamicdatetime/dynamicdatetime.trigger.js | 5 +++-- src/widget/selecttree/selecttree.combo.js | 2 +- src/widget/time/time.combo.js | 3 +++ src/widget/time/time.trigger.js | 2 +- ui/css/font.css | 1 - 15 files changed, 18 insertions(+), 17 deletions(-) diff --git a/demo/js/case/combo/demo.bubble_combo.js b/demo/js/case/combo/demo.bubble_combo.js index 292a48b85..00072f6bc 100644 --- a/demo/js/case/combo/demo.bubble_combo.js +++ b/demo/js/case/combo/demo.bubble_combo.js @@ -100,7 +100,7 @@ Demo.Func = BI.inherit(BI.Widget, { element: this, items: [{ el: combo1, - left: 10, + left: 150, top: 10 }, { el: combo2, diff --git a/public/css/font.css b/public/css/font.css index 3c6218046..27deae83b 100644 --- a/public/css/font.css +++ b/public/css/font.css @@ -8,7 +8,6 @@ font-family: 'fineui'; font-style: normal; -webkit-font-smoothing: antialiased; - -webkit-text-stroke-width: 0.2px; -moz-osx-font-smoothing: grayscale; } .close-font .b-font { diff --git a/src/base/single/editor/editor.textarea.js b/src/base/single/editor/editor.textarea.js index f87b365d2..fc04fca2d 100644 --- a/src/base/single/editor/editor.textarea.js +++ b/src/base/single/editor/editor.textarea.js @@ -32,7 +32,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, { }, left: 10, right: 10, - top: 8, + top: 4, bottom: 8 }] }); @@ -81,9 +81,9 @@ BI.TextAreaEditor = BI.inherit(BI.Single, { if (!this.watermark) { this.watermark = BI.createWidget({ type: "bi.text_button", - cls: "bi-water-mark", + cls: "bi-water-mark cursor-default", textAlign: "left", - height: 30, + height: 22, text: o.watermark, invalid: o.invalid, disabled: o.disabled diff --git a/src/css/core/normalize2.css b/src/css/core/normalize2.css index 71f98ac27..a34fb7b2b 100644 --- a/src/css/core/normalize2.css +++ b/src/css/core/normalize2.css @@ -46,6 +46,5 @@ li { } i { -webkit-font-smoothing: antialiased; - -webkit-text-stroke-width: 0.2px; -moz-osx-font-smoothing: grayscale; } diff --git a/src/css/resource/font.css b/src/css/resource/font.css index 59f66a14d..7d8cfb5c4 100644 --- a/src/css/resource/font.css +++ b/src/css/resource/font.css @@ -8,7 +8,6 @@ font-family: 'fineui'; font-style: normal; -webkit-font-smoothing: antialiased; - -webkit-text-stroke-width: 0.2px; -moz-osx-font-smoothing: grayscale; } .close-font .b-font { diff --git a/src/less/core/normalize2.less b/src/less/core/normalize2.less index 0efbc22fb..cb936708d 100644 --- a/src/less/core/normalize2.less +++ b/src/less/core/normalize2.less @@ -59,6 +59,5 @@ li { i { //font-style: normal; -webkit-font-smoothing: antialiased; - -webkit-text-stroke-width: 0.2px; -moz-osx-font-smoothing: grayscale; } diff --git a/src/less/image.less b/src/less/image.less index dee3368aa..3f33a421c 100644 --- a/src/less/image.less +++ b/src/less/image.less @@ -342,7 +342,6 @@ @baseProperty: { font-style: normal; -webkit-font-smoothing: antialiased; - -webkit-text-stroke-width: 0.2px; -moz-osx-font-smoothing: grayscale; }; diff --git a/src/widget/dynamicdate/dynamicdate.combo.js b/src/widget/dynamicdate/dynamicdate.combo.js index b93cd6394..5f6e7336c 100644 --- a/src/widget/dynamicdate/dynamicdate.combo.js +++ b/src/widget/dynamicdate/dynamicdate.combo.js @@ -52,6 +52,7 @@ BI.DynamicDateCombo = BI.inherit(BI.Single, { max: opts.maxDate, format: opts.format, allowEdit: opts.allowEdit, + watermark: opts.watermark, height: opts.height, value: opts.value, ref: function () { diff --git a/src/widget/dynamicdate/dynamicdate.trigger.js b/src/widget/dynamicdate/dynamicdate.trigger.js index d896c4539..ebec4efc9 100644 --- a/src/widget/dynamicdate/dynamicdate.trigger.js +++ b/src/widget/dynamicdate/dynamicdate.trigger.js @@ -14,7 +14,8 @@ BI.DynamicDateTrigger = BI.inherit(BI.Trigger, { max: "2099-12-31", // 最大日期 height: 24, format: "", // 显示的日期格式化方式 - allowEdit: true // 是否允许编辑 + allowEdit: true, // 是否允许编辑 + watermark: "" }, _init: function () { @@ -40,11 +41,11 @@ BI.DynamicDateTrigger = BI.inherit(BI.Trigger, { hgap: c.hgap, vgap: c.vgap, allowBlank: true, - watermark: BI.i18nText("BI-Basic_Unrestricted"), + watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"), errorText: function () { var str = ""; if (!BI.isKey(o.format)) { - str = self.editor.isEditing() ? BI.i18nText("BI-Date_Trigger_Error_Text"): BI.i18nText("BI-Year_Trigger_Invalid_Text"); + str = self.editor.isEditing() ? BI.i18nText("BI-Date_Trigger_Error_Text") : BI.i18nText("BI-Year_Trigger_Invalid_Text"); } return str; }, diff --git a/src/widget/dynamicdatetime/dynamicdatetime.combo.js b/src/widget/dynamicdatetime/dynamicdatetime.combo.js index ee5e9429b..6db4f7fde 100644 --- a/src/widget/dynamicdatetime/dynamicdatetime.combo.js +++ b/src/widget/dynamicdatetime/dynamicdatetime.combo.js @@ -51,6 +51,7 @@ BI.DynamicDateTimeCombo = BI.inherit(BI.Single, { min: opts.minDate, max: opts.maxDate, allowEdit: opts.allowEdit, + watermark: opts.watermark, format: opts.format, height: opts.height, value: opts.value, diff --git a/src/widget/dynamicdatetime/dynamicdatetime.trigger.js b/src/widget/dynamicdatetime/dynamicdatetime.trigger.js index d73e65296..1d3234aa1 100644 --- a/src/widget/dynamicdatetime/dynamicdatetime.trigger.js +++ b/src/widget/dynamicdatetime/dynamicdatetime.trigger.js @@ -14,7 +14,8 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, { max: "2099-12-31", // 最大日期 height: 24, format: "", // 显示的日期格式化方式 - allowEdit: true // 是否允许编辑 + allowEdit: true, // 是否允许编辑 + watermark: "" }, _init: function () { @@ -40,7 +41,7 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, { hgap: c.hgap, vgap: c.vgap, allowBlank: true, - watermark: BI.i18nText("BI-Basic_Unrestricted"), + watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"), errorText: function () { var str = ""; if (!BI.isKey(o.format)) { diff --git a/src/widget/selecttree/selecttree.combo.js b/src/widget/selecttree/selecttree.combo.js index 461b28b2f..900c5fa41 100644 --- a/src/widget/selecttree/selecttree.combo.js +++ b/src/widget/selecttree/selecttree.combo.js @@ -7,7 +7,7 @@ BI.SelectTreeCombo = BI.inherit(BI.Widget, { _defaultConfig: function () { return BI.extend(BI.SelectTreeCombo.superclass._defaultConfig.apply(this, arguments), { baseCls: "bi-select-tree-combo", - height: 30, + height: 24, text: "", items: [], value: "", diff --git a/src/widget/time/time.combo.js b/src/widget/time/time.combo.js index 2d4693504..3f5e5d497 100644 --- a/src/widget/time/time.combo.js +++ b/src/widget/time/time.combo.js @@ -66,6 +66,7 @@ el: { type: "bi.time_trigger", allowEdit: opts.allowEdit, + watermark: opts.watermark, format: opts.format, value: opts.value, ref: function (_ref) { @@ -212,6 +213,8 @@ BI.TimeCombo.EVENT_CONFIRM = "EVENT_CONFIRM"; BI.TimeCombo.EVENT_CHANGE = "EVENT_CHANGE"; + BI.TimeCombo.EVENT_VALID = "EVENT_VALID"; + BI.TimeCombo.EVENT_ERROR = "EVENT_ERROR"; BI.TimeCombo.EVENT_BEFORE_POPUPVIEW = "EVENT_BEFORE_POPUPVIEW"; BI.shortcut("bi.time_combo", BI.TimeCombo); })(); \ No newline at end of file diff --git a/src/widget/time/time.trigger.js b/src/widget/time/time.trigger.js index f61dfe718..0de374465 100644 --- a/src/widget/time/time.trigger.js +++ b/src/widget/time/time.trigger.js @@ -49,7 +49,7 @@ value: this._formatValue(o.value), hgap: 4, allowBlank: true, - watermark: BI.i18nText("BI-Basic_Unrestricted"), + watermark: BI.isKey(o.watermark) ? o.watermark : BI.i18nText("BI-Basic_Unrestricted"), title: BI.bind(this._getTitle, this), listeners: [{ eventName: "EVENT_KEY_DOWN", diff --git a/ui/css/font.css b/ui/css/font.css index d27f87ace..fa727e3c3 100644 --- a/ui/css/font.css +++ b/ui/css/font.css @@ -8,7 +8,6 @@ font-family: 'fineui'; font-style: normal; -webkit-font-smoothing: antialiased; - -webkit-text-stroke-width: 0.2px; -moz-osx-font-smoothing: grayscale; } .close-font .b-font { From 45e585ceae290cfa75742cab474a0112a059114b Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Mon, 27 May 2019 14:35:13 +0800 Subject: [PATCH 2/3] update --- src/base/single/editor/editor.textarea.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/base/single/editor/editor.textarea.js b/src/base/single/editor/editor.textarea.js index fc04fca2d..1d3fd93f0 100644 --- a/src/base/single/editor/editor.textarea.js +++ b/src/base/single/editor/editor.textarea.js @@ -30,7 +30,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, { type: "bi.adaptive", items: [this.content] }, - left: 10, + left: 4, right: 10, top: 4, bottom: 8 @@ -83,7 +83,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, { type: "bi.text_button", cls: "bi-water-mark cursor-default", textAlign: "left", - height: 22, + height: 20, text: o.watermark, invalid: o.invalid, disabled: o.disabled @@ -96,7 +96,7 @@ BI.TextAreaEditor = BI.inherit(BI.Single, { element: this, items: [{ el: this.watermark, - left: 10, + left: 4, top: 4, right: 0 }] From 7aaefa7dfc900079168c168adcee85ca6bd2a08f Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Tue, 28 May 2019 16:17:50 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E6=97=A0JIRA=E4=BB=BB=E5=8A=A1=20=E5=AF=B9?= =?UTF-8?q?=E4=BA=8EerrorText=E6=98=AFfunction=EF=BC=8C=E5=88=A4=E6=96=AD?= =?UTF-8?q?=E5=80=BC=E6=98=AF=E7=A9=BA=E6=A0=BC=E7=9A=84=E7=BB=9F=E4=B8=80?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/base/single/editor/editor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/base/single/editor/editor.js b/src/base/single/editor/editor.js index 389e150f2..9da071dc7 100644 --- a/src/base/single/editor/editor.js +++ b/src/base/single/editor/editor.js @@ -240,7 +240,7 @@ BI.Editor = BI.inherit(BI.Single, { var o = this.options; var errorText = o.errorText; if (BI.isFunction(errorText)) { - errorText = errorText(this.editor.getValue()); + errorText = errorText(BI.trim(this.editor.getValue())); } if (!this.disabledError && BI.isKey(errorText)) { BI.Bubbles[b ? "show" : "hide"](this.getName(), errorText, this, {