mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Cleanup some unused code
This commit is contained in:
parent
f706e14a2f
commit
b3b8c97b00
4 changed files with 12 additions and 15 deletions
|
|
@ -26,15 +26,12 @@ class AbstractCheckbox extends AbstractComponent {
|
||||||
this.label = params.label || '';
|
this.label = params.label || '';
|
||||||
this.inline = !!params.inline;
|
this.inline = !!params.inline;
|
||||||
|
|
||||||
this.readOnly = !!params.readOnly;
|
|
||||||
this.inverted = !!params.inverted;
|
|
||||||
|
|
||||||
this.labeled = undefined !== params.label;
|
this.labeled = undefined !== params.label;
|
||||||
this.labelAnimated = !!params.labelAnimated;
|
this.labelAnimated = !!params.labelAnimated;
|
||||||
}
|
}
|
||||||
|
|
||||||
click() {
|
click() {
|
||||||
if (!this.readOnly && this.enable() && !this.disable()) {
|
if (this.enable() && !this.disable()) {
|
||||||
this.value(!this.value());
|
this.value(!this.value());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
background: #fff;
|
background: #fff;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
border: 1px solid #999;
|
border: 1px solid #999;
|
||||||
content : attr(data-rainloopTip);
|
content: attr(data-rainloopTip);
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
left: 100%;
|
left: 100%;
|
||||||
opacity : 0;
|
opacity : 0;
|
||||||
|
|
@ -53,8 +53,8 @@
|
||||||
}
|
}
|
||||||
[data-rainloopErrorTip]::before {
|
[data-rainloopErrorTip]::before {
|
||||||
color: red;
|
color: red;
|
||||||
content : attr(data-rainloopErrorTip);
|
content: attr(data-rainloopErrorTip);
|
||||||
opacity : 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
[data-tooltip]:hover::before {
|
[data-tooltip]:hover::before {
|
||||||
opacity : 1;
|
opacity : 1;
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
<span class="e-component e-checkbox inline" tabindex="0" data-bind="click: click, onSpace: click, css: { 'disabled': disable() || !enable() }">
|
<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() ?
|
<i role="checkbox" class="e-checkbox-icon" data-bind="css: {
|
||||||
(inverted ? 'icon-checkbox-unchecked' : 'icon-checkbox-checked') :
|
'icon-checkbox-checked': value(),
|
||||||
(inverted ? 'icon-checkbox-checked' : 'icon-checkbox-unchecked')
|
'icon-checkbox-unchecked': !value()
|
||||||
"></i>
|
}"></i>
|
||||||
<!-- ko if: labeled -->
|
<!-- ko if: labeled -->
|
||||||
|
|
||||||
<span class="sub-label i18n" data-bind="attr: {'data-i18n': label}, css: {'i18n-animation': labelAnimated}"></span>
|
<span class="sub-label i18n" data-bind="attr: {'data-i18n': label}, css: {'i18n-animation': labelAnimated}"></span>
|
||||||
<!-- /ko -->
|
<!-- /ko -->
|
||||||
</span>
|
</span>
|
||||||
|
|
|
||||||
|
|
@ -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() }">
|
<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-container" role="checkbox">
|
||||||
<div class="sub-checkbox" data-bind="css: {'checked': (value() && !inverted) || (!value() && inverted),
|
<div class="sub-checkbox" data-bind="css: {'checked': value(),
|
||||||
'unchecked': (!value() && !inverted) || (value() && inverted),
|
'unchecked': !value(),
|
||||||
'box': animationBox, 'checkmark': animationCheckmark}"></div>
|
'box': animationBox, 'checkmark': animationCheckmark}"></div>
|
||||||
</div>
|
</div>
|
||||||
<!-- ko if: labeled -->
|
<!-- ko if: labeled -->
|
||||||
<span class="sub-label i18n" data-bind="attr: {'data-i18n': label}, css: {'i18n-animation': labelAnimated}"></span>
|
<span class="sub-label i18n" data-bind="attr: {'data-i18n': label}, css: {'i18n-animation': labelAnimated}"></span>
|
||||||
<!-- /ko -->
|
<!-- /ko -->
|
||||||
</span>
|
</span>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue