mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 12:39:20 +03:00
Cleanup calls to Knockout observableArray
Improved Knockout observableArray
This commit is contained in:
parent
fa5476e486
commit
b6f0b634fb
47 changed files with 251 additions and 276 deletions
|
|
@ -24,10 +24,10 @@ class PluginPopupView extends AbstractViewNext {
|
|||
readme: ''
|
||||
});
|
||||
|
||||
this.configures = ko.observableArray([]);
|
||||
this.configures = ko.observableArray();
|
||||
|
||||
this.hasReadme = ko.computed(() => !!this.readme());
|
||||
this.hasConfiguration = ko.computed(() => 0 < this.configures().length);
|
||||
this.hasConfiguration = ko.computed(() => 0 < this.configures.length);
|
||||
|
||||
this.bDisabeCloseOnEsc = true;
|
||||
this.sDefaultKeyScope = KeyState.All;
|
||||
|
|
@ -40,7 +40,7 @@ class PluginPopupView extends AbstractViewNext {
|
|||
const list = {};
|
||||
list.Name = this.name();
|
||||
|
||||
this.configures().forEach(oItem => {
|
||||
this.configures.forEach(oItem => {
|
||||
let value = oItem.value();
|
||||
if (false === value || true === value) {
|
||||
value = value ? '1' : '0';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue