From b5d600b175403c6b8de87bda6b23ba046c145764 Mon Sep 17 00:00:00 2001 From: guy Date: Thu, 11 May 2017 19:23:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bi/base.css | 74 ++++++++++++++++--- bi/base.js | 14 +++- bi/widget.js | 9 ++- demo/js/base/button/demo.button.js | 60 +++++++++++++++ docs/base.css | 74 ++++++++++++++++--- docs/base.js | 14 +++- docs/demo.js | 60 +++++++++++++++ docs/widget.js | 9 ++- src/base/single/button/buttons/button.js | 14 +++- src/css/base/single/button/button.css | 74 ++++++++++++++++--- src/less/base/single/button/button.less | 47 +++++++++--- .../sequencetable/listnumber.sequencetable.js | 7 +- .../sequencetable/treenumber.sequencetable.js | 2 + 13 files changed, 398 insertions(+), 60 deletions(-) diff --git a/bi/base.css b/bi/base.css index b136b5b4d..2bd711754 100644 --- a/bi/base.css +++ b/bi/base.css @@ -714,6 +714,13 @@ li.CodeMirror-hint-active { cursor: pointer; font-size: 14px; } +.bi-button.block { + font-size: inherit; + border-width: 0; + -webkit-border-radius: 0px; + -moz-border-radius: 0px; + border-radius: 0px; +} .bi-button.clear { font-size: inherit; border-width: 0; @@ -724,61 +731,106 @@ li.CodeMirror-hint-active { opacity: 0.75; filter: alpha(opacity=75); } -.bi-button.button-common { +.bi-button.button-common, +.bi-button.button-common .b-font:before { color: #ffffff; } -.bi-button.button-common.clear { +.bi-button.button-common.clear, +.bi-button.button-common.clear .b-font:before { color: #3f8ce8; } .bi-button.button-ignore { - color: #1a1a1a; background-color: #ffffff; border-color: #d4dadd; } +.bi-button.button-ignore, +.bi-button.button-ignore .b-font:before { + 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:before { + color: #ffffff; +} .bi-button.button-success.clear { - color: #0c6d23; background-color: transparent; border-width: 0; } +.bi-button.button-success.clear, +.bi-button.button-success.clear .b-font:before { + color: #0c6d23; +} .bi-button.button-warning { - color: #ffffff; background-color: #e85050; border-color: #e85050; } +.bi-button.button-warning, +.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-warning.clear, +.bi-button.button-warning.clear .b-font:before { + color: #e85050; +} .bi-button.button-common.disabled, .bi-button.button-success.disabled, -.bi-button.button-warning.disabled { - color: #ffffff !important; +.bi-button.button-warning.disabled, +.bi-button.button-common.disabled.base-disabled, +.bi-button.button-success.disabled.base-disabled, +.bi-button.button-warning.disabled.base-disabled { background: #cccccc !important; border-color: #cccccc !important; } +.bi-button.button-common.disabled, +.bi-button.button-success.disabled, +.bi-button.button-warning.disabled, +.bi-button.button-common.disabled.base-disabled, +.bi-button.button-success.disabled.base-disabled, +.bi-button.button-warning.disabled.base-disabled, +.bi-button.button-common.disabled .b-font:before, +.bi-button.button-success.disabled .b-font:before, +.bi-button.button-warning.disabled .b-font:before, +.bi-button.button-common.disabled.base-disabled .b-font:before, +.bi-button.button-success.disabled.base-disabled .b-font:before, +.bi-button.button-warning.disabled.base-disabled .b-font:before { + color: #ffffff !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:before { + color: #cccccc !important; +} .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, +.bi-button.button-success.disabled.clear, +.bi-button.button-warning.disabled.clear, +.bi-button.button-ignore.disabled.clear, +.bi-button.button-common.disabled.clear .b-font:before, +.bi-button.button-success.disabled.clear .b-font:before, +.bi-button.button-warning.disabled.clear .b-font:before, +.bi-button.button-ignore.disabled.clear .b-font:before { + color: #cccccc !important; +} .bi-button.button-common.disabled.clear:hover, .bi-button.button-success.disabled.clear:hover, .bi-button.button-warning.disabled.clear:hover, diff --git a/bi/base.js b/bi/base.js index 2df4d71d4..888d21cba 100644 --- a/bi/base.js +++ b/bi/base.js @@ -15888,12 +15888,13 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) { var conf = BI.Button.superclass._defaultConfig.apply(this, arguments); return BI.extend(conf, { baseCls: (conf.baseCls || "") + ' bi-button', - minWidth: props.clear === true ? 0 : 90, + minWidth: (props.block === true || props.clear === true) ? 0 : 90, shadow: props.clear !== true, isShadowShowingOnSelected: true, readonly: true, iconClass: "", level: 'common', + block: false, //是否块状显示,即不显示边框,没有最小宽度的限制 clear: false, //是否去掉边框和背景 textAlign: "center", whiteSpace: "nowrap", @@ -15912,8 +15913,10 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) { _init: function () { BI.Button.superclass._init.apply(this, arguments); var o = this.options, self = this; - if (BI.isNumber(o.height)) { + if (BI.isNumber(o.height) && !o.clear && !o.block) { this.element.css({height: o.height - 2, lineHeight: (o.height - 2) + 'px'}); + } else { + this.element.css({lineHeight: o.height + 'px'}); } if (BI.isKey(o.iconClass)) { this.icon = BI.createWidget({ @@ -15960,6 +15963,9 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) { value: o.value }); } + if (o.block === true) { + this.element.addClass("block"); + } if (o.clear === true) { this.element.addClass("clear"); } @@ -15989,8 +15995,8 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) { setEnable: function (b) { BI.Button.superclass.setEnable.apply(this, arguments); - this.text.setEnable(b); - this.icon && this.icon.setEnable(b); + // this.text.setEnable(b); + // this.icon && this.icon.setEnable(b); }, doRedMark: function () { diff --git a/bi/widget.js b/bi/widget.js index 7f8cd9e69..be01e50de 100644 --- a/bi/widget.js +++ b/bi/widget.js @@ -173,8 +173,10 @@ BI.SequenceTableTreeNumber = BI.inherit(BI.Widget, { var items = this.layout.attr("items"); if (o.isNeedFreeze === false) { items[0].height = 0; + items[1].height = 0; } else if (o.isNeedFreeze === true) { items[0].height = headerHeight; + items[1].height = 2; } this.layout.attr("items", items); this.layout.resize(); @@ -15816,6 +15818,9 @@ BI.SequenceTableListNumber = BI.inherit(BI.Widget, { items: [{ el: this.headerContainer, height: o.headerRowSize * o.header.length - 2 + }, { + el: {type: "bi.layout"}, + height: 2 }, { el: this.scrollContainer }] @@ -15825,12 +15830,14 @@ BI.SequenceTableListNumber = BI.inherit(BI.Widget, { _layout: function () { var self = this, o = this.options; - var headerHeight = o.headerRowSize * o.header.length; + var headerHeight = o.headerRowSize * o.header.length - 2; var items = this.layout.attr("items"); if (o.isNeedFreeze === false) { items[0].height = 0; + items[1].height = 0; } else if (o.isNeedFreeze === true) { items[0].height = headerHeight; + items[1].height = 2; } this.layout.attr("items", items); this.layout.resize(); diff --git a/demo/js/base/button/demo.button.js b/demo/js/base/button/demo.button.js index 970eb401d..997666ef9 100644 --- a/demo/js/base/button/demo.button.js +++ b/demo/js/base/button/demo.button.js @@ -57,6 +57,66 @@ Demo.Button = BI.inherit(BI.Widget, { iconClass: "close-font", height: 30 } + }, { + el: { + type: 'bi.button', + text: '一般按钮', + block: true, + level: 'common', + height: 30 + } + }, { + el: { + type: 'bi.button', + text: '表示成功状态按钮', + block: true, + level: 'success', + height: 30 + } + }, + { + el: { + type: 'bi.button', + text: '表示警告状态的按钮', + block: true, + level: 'warning', + height: 30 + } + }, { + el: { + type: 'bi.button', + text: '表示忽略状态的按钮', + block: true, + level: 'ignore', + height: 30 + } + }, { + el: { + type: 'bi.button', + text: '普通灰化按钮', + block: true, + disabled: true, + level: 'success', + height: 30 + } + }, { + el: { + type: 'bi.button', + text: '忽略状态灰化按钮', + block: true, + disabled: true, + level: 'ignore', + height: 30 + } + }, { + el: { + type: 'bi.button', + text: '带图标的按钮', + block: true, + //level: 'ignore', + iconClass: "close-font", + height: 30 + } }, { el: { type: 'bi.button', diff --git a/docs/base.css b/docs/base.css index b136b5b4d..2bd711754 100644 --- a/docs/base.css +++ b/docs/base.css @@ -714,6 +714,13 @@ li.CodeMirror-hint-active { cursor: pointer; font-size: 14px; } +.bi-button.block { + font-size: inherit; + border-width: 0; + -webkit-border-radius: 0px; + -moz-border-radius: 0px; + border-radius: 0px; +} .bi-button.clear { font-size: inherit; border-width: 0; @@ -724,61 +731,106 @@ li.CodeMirror-hint-active { opacity: 0.75; filter: alpha(opacity=75); } -.bi-button.button-common { +.bi-button.button-common, +.bi-button.button-common .b-font:before { color: #ffffff; } -.bi-button.button-common.clear { +.bi-button.button-common.clear, +.bi-button.button-common.clear .b-font:before { color: #3f8ce8; } .bi-button.button-ignore { - color: #1a1a1a; background-color: #ffffff; border-color: #d4dadd; } +.bi-button.button-ignore, +.bi-button.button-ignore .b-font:before { + 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:before { + color: #ffffff; +} .bi-button.button-success.clear { - color: #0c6d23; background-color: transparent; border-width: 0; } +.bi-button.button-success.clear, +.bi-button.button-success.clear .b-font:before { + color: #0c6d23; +} .bi-button.button-warning { - color: #ffffff; background-color: #e85050; border-color: #e85050; } +.bi-button.button-warning, +.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-warning.clear, +.bi-button.button-warning.clear .b-font:before { + color: #e85050; +} .bi-button.button-common.disabled, .bi-button.button-success.disabled, -.bi-button.button-warning.disabled { - color: #ffffff !important; +.bi-button.button-warning.disabled, +.bi-button.button-common.disabled.base-disabled, +.bi-button.button-success.disabled.base-disabled, +.bi-button.button-warning.disabled.base-disabled { background: #cccccc !important; border-color: #cccccc !important; } +.bi-button.button-common.disabled, +.bi-button.button-success.disabled, +.bi-button.button-warning.disabled, +.bi-button.button-common.disabled.base-disabled, +.bi-button.button-success.disabled.base-disabled, +.bi-button.button-warning.disabled.base-disabled, +.bi-button.button-common.disabled .b-font:before, +.bi-button.button-success.disabled .b-font:before, +.bi-button.button-warning.disabled .b-font:before, +.bi-button.button-common.disabled.base-disabled .b-font:before, +.bi-button.button-success.disabled.base-disabled .b-font:before, +.bi-button.button-warning.disabled.base-disabled .b-font:before { + color: #ffffff !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:before { + color: #cccccc !important; +} .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, +.bi-button.button-success.disabled.clear, +.bi-button.button-warning.disabled.clear, +.bi-button.button-ignore.disabled.clear, +.bi-button.button-common.disabled.clear .b-font:before, +.bi-button.button-success.disabled.clear .b-font:before, +.bi-button.button-warning.disabled.clear .b-font:before, +.bi-button.button-ignore.disabled.clear .b-font:before { + color: #cccccc !important; +} .bi-button.button-common.disabled.clear:hover, .bi-button.button-success.disabled.clear:hover, .bi-button.button-warning.disabled.clear:hover, diff --git a/docs/base.js b/docs/base.js index 2df4d71d4..888d21cba 100644 --- a/docs/base.js +++ b/docs/base.js @@ -15888,12 +15888,13 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) { var conf = BI.Button.superclass._defaultConfig.apply(this, arguments); return BI.extend(conf, { baseCls: (conf.baseCls || "") + ' bi-button', - minWidth: props.clear === true ? 0 : 90, + minWidth: (props.block === true || props.clear === true) ? 0 : 90, shadow: props.clear !== true, isShadowShowingOnSelected: true, readonly: true, iconClass: "", level: 'common', + block: false, //是否块状显示,即不显示边框,没有最小宽度的限制 clear: false, //是否去掉边框和背景 textAlign: "center", whiteSpace: "nowrap", @@ -15912,8 +15913,10 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) { _init: function () { BI.Button.superclass._init.apply(this, arguments); var o = this.options, self = this; - if (BI.isNumber(o.height)) { + if (BI.isNumber(o.height) && !o.clear && !o.block) { this.element.css({height: o.height - 2, lineHeight: (o.height - 2) + 'px'}); + } else { + this.element.css({lineHeight: o.height + 'px'}); } if (BI.isKey(o.iconClass)) { this.icon = BI.createWidget({ @@ -15960,6 +15963,9 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) { value: o.value }); } + if (o.block === true) { + this.element.addClass("block"); + } if (o.clear === true) { this.element.addClass("clear"); } @@ -15989,8 +15995,8 @@ BI.shortcut("bi.image_button", BI.ImageButton);(function ($) { setEnable: function (b) { BI.Button.superclass.setEnable.apply(this, arguments); - this.text.setEnable(b); - this.icon && this.icon.setEnable(b); + // this.text.setEnable(b); + // this.icon && this.icon.setEnable(b); }, doRedMark: function () { diff --git a/docs/demo.js b/docs/demo.js index 6d5ab9aa0..3375f8fe1 100644 --- a/docs/demo.js +++ b/docs/demo.js @@ -78,6 +78,66 @@ BI.i18n = {};$(function () { iconClass: "close-font", height: 30 } + }, { + el: { + type: 'bi.button', + text: '一般按钮', + block: true, + level: 'common', + height: 30 + } + }, { + el: { + type: 'bi.button', + text: '表示成功状态按钮', + block: true, + level: 'success', + height: 30 + } + }, + { + el: { + type: 'bi.button', + text: '表示警告状态的按钮', + block: true, + level: 'warning', + height: 30 + } + }, { + el: { + type: 'bi.button', + text: '表示忽略状态的按钮', + block: true, + level: 'ignore', + height: 30 + } + }, { + el: { + type: 'bi.button', + text: '普通灰化按钮', + block: true, + disabled: true, + level: 'success', + height: 30 + } + }, { + el: { + type: 'bi.button', + text: '忽略状态灰化按钮', + block: true, + disabled: true, + level: 'ignore', + height: 30 + } + }, { + el: { + type: 'bi.button', + text: '带图标的按钮', + block: true, + //level: 'ignore', + iconClass: "close-font", + height: 30 + } }, { el: { type: 'bi.button', diff --git a/docs/widget.js b/docs/widget.js index 7f8cd9e69..be01e50de 100644 --- a/docs/widget.js +++ b/docs/widget.js @@ -173,8 +173,10 @@ BI.SequenceTableTreeNumber = BI.inherit(BI.Widget, { var items = this.layout.attr("items"); if (o.isNeedFreeze === false) { items[0].height = 0; + items[1].height = 0; } else if (o.isNeedFreeze === true) { items[0].height = headerHeight; + items[1].height = 2; } this.layout.attr("items", items); this.layout.resize(); @@ -15816,6 +15818,9 @@ BI.SequenceTableListNumber = BI.inherit(BI.Widget, { items: [{ el: this.headerContainer, height: o.headerRowSize * o.header.length - 2 + }, { + el: {type: "bi.layout"}, + height: 2 }, { el: this.scrollContainer }] @@ -15825,12 +15830,14 @@ BI.SequenceTableListNumber = BI.inherit(BI.Widget, { _layout: function () { var self = this, o = this.options; - var headerHeight = o.headerRowSize * o.header.length; + var headerHeight = o.headerRowSize * o.header.length - 2; var items = this.layout.attr("items"); if (o.isNeedFreeze === false) { items[0].height = 0; + items[1].height = 0; } else if (o.isNeedFreeze === true) { items[0].height = headerHeight; + items[1].height = 2; } this.layout.attr("items", items); this.layout.resize(); diff --git a/src/base/single/button/buttons/button.js b/src/base/single/button/buttons/button.js index 3a0c8d2c4..51854f5c2 100644 --- a/src/base/single/button/buttons/button.js +++ b/src/base/single/button/buttons/button.js @@ -14,12 +14,13 @@ var conf = BI.Button.superclass._defaultConfig.apply(this, arguments); return BI.extend(conf, { baseCls: (conf.baseCls || "") + ' bi-button', - minWidth: props.clear === true ? 0 : 90, + minWidth: (props.block === true || props.clear === true) ? 0 : 90, shadow: props.clear !== true, isShadowShowingOnSelected: true, readonly: true, iconClass: "", level: 'common', + block: false, //是否块状显示,即不显示边框,没有最小宽度的限制 clear: false, //是否去掉边框和背景 textAlign: "center", whiteSpace: "nowrap", @@ -38,8 +39,10 @@ _init: function () { BI.Button.superclass._init.apply(this, arguments); var o = this.options, self = this; - if (BI.isNumber(o.height)) { + if (BI.isNumber(o.height) && !o.clear && !o.block) { this.element.css({height: o.height - 2, lineHeight: (o.height - 2) + 'px'}); + } else { + this.element.css({lineHeight: o.height + 'px'}); } if (BI.isKey(o.iconClass)) { this.icon = BI.createWidget({ @@ -86,6 +89,9 @@ value: o.value }); } + if (o.block === true) { + this.element.addClass("block"); + } if (o.clear === true) { this.element.addClass("clear"); } @@ -115,8 +121,8 @@ setEnable: function (b) { BI.Button.superclass.setEnable.apply(this, arguments); - this.text.setEnable(b); - this.icon && this.icon.setEnable(b); + // this.text.setEnable(b); + // this.icon && this.icon.setEnable(b); }, doRedMark: function () { diff --git a/src/css/base/single/button/button.css b/src/css/base/single/button/button.css index 47497730f..b638bcd52 100644 --- a/src/css/base/single/button/button.css +++ b/src/css/base/single/button/button.css @@ -12,6 +12,13 @@ cursor: pointer; font-size: 14px; } +.bi-button.block { + font-size: inherit; + border-width: 0; + -webkit-border-radius: 0px; + -moz-border-radius: 0px; + border-radius: 0px; +} .bi-button.clear { font-size: inherit; border-width: 0; @@ -22,61 +29,106 @@ opacity: 0.75; filter: alpha(opacity=75); } -.bi-button.button-common { +.bi-button.button-common, +.bi-button.button-common .b-font:before { color: #ffffff; } -.bi-button.button-common.clear { +.bi-button.button-common.clear, +.bi-button.button-common.clear .b-font:before { color: #3f8ce8; } .bi-button.button-ignore { - color: #1a1a1a; background-color: #ffffff; border-color: #d4dadd; } +.bi-button.button-ignore, +.bi-button.button-ignore .b-font:before { + 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:before { + color: #ffffff; +} .bi-button.button-success.clear { - color: #0c6d23; background-color: transparent; border-width: 0; } +.bi-button.button-success.clear, +.bi-button.button-success.clear .b-font:before { + color: #0c6d23; +} .bi-button.button-warning { - color: #ffffff; background-color: #e85050; border-color: #e85050; } +.bi-button.button-warning, +.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-warning.clear, +.bi-button.button-warning.clear .b-font:before { + color: #e85050; +} .bi-button.button-common.disabled, .bi-button.button-success.disabled, -.bi-button.button-warning.disabled { - color: #ffffff !important; +.bi-button.button-warning.disabled, +.bi-button.button-common.disabled.base-disabled, +.bi-button.button-success.disabled.base-disabled, +.bi-button.button-warning.disabled.base-disabled { background: #cccccc !important; border-color: #cccccc !important; } +.bi-button.button-common.disabled, +.bi-button.button-success.disabled, +.bi-button.button-warning.disabled, +.bi-button.button-common.disabled.base-disabled, +.bi-button.button-success.disabled.base-disabled, +.bi-button.button-warning.disabled.base-disabled, +.bi-button.button-common.disabled .b-font:before, +.bi-button.button-success.disabled .b-font:before, +.bi-button.button-warning.disabled .b-font:before, +.bi-button.button-common.disabled.base-disabled .b-font:before, +.bi-button.button-success.disabled.base-disabled .b-font:before, +.bi-button.button-warning.disabled.base-disabled .b-font:before { + color: #ffffff !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:before { + color: #cccccc !important; +} .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, +.bi-button.button-success.disabled.clear, +.bi-button.button-warning.disabled.clear, +.bi-button.button-ignore.disabled.clear, +.bi-button.button-common.disabled.clear .b-font:before, +.bi-button.button-success.disabled.clear .b-font:before, +.bi-button.button-warning.disabled.clear .b-font:before, +.bi-button.button-ignore.disabled.clear .b-font:before { + color: #cccccc !important; +} .bi-button.button-common.disabled.clear:hover, .bi-button.button-success.disabled.clear:hover, .bi-button.button-warning.disabled.clear:hover, diff --git a/src/less/base/single/button/button.less b/src/less/base/single/button/button.less index 1ea6a66f7..91008e30e 100644 --- a/src/less/base/single/button/button.less +++ b/src/less/base/single/button/button.less @@ -8,6 +8,11 @@ vertical-align: middle; cursor: pointer; font-size: 14px; + &.block { + font-size: inherit; + border-width: 0; + .border-radius(0px); + } &.clear { font-size: inherit; border-width: 0; @@ -17,16 +22,18 @@ } } &.button-common { - & { + &, & .b-font:before { color: @color-bi-text; } - &.clear { + &.clear, &.clear .b-font:before { color: @color-bi-text-highlight; } } &.button-ignore { & { - color: @color-bi-text-black; + &, & .b-font:before { + color: @color-bi-text-black; + } background-color: @color-bi-background-default; border-color: @color-bi-border-line; } @@ -37,24 +44,32 @@ } &.button-success { & { - color: @color-bi-text; + &, & .b-font:before { + color: @color-bi-text; + } background-color: @color-bi-background-success; border-color: @color-bi-border-success; } &.clear { - color: @color-bi-text-success; + &, & .b-font:before { + color: @color-bi-text-success; + } background-color: transparent; border-width: 0; } } &.button-warning { & { - color: @color-bi-text; + &, & .b-font:before { + color: @color-bi-text; + } background-color: @color-bi-background-delete; border-color: @color-bi-border-delete; } &.clear { - color: @color-bi-text-warning; + &, & .b-font:before { + color: @color-bi-text-warning; + } background-color: transparent; border-width: 0; } @@ -62,12 +77,18 @@ &.button-common.disabled, &.button-success.disabled, &.button-warning.disabled { - color: @color-bi-text !important; - background: @color-bi-background-disabled !important; - border-color: @color-bi-border-disabled !important; + &, &.base-disabled { + &, & .b-font:before { + color: @color-bi-text !important; + } + background: @color-bi-background-disabled !important; + border-color: @color-bi-border-disabled !important; + } } &.button-ignore.disabled { - 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; } @@ -76,7 +97,9 @@ &.button-warning.disabled, &.button-ignore.disabled { &.clear { - color: @color-bi-text-disabled !important; + &, & .b-font:before { + color: @color-bi-text-disabled !important; + } background: transparent !important; border-width: 0 !important; &:hover, &:active { diff --git a/src/widget/sequencetable/listnumber.sequencetable.js b/src/widget/sequencetable/listnumber.sequencetable.js index 5e159f5a8..bab51144a 100644 --- a/src/widget/sequencetable/listnumber.sequencetable.js +++ b/src/widget/sequencetable/listnumber.sequencetable.js @@ -61,6 +61,9 @@ BI.SequenceTableListNumber = BI.inherit(BI.Widget, { items: [{ el: this.headerContainer, height: o.headerRowSize * o.header.length - 2 + }, { + el: {type: "bi.layout"}, + height: 2 }, { el: this.scrollContainer }] @@ -70,12 +73,14 @@ BI.SequenceTableListNumber = BI.inherit(BI.Widget, { _layout: function () { var self = this, o = this.options; - var headerHeight = o.headerRowSize * o.header.length; + var headerHeight = o.headerRowSize * o.header.length - 2; var items = this.layout.attr("items"); if (o.isNeedFreeze === false) { items[0].height = 0; + items[1].height = 0; } else if (o.isNeedFreeze === true) { items[0].height = headerHeight; + items[1].height = 2; } this.layout.attr("items", items); this.layout.resize(); diff --git a/src/widget/sequencetable/treenumber.sequencetable.js b/src/widget/sequencetable/treenumber.sequencetable.js index 766c65eab..d1ae137dc 100644 --- a/src/widget/sequencetable/treenumber.sequencetable.js +++ b/src/widget/sequencetable/treenumber.sequencetable.js @@ -173,8 +173,10 @@ BI.SequenceTableTreeNumber = BI.inherit(BI.Widget, { var items = this.layout.attr("items"); if (o.isNeedFreeze === false) { items[0].height = 0; + items[1].height = 0; } else if (o.isNeedFreeze === true) { items[0].height = headerHeight; + items[1].height = 2; } this.layout.attr("items", items); this.layout.resize();