mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-31 04:59:21 +03:00
Remove knockout-transformations dependency
This commit is contained in:
parent
8a0be3212d
commit
40dc22a317
10 changed files with 69 additions and 78 deletions
|
|
@ -47,14 +47,16 @@ class ContactsAdminSettings {
|
|||
this.contactsSupported = 0 < supportedTypes.length;
|
||||
|
||||
this.contactsTypes = ko.observableArray([]);
|
||||
this.contactsTypesOptions = this.contactsTypes.map((value) => {
|
||||
const disabled = -1 === inArray(value, supportedTypes);
|
||||
return {
|
||||
'id': value,
|
||||
'name': getTypeName(value) + (disabled ? ' (' + i18n('HINTS/NOT_SUPPORTED') + ')' : ''),
|
||||
'disabled': disabled
|
||||
};
|
||||
});
|
||||
this.contactsTypesOptions = ko.computed(() =>
|
||||
_.map(this.contactsTypes(), (value) => {
|
||||
const disabled = -1 === inArray(value, supportedTypes);
|
||||
return {
|
||||
'id': value,
|
||||
'name': getTypeName(value) + (disabled ? ' (' + i18n('HINTS/NOT_SUPPORTED') + ')' : ''),
|
||||
'disabled': disabled
|
||||
};
|
||||
})
|
||||
);
|
||||
|
||||
this.contactsTypes(types);
|
||||
this.contactsType = ko.observable('');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue