From 48737d37e23263031f47a008807e53326a30704e Mon Sep 17 00:00:00 2001 From: windy <1374721899@qq.com> Date: Wed, 20 Jun 2018 15:44:02 +0800 Subject: [PATCH] BI-24836 && BI-24802 --- dist/base.js | 1 + dist/bundle.css | 6 ++++++ dist/bundle.js | 15 +++++++++++---- dist/fineui.css | 6 ++++++ dist/fineui.js | 15 +++++++++++---- dist/widget.css | 6 ++++++ dist/widget.js | 14 ++++++++++---- src/base/single/button/buttons/button.icon.js | 1 + src/css/widget/multiselect/trigger/button.css | 6 ++++++ .../multiselect/trigger/button.checkselected.less | 4 ++++ src/widget/dynamicdate/dynamicdate.trigger.js | 4 +++- .../dynamicdatetime/dynamicdatetime.trigger.js | 4 +++- src/widget/multiselect/multiselect.loader.js | 1 + .../multiselect/trigger/button.checkselected.js | 5 +++-- 14 files changed, 72 insertions(+), 16 deletions(-) diff --git a/dist/base.js b/dist/base.js index 6f7bc05dbb..950f4c6f33 100644 --- a/dist/base.js +++ b/dist/base.js @@ -16574,6 +16574,7 @@ BI.IconButton = BI.inherit(BI.BasicButton, { items: [this.icon] }); } else { + this.element.css("lineHeight", "1"); BI.createWidget({ element: this, type: "bi.center_adapt", diff --git a/dist/bundle.css b/dist/bundle.css index ddb33275b5..9a3d7b0b60 100644 --- a/dist/bundle.css +++ b/dist/bundle.css @@ -3826,6 +3826,12 @@ ul.ztree.zTreeDragUL { } .bi-multi-select-check-selected-button { z-index: 1; + -webkit-border-radius: 8px; + -moz-border-radius: 8px; + border-radius: 8px; +} +.bi-multi-select-check-selected-button .count-tip { + min-width: 16px; } .bi-multi-tree-check-pane .multi-tree-check-selected { color: #3685f2; diff --git a/dist/bundle.js b/dist/bundle.js index 46f777ef4d..addca21bc5 100644 --- a/dist/bundle.js +++ b/dist/bundle.js @@ -52344,6 +52344,7 @@ BI.IconButton = BI.inherit(BI.BasicButton, { items: [this.icon] }); } else { + this.element.css("lineHeight", "1"); BI.createWidget({ element: this, type: "bi.center_adapt", @@ -91398,6 +91399,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger _init: function () { BI.DynamicDateTrigger.superclass._init.apply(this, arguments); var self = this, o = this.options, c = this._const; + this.storeTriggerValue = ""; this.editor = BI.createWidget({ type: "bi.sign_editor", height: o.height, @@ -91447,6 +91449,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN); }); this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { + self.storeTriggerValue = self.getKey(); self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS); }); this.editor.on(BI.SignEditor.EVENT_STOP, function () { @@ -91464,7 +91467,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger self.editor.setState(value); } - if (BI.isNotEmptyString(value)) { + if (BI.isNotEmptyString(value) && !BI.isEqual(self.storeTriggerValue, self.getKey())) { var date = value.split("-"); self.storeValue = { type: BI.DynamicDateCombo.Static, @@ -92379,6 +92382,7 @@ BI.extend(BI.DynamicDateTimeSelect, { _init: function () { BI.DynamicDateTimeTrigger.superclass._init.apply(this, arguments); var self = this, o = this.options, c = this._const; + this.storeTriggerValue = ""; this.editor = BI.createWidget({ type: "bi.sign_editor", height: o.height, @@ -92428,6 +92432,7 @@ BI.extend(BI.DynamicDateTimeSelect, { self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN); }); this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { + self.storeTriggerValue = self.getKey(); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS); }); this.editor.on(BI.SignEditor.EVENT_STOP, function () { @@ -92445,7 +92450,7 @@ BI.extend(BI.DynamicDateTimeSelect, { self.editor.setState(value); } - if (BI.isNotEmptyString(value)) { + if (BI.isNotEmptyString(value) && !BI.isEqual(self.storeTriggerValue, self.getKey())) { var date = value.split(/-|\s|:/); self.storeValue = { type: BI.DynamicDateCombo.Static, @@ -98724,6 +98729,7 @@ BI.MultiSelectLoader = BI.inherit(BI.Widget, { return BI.createItems(items, { type: "bi.multi_select_item", logic: this.options.logic, + cls: "bi-list-item-active", height: 24, selected: this.isAllSelected() }); @@ -99551,7 +99557,7 @@ BI.MultiSelectCheckSelectedButton = BI.inherit(BI.Single, { _defaultConfig: function () { return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-multi-select-check-selected-button bi-high-light", + baseCls: "bi-multi-select-check-selected-button", itemsCreator: BI.emptyFn }); }, @@ -99565,7 +99571,8 @@ BI.MultiSelectCheckSelectedButton = BI.inherit(BI.Single, { hgap: 4, text: "0", textAlign: "center", - textHeight: 15 + textHeight: 16, + cls: "bi-high-light-background count-tip" }); this.numberCounter.on(BI.Controller.EVENT_CHANGE, function () { self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); diff --git a/dist/fineui.css b/dist/fineui.css index 54c7c1caae..415fd18b08 100644 --- a/dist/fineui.css +++ b/dist/fineui.css @@ -3826,6 +3826,12 @@ ul.ztree.zTreeDragUL { } .bi-multi-select-check-selected-button { z-index: 1; + -webkit-border-radius: 8px; + -moz-border-radius: 8px; + border-radius: 8px; +} +.bi-multi-select-check-selected-button .count-tip { + min-width: 16px; } .bi-multi-tree-check-pane .multi-tree-check-selected { color: #3685f2; diff --git a/dist/fineui.js b/dist/fineui.js index fd0196ad65..9ddc9636ab 100644 --- a/dist/fineui.js +++ b/dist/fineui.js @@ -52587,6 +52587,7 @@ BI.IconButton = BI.inherit(BI.BasicButton, { items: [this.icon] }); } else { + this.element.css("lineHeight", "1"); BI.createWidget({ element: this, type: "bi.center_adapt", @@ -91641,6 +91642,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger _init: function () { BI.DynamicDateTrigger.superclass._init.apply(this, arguments); var self = this, o = this.options, c = this._const; + this.storeTriggerValue = ""; this.editor = BI.createWidget({ type: "bi.sign_editor", height: o.height, @@ -91690,6 +91692,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN); }); this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { + self.storeTriggerValue = self.getKey(); self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS); }); this.editor.on(BI.SignEditor.EVENT_STOP, function () { @@ -91707,7 +91710,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger self.editor.setState(value); } - if (BI.isNotEmptyString(value)) { + if (BI.isNotEmptyString(value) && !BI.isEqual(self.storeTriggerValue, self.getKey())) { var date = value.split("-"); self.storeValue = { type: BI.DynamicDateCombo.Static, @@ -92622,6 +92625,7 @@ BI.extend(BI.DynamicDateTimeSelect, { _init: function () { BI.DynamicDateTimeTrigger.superclass._init.apply(this, arguments); var self = this, o = this.options, c = this._const; + this.storeTriggerValue = ""; this.editor = BI.createWidget({ type: "bi.sign_editor", height: o.height, @@ -92671,6 +92675,7 @@ BI.extend(BI.DynamicDateTimeSelect, { self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN); }); this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { + self.storeTriggerValue = self.getKey(); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS); }); this.editor.on(BI.SignEditor.EVENT_STOP, function () { @@ -92688,7 +92693,7 @@ BI.extend(BI.DynamicDateTimeSelect, { self.editor.setState(value); } - if (BI.isNotEmptyString(value)) { + if (BI.isNotEmptyString(value) && !BI.isEqual(self.storeTriggerValue, self.getKey())) { var date = value.split(/-|\s|:/); self.storeValue = { type: BI.DynamicDateCombo.Static, @@ -98967,6 +98972,7 @@ BI.MultiSelectLoader = BI.inherit(BI.Widget, { return BI.createItems(items, { type: "bi.multi_select_item", logic: this.options.logic, + cls: "bi-list-item-active", height: 24, selected: this.isAllSelected() }); @@ -99794,7 +99800,7 @@ BI.MultiSelectCheckSelectedButton = BI.inherit(BI.Single, { _defaultConfig: function () { return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-multi-select-check-selected-button bi-high-light", + baseCls: "bi-multi-select-check-selected-button", itemsCreator: BI.emptyFn }); }, @@ -99808,7 +99814,8 @@ BI.MultiSelectCheckSelectedButton = BI.inherit(BI.Single, { hgap: 4, text: "0", textAlign: "center", - textHeight: 15 + textHeight: 16, + cls: "bi-high-light-background count-tip" }); this.numberCounter.on(BI.Controller.EVENT_CHANGE, function () { self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); diff --git a/dist/widget.css b/dist/widget.css index 2019d9768c..b8f5a263e4 100644 --- a/dist/widget.css +++ b/dist/widget.css @@ -181,6 +181,12 @@ } .bi-multi-select-check-selected-button { z-index: 1; + -webkit-border-radius: 8px; + -moz-border-radius: 8px; + border-radius: 8px; +} +.bi-multi-select-check-selected-button .count-tip { + min-width: 16px; } .bi-multi-tree-check-pane .multi-tree-check-selected { color: #3685f2; diff --git a/dist/widget.js b/dist/widget.js index 34e3697a52..1f4f272d36 100644 --- a/dist/widget.js +++ b/dist/widget.js @@ -3776,6 +3776,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger _init: function () { BI.DynamicDateTrigger.superclass._init.apply(this, arguments); var self = this, o = this.options, c = this._const; + this.storeTriggerValue = ""; this.editor = BI.createWidget({ type: "bi.sign_editor", height: o.height, @@ -3825,6 +3826,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN); }); this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { + self.storeTriggerValue = self.getKey(); self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS); }); this.editor.on(BI.SignEditor.EVENT_STOP, function () { @@ -3842,7 +3844,7 @@ BI.shortcut("bi.dynamic_date_popup", BI.DynamicDatePopup);BI.DynamicDateTrigger self.editor.setState(value); } - if (BI.isNotEmptyString(value)) { + if (BI.isNotEmptyString(value) && !BI.isEqual(self.storeTriggerValue, self.getKey())) { var date = value.split("-"); self.storeValue = { type: BI.DynamicDateCombo.Static, @@ -4757,6 +4759,7 @@ BI.extend(BI.DynamicDateTimeSelect, { _init: function () { BI.DynamicDateTimeTrigger.superclass._init.apply(this, arguments); var self = this, o = this.options, c = this._const; + this.storeTriggerValue = ""; this.editor = BI.createWidget({ type: "bi.sign_editor", height: o.height, @@ -4806,6 +4809,7 @@ BI.extend(BI.DynamicDateTimeSelect, { self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN); }); this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { + self.storeTriggerValue = self.getKey(); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS); }); this.editor.on(BI.SignEditor.EVENT_STOP, function () { @@ -4823,7 +4827,7 @@ BI.extend(BI.DynamicDateTimeSelect, { self.editor.setState(value); } - if (BI.isNotEmptyString(value)) { + if (BI.isNotEmptyString(value) && !BI.isEqual(self.storeTriggerValue, self.getKey())) { var date = value.split(/-|\s|:/); self.storeValue = { type: BI.DynamicDateCombo.Static, @@ -11102,6 +11106,7 @@ BI.MultiSelectLoader = BI.inherit(BI.Widget, { return BI.createItems(items, { type: "bi.multi_select_item", logic: this.options.logic, + cls: "bi-list-item-active", height: 24, selected: this.isAllSelected() }); @@ -11929,7 +11934,7 @@ BI.MultiSelectCheckSelectedButton = BI.inherit(BI.Single, { _defaultConfig: function () { return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-multi-select-check-selected-button bi-high-light", + baseCls: "bi-multi-select-check-selected-button", itemsCreator: BI.emptyFn }); }, @@ -11943,7 +11948,8 @@ BI.MultiSelectCheckSelectedButton = BI.inherit(BI.Single, { hgap: 4, text: "0", textAlign: "center", - textHeight: 15 + textHeight: 16, + cls: "bi-high-light-background count-tip" }); this.numberCounter.on(BI.Controller.EVENT_CHANGE, function () { self.fireEvent(BI.Controller.EVENT_CHANGE, arguments); diff --git a/src/base/single/button/buttons/button.icon.js b/src/base/single/button/buttons/button.icon.js index f41059b029..2074c368aa 100644 --- a/src/base/single/button/buttons/button.icon.js +++ b/src/base/single/button/buttons/button.icon.js @@ -32,6 +32,7 @@ BI.IconButton = BI.inherit(BI.BasicButton, { items: [this.icon] }); } else { + this.element.css("lineHeight", "1"); BI.createWidget({ element: this, type: "bi.center_adapt", diff --git a/src/css/widget/multiselect/trigger/button.css b/src/css/widget/multiselect/trigger/button.css index 135ecbc994..57501b7ad7 100644 --- a/src/css/widget/multiselect/trigger/button.css +++ b/src/css/widget/multiselect/trigger/button.css @@ -1,3 +1,9 @@ .bi-multi-select-check-selected-button { z-index: 1; + -webkit-border-radius: 8px; + -moz-border-radius: 8px; + border-radius: 8px; +} +.bi-multi-select-check-selected-button .count-tip { + min-width: 16px; } diff --git a/src/less/widget/multiselect/trigger/button.checkselected.less b/src/less/widget/multiselect/trigger/button.checkselected.less index e111a90ad8..9a6d89aa38 100644 --- a/src/less/widget/multiselect/trigger/button.checkselected.less +++ b/src/less/widget/multiselect/trigger/button.checkselected.less @@ -2,4 +2,8 @@ .bi-multi-select-check-selected-button { z-index: 1; + .border-radius(8px); + & .count-tip{ + min-width: 16px; + } } diff --git a/src/widget/dynamicdate/dynamicdate.trigger.js b/src/widget/dynamicdate/dynamicdate.trigger.js index 1745627b24..9453aa6848 100644 --- a/src/widget/dynamicdate/dynamicdate.trigger.js +++ b/src/widget/dynamicdate/dynamicdate.trigger.js @@ -17,6 +17,7 @@ BI.DynamicDateTrigger = BI.inherit(BI.Trigger, { _init: function () { BI.DynamicDateTrigger.superclass._init.apply(this, arguments); var self = this, o = this.options, c = this._const; + this.storeTriggerValue = ""; this.editor = BI.createWidget({ type: "bi.sign_editor", height: o.height, @@ -66,6 +67,7 @@ BI.DynamicDateTrigger = BI.inherit(BI.Trigger, { self.fireEvent(BI.DynamicDateTrigger.EVENT_KEY_DOWN); }); this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { + self.storeTriggerValue = self.getKey(); self.fireEvent(BI.DynamicDateTrigger.EVENT_FOCUS); }); this.editor.on(BI.SignEditor.EVENT_STOP, function () { @@ -83,7 +85,7 @@ BI.DynamicDateTrigger = BI.inherit(BI.Trigger, { self.editor.setState(value); } - if (BI.isNotEmptyString(value)) { + if (BI.isNotEmptyString(value) && !BI.isEqual(self.storeTriggerValue, self.getKey())) { var date = value.split("-"); self.storeValue = { type: BI.DynamicDateCombo.Static, diff --git a/src/widget/dynamicdatetime/dynamicdatetime.trigger.js b/src/widget/dynamicdatetime/dynamicdatetime.trigger.js index a52ae2585a..bbf7923af3 100644 --- a/src/widget/dynamicdatetime/dynamicdatetime.trigger.js +++ b/src/widget/dynamicdatetime/dynamicdatetime.trigger.js @@ -17,6 +17,7 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, { _init: function () { BI.DynamicDateTimeTrigger.superclass._init.apply(this, arguments); var self = this, o = this.options, c = this._const; + this.storeTriggerValue = ""; this.editor = BI.createWidget({ type: "bi.sign_editor", height: o.height, @@ -66,6 +67,7 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, { self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_KEY_DOWN); }); this.editor.on(BI.SignEditor.EVENT_FOCUS, function () { + self.storeTriggerValue = self.getKey(); self.fireEvent(BI.DynamicDateTimeTrigger.EVENT_FOCUS); }); this.editor.on(BI.SignEditor.EVENT_STOP, function () { @@ -83,7 +85,7 @@ BI.DynamicDateTimeTrigger = BI.inherit(BI.Trigger, { self.editor.setState(value); } - if (BI.isNotEmptyString(value)) { + if (BI.isNotEmptyString(value) && !BI.isEqual(self.storeTriggerValue, self.getKey())) { var date = value.split(/-|\s|:/); self.storeValue = { type: BI.DynamicDateCombo.Static, diff --git a/src/widget/multiselect/multiselect.loader.js b/src/widget/multiselect/multiselect.loader.js index 6c8fe3ed1a..26182fb27f 100644 --- a/src/widget/multiselect/multiselect.loader.js +++ b/src/widget/multiselect/multiselect.loader.js @@ -111,6 +111,7 @@ BI.MultiSelectLoader = BI.inherit(BI.Widget, { return BI.createItems(items, { type: "bi.multi_select_item", logic: this.options.logic, + cls: "bi-list-item-active", height: 24, selected: this.isAllSelected() }); diff --git a/src/widget/multiselect/trigger/button.checkselected.js b/src/widget/multiselect/trigger/button.checkselected.js index 1eb6f12f14..2fe6104015 100644 --- a/src/widget/multiselect/trigger/button.checkselected.js +++ b/src/widget/multiselect/trigger/button.checkselected.js @@ -8,7 +8,7 @@ BI.MultiSelectCheckSelectedButton = BI.inherit(BI.Single, { _defaultConfig: function () { return BI.extend(BI.MultiSelectCheckSelectedButton.superclass._defaultConfig.apply(this, arguments), { - baseCls: "bi-multi-select-check-selected-button bi-high-light", + baseCls: "bi-multi-select-check-selected-button", itemsCreator: BI.emptyFn }); }, @@ -22,7 +22,8 @@ BI.MultiSelectCheckSelectedButton = BI.inherit(BI.Single, { hgap: 4, text: "0", textAlign: "center", - textHeight: 15 + textHeight: 16, + cls: "bi-high-light-background count-tip" }); this.numberCounter.on(BI.Controller.EVENT_CHANGE, function () { self.fireEvent(BI.Controller.EVENT_CHANGE, arguments);