From be8e9a5aaabfa3b8c280dbf232e1efee05373392 Mon Sep 17 00:00:00 2001 From: guy Date: Wed, 10 May 2017 20:17:53 +0800 Subject: [PATCH] add --- bi/base.css | 84 +++++++++++---------- bi/base.js | 18 +++-- bi/case.js | 18 ++--- bi/core.css | 4 +- bi/widget.js | 1 - demo/js/base/button/demo.button.js | 64 +++++++++++++++- docs/base.css | 84 +++++++++++---------- docs/base.js | 18 +++-- docs/case.js | 18 ++--- docs/core.css | 4 +- docs/demo.js | 64 +++++++++++++++- docs/widget.js | 1 - src/base/single/button/buttons/button.js | 18 +++-- src/case/editor/editor.state.js | 18 ++--- src/css/base/single/button/button.css | 84 +++++++++++---------- src/css/core/utils/common.css | 4 +- src/less/base/single/button/button.less | 76 ++++++++++++------- src/less/core/utils/common.less | 2 +- src/less/lib/colors.less | 9 +-- src/less/lib/constant.less | 7 +- src/widget/multiselect/multiselect.combo.js | 1 - 21 files changed, 380 insertions(+), 217 deletions(-) diff --git a/bi/base.css b/bi/base.css index 1ab5a81bd..c77bda2cc 100644 --- a/bi/base.css +++ b/bi/base.css @@ -714,72 +714,80 @@ li.CodeMirror-hint-active { cursor: pointer; font-size: 14px; } -.bi-button.button-common, -.bi-button.button-common .b-font { - color: #ffffff; +.bi-button.clear { + border-width: 0; + background-color: transparent; } -.bi-button.button-common .b-font:before { +.bi-button.clear:hover, +.bi-button.clear:active { + opacity: 0.75; + filter: alpha(opacity=75); +} +.bi-button.button-common { color: #ffffff; } +.bi-button.button-common.clear { + color: #3f8ce8; +} .bi-button.button-ignore { + color: #1a1a1a; background-color: #ffffff; border-color: #d4dadd; } -.bi-button.button-ignore, -.bi-button.button-ignore .b-font { - color: #1a1a1a; +.bi-button.button-ignore.clear { + background-color: transparent; + border-width: 0; } .bi-button.button-success { + color: #ffffff; background-color: #58cc7d; border-color: #58cc7d; } -.bi-button.button-success, -.bi-button.button-success .b-font { - color: #ffffff; -} -.bi-button.button-success .b-font:before { - color: #ffffff; +.bi-button.button-success.clear { + color: #0c6d23; + background-color: transparent; + border-width: 0; } .bi-button.button-warning { + color: #ffffff; background-color: #e85050; border-color: #e85050; } -.bi-button.button-warning, -.bi-button.button-warning .b-font { - color: #ffffff; -} -.bi-button.button-warning .b-font:before { - color: #ffffff; +.bi-button.button-warning.clear { + color: #e85050; + background-color: transparent; + border-width: 0; } .bi-button.button-common.disabled, .bi-button.button-success.disabled, .bi-button.button-warning.disabled { - background: #cccccc !important; - border-color: #c4c6c6 !important; -} -.bi-button.button-common.disabled, -.bi-button.button-success.disabled, -.bi-button.button-warning.disabled, -.bi-button.button-common.disabled .b-font, -.bi-button.button-success.disabled .b-font, -.bi-button.button-warning.disabled .b-font { - color: #ffffff !important; -} -.bi-button.button-common.disabled .b-font:before, -.bi-button.button-success.disabled .b-font:before, -.bi-button.button-warning.disabled .b-font:before { color: #ffffff !important; + background: #cccccc !important; + border-color: #cccccc !important; } .bi-button.button-ignore.disabled { + color: #cccccc !important; background: #ffffff !important; border-color: #d4dadd !important; } -.bi-button.button-ignore.disabled, -.bi-button.button-ignore.disabled .b-font { - color: #cccccc !important; -} -.bi-button.button-ignore.disabled .b-font:before { +.bi-button.button-common.disabled.clear, +.bi-button.button-success.disabled.clear, +.bi-button.button-warning.disabled.clear, +.bi-button.button-ignore.disabled.clear { color: #cccccc !important; + background: transparent !important; + border-width: 0 !important; +} +.bi-button.button-common.disabled.clear:hover, +.bi-button.button-success.disabled.clear:hover, +.bi-button.button-warning.disabled.clear:hover, +.bi-button.button-ignore.disabled.clear:hover, +.bi-button.button-common.disabled.clear:active, +.bi-button.button-success.disabled.clear:active, +.bi-button.button-warning.disabled.clear:active, +.bi-button.button-ignore.disabled.clear:active { + opacity: 1; + filter: alpha(opacity=100); } .bi-basic-button.button-common .bi-button-mask, .bi-basic-button.button-success .bi-button-mask, diff --git a/bi/base.js b/bi/base.js index cc33c66a5..2df4d71d4 100644 --- a/bi/base.js +++ b/bi/base.js @@ -15883,25 +15883,24 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) { * @cfg {'common'/'success'/'warning'/'ignore'} [options.level='common'] 按钮类型,用不同颜色强调不同的场景 */ BI.Button = BI.inherit(BI.BasicButton, { - _const: { - minWidth: 90 - }, - _defaultConfig: function () { + _defaultConfig: function (props) { var conf = BI.Button.superclass._defaultConfig.apply(this, arguments); return BI.extend(conf, { baseCls: (conf.baseCls || "") + ' bi-button', - shadow: true, + minWidth: props.clear === true ? 0 : 90, + shadow: props.clear !== true, isShadowShowingOnSelected: true, readonly: true, iconClass: "", level: 'common', + clear: false, //是否去掉边框和背景 textAlign: "center", whiteSpace: "nowrap", forceCenter: false, textWidth: null, textHeight: null, - hgap: 10, + hgap: props.clear ? 0 : 10, vgap: 0, tgap: 0, bgap: 0, @@ -15961,7 +15960,12 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) { value: o.value }); } - this.element.css({"min-width": this._const.minWidth - 2 + "px"}); + if (o.clear === true) { + this.element.addClass("clear"); + } + if (o.minWidth > 2) { + this.element.css({"min-width": o.minWidth - 2 + "px"}); + } }, doClick: function () { diff --git a/bi/case.js b/bi/case.js index 62c000dfa..139a0e831 100644 --- a/bi/case.js +++ b/bi/case.js @@ -6349,15 +6349,15 @@ BI.StateEditor = BI.inherit(BI.Single, { return; } if (BI.isString(v)) { - if (BI.isEmpty(v)) { - this.text.setText(BI.i18nText("BI-Basic_Unrestricted")); - this.text.setTitle(""); - this.text.element.addClass("state-editor-infinite-text"); - } else { - this.text.setText(v); - this.text.setTitle(v); - this.text.element.removeClass("state-editor-infinite-text"); - } + // if (BI.isEmpty(v)) { + // this.text.setText(BI.i18nText("BI-Basic_Unrestricted")); + // this.text.setTitle(""); + // this.text.element.addClass("state-editor-infinite-text"); + // } else { + this.text.setText(v); + this.text.setTitle(v); + this.text.element.removeClass("state-editor-infinite-text"); + // } return; } if (BI.isArray(v)) { diff --git a/bi/core.css b/bi/core.css index ed35e8965..25c5635c6 100644 --- a/bi/core.css +++ b/bi/core.css @@ -3078,8 +3078,8 @@ i { } .bi-z-index-mask { color: #ffffff; - background-color: rgba(26, 26, 26, 0.5); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#801a1a1a,endColorstr=#801a1a1a); + background-color: rgba(26, 26, 26, 0.3); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d1a1a1a,endColorstr=#4d1a1a1a); } .bi-list-item:hover, .bi-list-item.hover { diff --git a/bi/widget.js b/bi/widget.js index ed7154dfc..7f8cd9e69 100644 --- a/bi/widget.js +++ b/bi/widget.js @@ -9861,7 +9861,6 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { this.storeValue = v || {}; this._assertValue(this.storeValue); this.combo.setValue(this.storeValue); - this.trigger.setValue(this.storeValue); }, getValue: function () { diff --git a/demo/js/base/button/demo.button.js b/demo/js/base/button/demo.button.js index 304b2af09..970eb401d 100644 --- a/demo/js/base/button/demo.button.js +++ b/demo/js/base/button/demo.button.js @@ -54,7 +54,67 @@ Demo.Button = BI.inherit(BI.Widget, { type: 'bi.button', text: '带图标的按钮', //level: 'ignore', - iconClass: "rename-font", + iconClass: "close-font", + height: 30 + } + }, { + el: { + type: 'bi.button', + text: '一般按钮', + clear: true, + level: 'common', + height: 30 + } + }, { + el: { + type: 'bi.button', + text: '表示成功状态按钮', + clear: true, + level: 'success', + height: 30 + } + }, + { + el: { + type: 'bi.button', + text: '表示警告状态的按钮', + clear: true, + level: 'warning', + height: 30 + } + }, { + el: { + type: 'bi.button', + text: '表示忽略状态的按钮', + clear: true, + level: 'ignore', + height: 30 + } + }, { + el: { + type: 'bi.button', + text: '普通灰化按钮', + clear: true, + disabled: true, + level: 'success', + height: 30 + } + }, { + el: { + type: 'bi.button', + text: '忽略状态灰化按钮', + clear: true, + disabled: true, + level: 'ignore', + height: 30 + } + }, { + el: { + type: 'bi.button', + text: '带图标的按钮', + clear: true, + //level: 'ignore', + iconClass: "close-font", height: 30 } } @@ -66,7 +126,7 @@ Demo.Button = BI.inherit(BI.Widget, { }); return { type: "bi.left", - vgap: 200, + vgap: 100, hgap: 20, items: items } diff --git a/docs/base.css b/docs/base.css index 1ab5a81bd..c77bda2cc 100644 --- a/docs/base.css +++ b/docs/base.css @@ -714,72 +714,80 @@ li.CodeMirror-hint-active { cursor: pointer; font-size: 14px; } -.bi-button.button-common, -.bi-button.button-common .b-font { - color: #ffffff; +.bi-button.clear { + border-width: 0; + background-color: transparent; } -.bi-button.button-common .b-font:before { +.bi-button.clear:hover, +.bi-button.clear:active { + opacity: 0.75; + filter: alpha(opacity=75); +} +.bi-button.button-common { color: #ffffff; } +.bi-button.button-common.clear { + color: #3f8ce8; +} .bi-button.button-ignore { + color: #1a1a1a; background-color: #ffffff; border-color: #d4dadd; } -.bi-button.button-ignore, -.bi-button.button-ignore .b-font { - color: #1a1a1a; +.bi-button.button-ignore.clear { + background-color: transparent; + border-width: 0; } .bi-button.button-success { + color: #ffffff; background-color: #58cc7d; border-color: #58cc7d; } -.bi-button.button-success, -.bi-button.button-success .b-font { - color: #ffffff; -} -.bi-button.button-success .b-font:before { - color: #ffffff; +.bi-button.button-success.clear { + color: #0c6d23; + background-color: transparent; + border-width: 0; } .bi-button.button-warning { + color: #ffffff; background-color: #e85050; border-color: #e85050; } -.bi-button.button-warning, -.bi-button.button-warning .b-font { - color: #ffffff; -} -.bi-button.button-warning .b-font:before { - color: #ffffff; +.bi-button.button-warning.clear { + color: #e85050; + background-color: transparent; + border-width: 0; } .bi-button.button-common.disabled, .bi-button.button-success.disabled, .bi-button.button-warning.disabled { - background: #cccccc !important; - border-color: #c4c6c6 !important; -} -.bi-button.button-common.disabled, -.bi-button.button-success.disabled, -.bi-button.button-warning.disabled, -.bi-button.button-common.disabled .b-font, -.bi-button.button-success.disabled .b-font, -.bi-button.button-warning.disabled .b-font { - color: #ffffff !important; -} -.bi-button.button-common.disabled .b-font:before, -.bi-button.button-success.disabled .b-font:before, -.bi-button.button-warning.disabled .b-font:before { color: #ffffff !important; + background: #cccccc !important; + border-color: #cccccc !important; } .bi-button.button-ignore.disabled { + color: #cccccc !important; background: #ffffff !important; border-color: #d4dadd !important; } -.bi-button.button-ignore.disabled, -.bi-button.button-ignore.disabled .b-font { - color: #cccccc !important; -} -.bi-button.button-ignore.disabled .b-font:before { +.bi-button.button-common.disabled.clear, +.bi-button.button-success.disabled.clear, +.bi-button.button-warning.disabled.clear, +.bi-button.button-ignore.disabled.clear { color: #cccccc !important; + background: transparent !important; + border-width: 0 !important; +} +.bi-button.button-common.disabled.clear:hover, +.bi-button.button-success.disabled.clear:hover, +.bi-button.button-warning.disabled.clear:hover, +.bi-button.button-ignore.disabled.clear:hover, +.bi-button.button-common.disabled.clear:active, +.bi-button.button-success.disabled.clear:active, +.bi-button.button-warning.disabled.clear:active, +.bi-button.button-ignore.disabled.clear:active { + opacity: 1; + filter: alpha(opacity=100); } .bi-basic-button.button-common .bi-button-mask, .bi-basic-button.button-success .bi-button-mask, diff --git a/docs/base.js b/docs/base.js index cc33c66a5..2df4d71d4 100644 --- a/docs/base.js +++ b/docs/base.js @@ -15883,25 +15883,24 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) { * @cfg {'common'/'success'/'warning'/'ignore'} [options.level='common'] 按钮类型,用不同颜色强调不同的场景 */ BI.Button = BI.inherit(BI.BasicButton, { - _const: { - minWidth: 90 - }, - _defaultConfig: function () { + _defaultConfig: function (props) { var conf = BI.Button.superclass._defaultConfig.apply(this, arguments); return BI.extend(conf, { baseCls: (conf.baseCls || "") + ' bi-button', - shadow: true, + minWidth: props.clear === true ? 0 : 90, + shadow: props.clear !== true, isShadowShowingOnSelected: true, readonly: true, iconClass: "", level: 'common', + clear: false, //是否去掉边框和背景 textAlign: "center", whiteSpace: "nowrap", forceCenter: false, textWidth: null, textHeight: null, - hgap: 10, + hgap: props.clear ? 0 : 10, vgap: 0, tgap: 0, bgap: 0, @@ -15961,7 +15960,12 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) { value: o.value }); } - this.element.css({"min-width": this._const.minWidth - 2 + "px"}); + if (o.clear === true) { + this.element.addClass("clear"); + } + if (o.minWidth > 2) { + this.element.css({"min-width": o.minWidth - 2 + "px"}); + } }, doClick: function () { diff --git a/docs/case.js b/docs/case.js index 62c000dfa..139a0e831 100644 --- a/docs/case.js +++ b/docs/case.js @@ -6349,15 +6349,15 @@ BI.StateEditor = BI.inherit(BI.Single, { return; } if (BI.isString(v)) { - if (BI.isEmpty(v)) { - this.text.setText(BI.i18nText("BI-Basic_Unrestricted")); - this.text.setTitle(""); - this.text.element.addClass("state-editor-infinite-text"); - } else { - this.text.setText(v); - this.text.setTitle(v); - this.text.element.removeClass("state-editor-infinite-text"); - } + // if (BI.isEmpty(v)) { + // this.text.setText(BI.i18nText("BI-Basic_Unrestricted")); + // this.text.setTitle(""); + // this.text.element.addClass("state-editor-infinite-text"); + // } else { + this.text.setText(v); + this.text.setTitle(v); + this.text.element.removeClass("state-editor-infinite-text"); + // } return; } if (BI.isArray(v)) { diff --git a/docs/core.css b/docs/core.css index ed35e8965..25c5635c6 100644 --- a/docs/core.css +++ b/docs/core.css @@ -3078,8 +3078,8 @@ i { } .bi-z-index-mask { color: #ffffff; - background-color: rgba(26, 26, 26, 0.5); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#801a1a1a,endColorstr=#801a1a1a); + background-color: rgba(26, 26, 26, 0.3); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d1a1a1a,endColorstr=#4d1a1a1a); } .bi-list-item:hover, .bi-list-item.hover { diff --git a/docs/demo.js b/docs/demo.js index 2444b09d1..6d5ab9aa0 100644 --- a/docs/demo.js +++ b/docs/demo.js @@ -75,7 +75,67 @@ BI.i18n = {};$(function () { type: 'bi.button', text: '带图标的按钮', //level: 'ignore', - iconClass: "rename-font", + iconClass: "close-font", + height: 30 + } + }, { + el: { + type: 'bi.button', + text: '一般按钮', + clear: true, + level: 'common', + height: 30 + } + }, { + el: { + type: 'bi.button', + text: '表示成功状态按钮', + clear: true, + level: 'success', + height: 30 + } + }, + { + el: { + type: 'bi.button', + text: '表示警告状态的按钮', + clear: true, + level: 'warning', + height: 30 + } + }, { + el: { + type: 'bi.button', + text: '表示忽略状态的按钮', + clear: true, + level: 'ignore', + height: 30 + } + }, { + el: { + type: 'bi.button', + text: '普通灰化按钮', + clear: true, + disabled: true, + level: 'success', + height: 30 + } + }, { + el: { + type: 'bi.button', + text: '忽略状态灰化按钮', + clear: true, + disabled: true, + level: 'ignore', + height: 30 + } + }, { + el: { + type: 'bi.button', + text: '带图标的按钮', + clear: true, + //level: 'ignore', + iconClass: "close-font", height: 30 } } @@ -87,7 +147,7 @@ BI.i18n = {};$(function () { }); return { type: "bi.left", - vgap: 200, + vgap: 100, hgap: 20, items: items } diff --git a/docs/widget.js b/docs/widget.js index ed7154dfc..7f8cd9e69 100644 --- a/docs/widget.js +++ b/docs/widget.js @@ -9861,7 +9861,6 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { this.storeValue = v || {}; this._assertValue(this.storeValue); this.combo.setValue(this.storeValue); - this.trigger.setValue(this.storeValue); }, getValue: function () { diff --git a/src/base/single/button/buttons/button.js b/src/base/single/button/buttons/button.js index 9d84d1c81..3a0c8d2c4 100644 --- a/src/base/single/button/buttons/button.js +++ b/src/base/single/button/buttons/button.js @@ -9,25 +9,24 @@ * @cfg {'common'/'success'/'warning'/'ignore'} [options.level='common'] 按钮类型,用不同颜色强调不同的场景 */ BI.Button = BI.inherit(BI.BasicButton, { - _const: { - minWidth: 90 - }, - _defaultConfig: function () { + _defaultConfig: function (props) { var conf = BI.Button.superclass._defaultConfig.apply(this, arguments); return BI.extend(conf, { baseCls: (conf.baseCls || "") + ' bi-button', - shadow: true, + minWidth: props.clear === true ? 0 : 90, + shadow: props.clear !== true, isShadowShowingOnSelected: true, readonly: true, iconClass: "", level: 'common', + clear: false, //是否去掉边框和背景 textAlign: "center", whiteSpace: "nowrap", forceCenter: false, textWidth: null, textHeight: null, - hgap: 10, + hgap: props.clear ? 0 : 10, vgap: 0, tgap: 0, bgap: 0, @@ -87,7 +86,12 @@ value: o.value }); } - this.element.css({"min-width": this._const.minWidth - 2 + "px"}); + if (o.clear === true) { + this.element.addClass("clear"); + } + if (o.minWidth > 2) { + this.element.css({"min-width": o.minWidth - 2 + "px"}); + } }, doClick: function () { diff --git a/src/case/editor/editor.state.js b/src/case/editor/editor.state.js index 0f2581fad..f3f003673 100644 --- a/src/case/editor/editor.state.js +++ b/src/case/editor/editor.state.js @@ -233,15 +233,15 @@ BI.StateEditor = BI.inherit(BI.Single, { return; } if (BI.isString(v)) { - if (BI.isEmpty(v)) { - this.text.setText(BI.i18nText("BI-Basic_Unrestricted")); - this.text.setTitle(""); - this.text.element.addClass("state-editor-infinite-text"); - } else { - this.text.setText(v); - this.text.setTitle(v); - this.text.element.removeClass("state-editor-infinite-text"); - } + // if (BI.isEmpty(v)) { + // this.text.setText(BI.i18nText("BI-Basic_Unrestricted")); + // this.text.setTitle(""); + // this.text.element.addClass("state-editor-infinite-text"); + // } else { + this.text.setText(v); + this.text.setTitle(v); + this.text.element.removeClass("state-editor-infinite-text"); + // } return; } if (BI.isArray(v)) { diff --git a/src/css/base/single/button/button.css b/src/css/base/single/button/button.css index fbf356999..5299fea73 100644 --- a/src/css/base/single/button/button.css +++ b/src/css/base/single/button/button.css @@ -12,72 +12,80 @@ cursor: pointer; font-size: 14px; } -.bi-button.button-common, -.bi-button.button-common .b-font { - color: #ffffff; +.bi-button.clear { + border-width: 0; + background-color: transparent; +} +.bi-button.clear:hover, +.bi-button.clear:active { + opacity: 0.75; + filter: alpha(opacity=75); } -.bi-button.button-common .b-font:before { +.bi-button.button-common { color: #ffffff; } +.bi-button.button-common.clear { + color: #3f8ce8; +} .bi-button.button-ignore { + color: #1a1a1a; background-color: #ffffff; border-color: #d4dadd; } -.bi-button.button-ignore, -.bi-button.button-ignore .b-font { - color: #1a1a1a; +.bi-button.button-ignore.clear { + background-color: transparent; + border-width: 0; } .bi-button.button-success { + color: #ffffff; background-color: #58cc7d; border-color: #58cc7d; } -.bi-button.button-success, -.bi-button.button-success .b-font { - color: #ffffff; -} -.bi-button.button-success .b-font:before { - color: #ffffff; +.bi-button.button-success.clear { + color: #0c6d23; + background-color: transparent; + border-width: 0; } .bi-button.button-warning { + color: #ffffff; background-color: #e85050; border-color: #e85050; } -.bi-button.button-warning, -.bi-button.button-warning .b-font { - color: #ffffff; -} -.bi-button.button-warning .b-font:before { - color: #ffffff; +.bi-button.button-warning.clear { + color: #e85050; + background-color: transparent; + border-width: 0; } .bi-button.button-common.disabled, .bi-button.button-success.disabled, .bi-button.button-warning.disabled { - background: #cccccc !important; - border-color: #c4c6c6 !important; -} -.bi-button.button-common.disabled, -.bi-button.button-success.disabled, -.bi-button.button-warning.disabled, -.bi-button.button-common.disabled .b-font, -.bi-button.button-success.disabled .b-font, -.bi-button.button-warning.disabled .b-font { - color: #ffffff !important; -} -.bi-button.button-common.disabled .b-font:before, -.bi-button.button-success.disabled .b-font:before, -.bi-button.button-warning.disabled .b-font:before { color: #ffffff !important; + background: #cccccc !important; + border-color: #cccccc !important; } .bi-button.button-ignore.disabled { + color: #cccccc !important; background: #ffffff !important; border-color: #d4dadd !important; } -.bi-button.button-ignore.disabled, -.bi-button.button-ignore.disabled .b-font { - color: #cccccc !important; -} -.bi-button.button-ignore.disabled .b-font:before { +.bi-button.button-common.disabled.clear, +.bi-button.button-success.disabled.clear, +.bi-button.button-warning.disabled.clear, +.bi-button.button-ignore.disabled.clear { color: #cccccc !important; + background: transparent !important; + border-width: 0 !important; +} +.bi-button.button-common.disabled.clear:hover, +.bi-button.button-success.disabled.clear:hover, +.bi-button.button-warning.disabled.clear:hover, +.bi-button.button-ignore.disabled.clear:hover, +.bi-button.button-common.disabled.clear:active, +.bi-button.button-success.disabled.clear:active, +.bi-button.button-warning.disabled.clear:active, +.bi-button.button-ignore.disabled.clear:active { + opacity: 1; + filter: alpha(opacity=100); } .bi-basic-button.button-common .bi-button-mask, .bi-basic-button.button-success .bi-button-mask, diff --git a/src/css/core/utils/common.css b/src/css/core/utils/common.css index 23ca02db3..fb4f4a575 100644 --- a/src/css/core/utils/common.css +++ b/src/css/core/utils/common.css @@ -125,8 +125,8 @@ } .bi-z-index-mask { color: #ffffff; - background-color: rgba(26, 26, 26, 0.5); - filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#801a1a1a,endColorstr=#801a1a1a); + background-color: rgba(26, 26, 26, 0.3); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#4d1a1a1a,endColorstr=#4d1a1a1a); } .bi-list-item:hover, .bi-list-item.hover { diff --git a/src/less/base/single/button/button.less b/src/less/base/single/button/button.less index 8602d52a7..2762139ec 100644 --- a/src/less/base/single/button/button.less +++ b/src/less/base/single/button/button.less @@ -8,62 +8,80 @@ vertical-align: middle; cursor: pointer; font-size: 14px; + &.clear { + border-width: 0; + background-color: transparent; + &:hover, &:active { + .opacity(0.75); + } + } &.button-common { - &, & .b-font { + & { color: @color-bi-text; } - & .b-font:before { - color: @color-bi-text; + &.clear { + color: @color-bi-text-highlight; } } &.button-ignore { - &, & .b-font { + & { color: @color-bi-text-black; + background-color: @color-bi-background-default; + border-color: @color-bi-border-line; + } + &.clear { + background-color: transparent; + border-width: 0; } - background-color: @color-bi-background-default; - border-color: @color-bi-split-dark; } &.button-success { - &, & .b-font { + & { color: @color-bi-text; + background-color: @color-bi-background-success; + border-color: @color-bi-border-success; } - background-color: @color-bi-background-success; - border-color: @color-bi-border-success; - & .b-font:before { - color: @color-bi-text; + &.clear { + color: @color-bi-text-success; + background-color: transparent; + border-width: 0; } } &.button-warning { - &, & .b-font { + & { color: @color-bi-text; + background-color: @color-bi-background-delete; + border-color: @color-bi-border-delete; } - background-color: @color-bi-background-delete; - border-color: @color-bi-border-delete; - & .b-font:before { - color: @color-bi-text; + &.clear { + color: @color-bi-text-warning; + background-color: transparent; + border-width: 0; } } &.button-common.disabled, &.button-success.disabled, &.button-warning.disabled { - &, & .b-font { - color: @color-bi-text !important; - } - & .b-font:before { - color: @color-bi-text !important; - } + color: @color-bi-text !important; background: @color-bi-background-disabled !important; - border-color: @color-bi-split-disabled !important; + border-color: @color-bi-border-disabled !important; } &.button-ignore.disabled { - &, & .b-font { - color: @color-bi-text-disabled !important; - } - & .b-font:before { + color: @color-bi-text-disabled !important; + background: @color-bi-background-default !important; + border-color: @color-bi-border-line !important; + } + &.button-common.disabled, + &.button-success.disabled, + &.button-warning.disabled, + &.button-ignore.disabled { + &.clear { color: @color-bi-text-disabled !important; + background: transparent !important; + border-width: 0 !important; + &:hover, &:active { + .opacity(1); + } } - background: @color-bi-background-default !important; - border-color: @color-bi-split-dark !important; } } diff --git a/src/less/core/utils/common.less b/src/less/core/utils/common.less index 6537c9d8e..221796870 100644 --- a/src/less/core/utils/common.less +++ b/src/less/core/utils/common.less @@ -175,7 +175,7 @@ .bi-z-index-mask { color: @color-bi-background-default; - .background-color(@color-bi-background-black, 50%); + .background-color(@color-bi-background-black, 30%); } //只有背景变化 diff --git a/src/less/lib/colors.less b/src/less/lib/colors.less index d4f4529f2..f69816112 100644 --- a/src/less/lib/colors.less +++ b/src/less/lib/colors.less @@ -60,13 +60,6 @@ @color-bi-background-virtual-blue: @background-color-virtual-blue; -//深灰色分割线 -@color-bi-split-dark: @split-color-dark; -//浅灰色分割线 -@color-bi-split-light: @split-color-light; -//灰化分割线 -@color-bi-split-disabled: @split-color-disabled; - //黑色边框色 @color-bi-border-black: @border-color-black; //默认边框色 @@ -77,6 +70,8 @@ @color-bi-border-line: @border-color-line; //深色系边框线色 @color-bi-border-line-theme-dark: @border-color-line-theme-dark; +//灰化分割线 +@color-bi-border-disabled: @border-color-disabled; //成功边框色 @color-bi-border-success: @border-color-success; //失败边框色 diff --git a/src/less/lib/constant.less b/src/less/lib/constant.less index c51362983..81c5fa713 100644 --- a/src/less/lib/constant.less +++ b/src/less/lib/constant.less @@ -68,7 +68,8 @@ @border-color-error: #f4cbcb; @border-color-normal-success: #eddea2; -@border-color-dark: #c4c6c6; +//split color +@border-color-disabled: #cccccc; //scroll color @scroll-color: #666666; @@ -77,10 +78,6 @@ @water-mark-color: #cccccc; @water-mark-color-theme-dark: #666666; -//split color -@split-color-light: #eaeaea; -@split-color-dark: #d4dadd; -@split-color-disabled: #c4c6c6; //shadow color @shadow-color-black: #000000; diff --git a/src/widget/multiselect/multiselect.combo.js b/src/widget/multiselect/multiselect.combo.js index b687714b5..f369f42a3 100644 --- a/src/widget/multiselect/multiselect.combo.js +++ b/src/widget/multiselect/multiselect.combo.js @@ -328,7 +328,6 @@ BI.MultiSelectCombo = BI.inherit(BI.Single, { this.storeValue = v || {}; this._assertValue(this.storeValue); this.combo.setValue(this.storeValue); - this.trigger.setValue(this.storeValue); }, getValue: function () {