diff --git a/src/case/button/icon/iconhalf/icon.half.js b/src/case/button/icon/iconhalf/icon.half.js index 83cdedcec..6a46b165e 100644 --- a/src/case/button/icon/iconhalf/icon.half.js +++ b/src/case/button/icon/iconhalf/icon.half.js @@ -14,20 +14,6 @@ BI.HalfButton = BI.inherit(BI.BasicButton, { }); }, - _init: function () { - BI.HalfButton.superclass._init.apply(this, arguments); - BI.createWidget({ - type: "bi.center_adapt", - element: this.element, - items: [{ - type: "bi.layout", - cls: "bi-high-light-background", - width: 8, - height: 8 - }] - }); - }, - doClick: function () { BI.HalfButton.superclass.doClick.apply(this, arguments); if(this.isValid()) { diff --git a/src/case/ztree/jquery.ztree.excheck-3.5.js b/src/case/ztree/jquery.ztree.excheck-3.5.js index 38f118ffa..ea1e9d277 100644 --- a/src/case/ztree/jquery.ztree.excheck-3.5.js +++ b/src/case/ztree/jquery.ztree.excheck-3.5.js @@ -439,7 +439,23 @@ } var chkName = setting.check.chkStyle + "_" + (node[checkedKey] ? c.TRUE : c.FALSE) + "_" + fullStyle; chkName = (node.check_Focus && node.chkDisabled !== true) ? chkName + "_" + c.FOCUS : chkName; - return consts.className.BUTTON + " " + c.DEFAULT + " " + chkName; + var chClass = consts.className.BUTTON + " " + c.DEFAULT + " " + chkName; + switch (chkName) { + case 'checkbox_true_part': + case 'checkbox_true_part_focus': + chClass += ' bi-half-button bi-high-light-border'; + break; + case 'checkbox_true_full': + case 'checkbox_true_full_focus': + chClass += ' bi-checkbox checkbox-content bi-high-light-background active'; + break; + case 'checkbox_false_full': + case 'checkbox_false_full_focus': + default: + chClass += ' bi-checkbox checkbox-content'; + break; + } + return chClass; }, repairAllChk: function(setting, checked) { if (setting.check.enable && setting.check.chkStyle === consts.checkbox.STYLE) { diff --git a/src/less/base/single/button/button.half.less b/src/less/base/single/button/button.half.less index ae5fa1171..d20250a14 100644 --- a/src/less/base/single/button/button.half.less +++ b/src/less/base/single/button/button.half.less @@ -2,4 +2,13 @@ .bi-half-button { .border-radius(2px); + &:after { + position: absolute; + left: 3px; + top: 3px; + width: 8px; + height: 8px; + background-color: @color-bi-background-highlight; + content: ''; + } } \ No newline at end of file diff --git a/src/less/base/single/input/checkbox.less b/src/less/base/single/input/checkbox.less index 42fa02d8b..6d4e6731e 100644 --- a/src/less/base/single/input/checkbox.less +++ b/src/less/base/single/input/checkbox.less @@ -1,7 +1,7 @@ @import "../../../index"; .bi-checkbox { - & .checkbox-content { + & .checkbox-content, &.checkbox-content { .border-radius(2px); border: 1px solid @color-bi-border-dark-line; &:after { @@ -22,7 +22,7 @@ } } &.active, &:active { - & .checkbox-content{ + & .checkbox-content, &.checkbox-content{ border-color: @color-bi-border-highlight; &:after { border-color: @color-bi-border-default; @@ -31,15 +31,15 @@ } } &.disabled { - & .checkbox-content { + & .checkbox-content, &.checkbox-content { background-color: @color-bi-background-disabled; border-color: @color-bi-border-disabled; } - & .checkbox-content:after { + & .checkbox-content:after, &.checkbox-content:after { opacity: 0; } &.active { - & .checkbox-content { + & .checkbox-content, &.checkbox-content { background-color: @color-bi-background-dark-gray; &:after { opacity: 1; @@ -51,23 +51,23 @@ .bi-theme-dark { .bi-checkbox { - & .checkbox-content { + & .checkbox-content, &.checkbox-content { border-color: @color-bi-border-dark-line-theme-dark; &.hover, &:hover { border-color: @color-bi-border-highlight; } } &.active, &:active { - & .checkbox-content { + & .checkbox-content, &.checkbox-content { border-color: @color-bi-border-highlight; } } &.disabled { - & .checkbox-content { + & .checkbox-content, &.checkbox-content { background-color: @color-bi-background-disabled-theme-dark; } &.active { - & .checkbox-content { + & .checkbox-content, &.checkbox-content { background-color: @color-bi-background-dark-gray-theme-dark; border-color: @color-bi-border-disabled-theme-dark; } diff --git a/src/less/base/single/input/radio.less b/src/less/base/single/input/radio.less index cf93efe64..334ea42ca 100644 --- a/src/less/base/single/input/radio.less +++ b/src/less/base/single/input/radio.less @@ -1,7 +1,7 @@ @import "../../../index"; .bi-radio { - & .radio-content { + & .radio-content, &.radio-content { .border-radius(8px); border: 1px solid @color-bi-border-dark-line; &:after { @@ -12,7 +12,7 @@ } } &:active, &.active { - & .radio-content { + & .radio-content, &.radio-content { border-color: @color-bi-border-highlight; &:after { width: 6px; @@ -28,15 +28,15 @@ } } &.disabled { - & .radio-content { + & .radio-content, &.radio-content { background-color: @color-bi-background-disabled; border-color: @color-bi-border-disabled; } - & .radio-content:after { + & .radio-content:after, &.radio-content:after { background-color: transparent; } &.active { - & .radio-content { + & .radio-content, &.radio-content { background-color: @color-bi-background-dark-gray; &:after { background-color: @color-bi-background-default; @@ -48,26 +48,26 @@ .bi-theme-dark { .bi-radio { - & .radio-content { + & .radio-content, &.radio-content { border-color: @color-bi-border-dark-line-theme-dark; &.hover, &:hover { border-color: @color-bi-border-highlight; } } &.active, &:active { - & .radio-content { + & .radio-content, &.radio-content { border-color: @color-bi-border-highlight; } } &.disabled { - & .radio-content { + & .radio-content, &.radio-content { background-color: @color-bi-background-disabled-theme-dark; &.hover, &:hover { border-color: @color-bi-border-dark-line-theme-dark; } } &.active { - & .radio-content { + & .radio-content, &.radio-content { background-color: @color-bi-background-dark-gray-theme-dark; border-color: @color-bi-border-disabled-theme-dark; } diff --git a/src/less/base/tree/ztree.less b/src/less/base/tree/ztree.less index c45be8d5a..2b8fd5730 100644 --- a/src/less/base/tree/ztree.less +++ b/src/less/base/tree/ztree.less @@ -106,8 +106,23 @@ } .ztree li span.button.chk { - width: 16px; - height: 16px; + &.bi-checkbox { + border: 1px solid @color-bi-border-dark-line; + &.active { + background-color: @color-bi-background-highlight; + border-color: @color-bi-border-highlight;; + } + } + &.bi-half-button { + border: 1px solid @color-bi-border-highlight; + } +} + + +.ztree li span.button.chk { + position: relative; + width: 14px; + height: 14px; margin: 0 3px 0 0; cursor: auto } diff --git a/src/less/resource/background.less b/src/less/resource/background.less index 9bd3351f9..446b250c6 100644 --- a/src/less/resource/background.less +++ b/src/less/resource/background.less @@ -70,46 +70,6 @@ } } -.ztree li span.button.chk.checkbox_false_full { - .image2xPath(@icon-checkbox-normal); -} - -.ztree li span.button.chk.checkbox_false_full_focus { - .image2xPath(@icon-checkbox-normal); -} - -.ztree li span.button.chk.checkbox_false_part { - .image2xPath(@icon-half-select); -} - -.ztree li span.button.chk.checkbox_false_part_focus { - .image2xPath(@icon-half-select); -} - -.ztree li span.button.chk.checkbox_true_full { - .image2xPath(@icon-checkbox-active); -} - -.ztree li span.button.chk.checkbox_true_full_focus { - .image2xPath(@icon-checkbox-active); -} - -.ztree li span.button.chk.checkbox_true_part { - .image2xPath(@icon-half-select); -} - -.ztree li span.button.chk.checkbox_true_part_focus { - .image2xPath(@icon-half-select); -} - -.ztree.hack li span.button.chk.checkbox_false_full { - .imagePath(@icon-checkbox-normal); -} - -.ztree.hack li span.button.chk.checkbox_false_full_focus { - .imagePath(@icon-checkbox-normal); -} - .ztree.hack li span.button.chk.checkbox_false_part { .imagePath(@icon-half-select); }