[component] hide 'check' marker for custom style of 'checked' state

This commit is contained in:
Maxim Kadushkin 2019-11-20 12:05:59 +03:00
parent 5b8a2f893a
commit 00caf68082
2 changed files with 11 additions and 3 deletions

View file

@ -183,6 +183,7 @@ define([
if (this.checkable && firstChild) { if (this.checkable && firstChild) {
firstChild.toggleClass('checkable', this.checkable); firstChild.toggleClass('checkable', this.checkable);
firstChild.toggleClass('no-checkmark', this.options.checkmark===false);
firstChild.toggleClass('checked', this.checked); firstChild.toggleClass('checked', this.checked);
if (!_.isEmpty(this.iconCls)) { if (!_.isEmpty(this.iconCls)) {
firstChild.css('background-image', 'none'); firstChild.css('background-image', 'none');

View file

@ -47,7 +47,7 @@
background-color: @dropdown-link-hover-bg; background-color: @dropdown-link-hover-bg;
} }
.checked { .checked:not(.no-checkmark) {
&:before { &:before {
content: ''; content: '';
width: 16px; width: 16px;
@ -71,11 +71,18 @@
.menu-item-icon { .menu-item-icon {
display: inline-block; display: inline-block;
float: left; float: left;
width: 22px; width: 20px;
height: 22px; height: 20px;
margin: -3px 5px 0 -15px; margin: -3px 5px 0 -15px;
.background-ximage-v2('popupmenu-btns.png', 66px, @commonimage: false); .background-ximage-v2('popupmenu-btns.png', 66px, @commonimage: false);
background-repeat: no-repeat; background-repeat: no-repeat;
} }
.no-checkmark.checked {
.menu-item-icon {
background-color: @primary;
border-radius: 2px;
}
}
} }
} }