Cleanup some unused code

This commit is contained in:
djmaze 2020-11-10 09:29:00 +01:00
parent f706e14a2f
commit b3b8c97b00
4 changed files with 12 additions and 15 deletions

View file

@ -26,15 +26,12 @@ class AbstractCheckbox extends AbstractComponent {
this.label = params.label || '';
this.inline = !!params.inline;
this.readOnly = !!params.readOnly;
this.inverted = !!params.inverted;
this.labeled = undefined !== params.label;
this.labelAnimated = !!params.labelAnimated;
}
click() {
if (!this.readOnly && this.enable() && !this.disable()) {
if (this.enable() && !this.disable()) {
this.value(!this.value());
}
}

View file

@ -32,7 +32,7 @@
background: #fff;
border-radius: 3px;
border: 1px solid #999;
content : attr(data-rainloopTip);
content: attr(data-rainloopTip);
font-size: 13px;
left: 100%;
opacity : 0;
@ -53,8 +53,8 @@
}
[data-rainloopErrorTip]::before {
color: red;
content : attr(data-rainloopErrorTip);
opacity : 1;
content: attr(data-rainloopErrorTip);
opacity: 1;
}
[data-tooltip]:hover::before {
opacity : 1;

View file

@ -1,10 +1,10 @@
<span class="e-component e-checkbox inline" tabindex="0" data-bind="click: click, onSpace: click, css: { 'disabled': disable() || !enable() }">
<i role="checkbox" class="e-checkbox-icon" data-bind="css: value() ?
(inverted ? 'icon-checkbox-unchecked' : 'icon-checkbox-checked') :
(inverted ? 'icon-checkbox-checked' : 'icon-checkbox-unchecked')
"></i>
<i role="checkbox" class="e-checkbox-icon" data-bind="css: {
'icon-checkbox-checked': value(),
'icon-checkbox-unchecked': !value()
}"></i>
<!-- ko if: labeled -->
&nbsp;&nbsp;
<span class="sub-label i18n" data-bind="attr: {'data-i18n': label}, css: {'i18n-animation': labelAnimated}"></span>
<!-- /ko -->
</span>
</span>

View file

@ -1,10 +1,10 @@
<span class="e-component e-checkbox material-design inline" tabindex="0" data-bind="click: click, onSpace: click, css: { 'disabled': disable() || !enable() }">
<div class="sub-checkbox-container" role="checkbox">
<div class="sub-checkbox" data-bind="css: {'checked': (value() && !inverted) || (!value() && inverted),
'unchecked': (!value() && !inverted) || (value() && inverted),
<div class="sub-checkbox" data-bind="css: {'checked': value(),
'unchecked': !value(),
'box': animationBox, 'checkmark': animationCheckmark}"></div>
</div>
<!-- ko if: labeled -->
<span class="sub-label i18n" data-bind="attr: {'data-i18n': label}, css: {'i18n-animation': labelAnimated}"></span>
<!-- /ko -->
</span>
</span>