mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-28 11:39:21 +03:00
Cleanup js components
This commit is contained in:
parent
65e1b58877
commit
948663519e
6 changed files with 7 additions and 56 deletions
|
|
@ -10,24 +10,24 @@ class AbstractCheckbox extends AbstractComponent {
|
|||
|
||||
this.value = params.value;
|
||||
if (undefined === this.value || !this.value.subscribe) {
|
||||
this.value = ko.observable(undefined === this.value ? false : !!this.value);
|
||||
this.value = ko.observable(!!this.value);
|
||||
}
|
||||
|
||||
this.enable = params.enable;
|
||||
if (undefined === this.enable || !this.enable.subscribe) {
|
||||
this.enable = ko.observable(undefined === this.enable ? true : !!this.enable);
|
||||
this.enable = ko.observable(undefined === this.enable || !!this.enable);
|
||||
}
|
||||
|
||||
this.disable = params.disable;
|
||||
if (undefined === this.disable || !this.disable.subscribe) {
|
||||
this.disable = ko.observable(undefined === this.disable ? false : !!this.disable);
|
||||
this.disable = ko.observable(!!this.disable);
|
||||
}
|
||||
|
||||
this.label = params.label || '';
|
||||
this.inline = undefined === params.inline ? false : params.inline;
|
||||
this.inline = !!params.inline;
|
||||
|
||||
this.readOnly = undefined === params.readOnly ? false : !!params.readOnly;
|
||||
this.inverted = undefined === params.inverted ? false : !!params.inverted;
|
||||
this.readOnly = !!params.readOnly;
|
||||
this.inverted = !!params.inverted;
|
||||
|
||||
this.labeled = undefined !== params.label;
|
||||
this.labelAnimated = !!params.labelAnimated;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue