isArray to native Array.isArray

isUnd(*) to native undefined === *
isFunc to native typeof * === 'function'
isObject to native typeof * === 'object'
microtime() to native Date().getTime();
noop to native ()=>{}
noopFalse to native ()=>false
noopTrue to native ()=>true
boolToAjax to native *?'1':'0'
Underscore.js to native
This commit is contained in:
djmaze 2020-07-29 21:49:41 +02:00
parent fa39c7ecba
commit ea48f5060b
72 changed files with 551 additions and 775 deletions

View file

@ -3,7 +3,6 @@ import ko from 'ko';
import {
trim,
pInt,
boolToAjax,
settingsSaveHelperSimpleFunction,
changeTheme,
convertThemeName,
@ -116,49 +115,49 @@ class GeneralAdminSettings {
this.capaAdditionalAccounts.subscribe((value) => {
Remote.saveAdminConfig(null, {
'CapaAdditionalAccounts': boolToAjax(value)
'CapaAdditionalAccounts': value ? '1' : '0'
});
});
this.capaIdentities.subscribe((value) => {
Remote.saveAdminConfig(null, {
'CapaIdentities': boolToAjax(value)
'CapaIdentities': value ? '1' : '0'
});
});
this.capaTemplates.subscribe((value) => {
Remote.saveAdminConfig(null, {
'CapaTemplates': boolToAjax(value)
'CapaTemplates': value ? '1' : '0'
});
});
this.capaAttachmentThumbnails.subscribe((value) => {
Remote.saveAdminConfig(null, {
'CapaAttachmentThumbnails': boolToAjax(value)
'CapaAttachmentThumbnails': value ? '1' : '0'
});
});
this.capaThemes.subscribe((value) => {
Remote.saveAdminConfig(null, {
'CapaThemes': boolToAjax(value)
'CapaThemes': value ? '1' : '0'
});
});
this.capaUserBackground.subscribe((value) => {
Remote.saveAdminConfig(null, {
'CapaUserBackground': boolToAjax(value)
'CapaUserBackground': value ? '1' : '0'
});
});
this.allowLanguagesOnSettings.subscribe((value) => {
Remote.saveAdminConfig(null, {
'AllowLanguagesOnSettings': boolToAjax(value)
'AllowLanguagesOnSettings': value ? '1' : '0'
});
});
this.newMoveToFolder.subscribe((value) => {
Remote.saveAdminConfig(null, {
'NewMoveToFolder': boolToAjax(value)
'NewMoveToFolder': value ? '1' : '0'
});
});
}, Magics.Time50ms);