mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
$.proxy is deprecated
$.trim is deprecated
This commit is contained in:
parent
ae1b7610fd
commit
bbd9f49dcd
39 changed files with 153 additions and 173 deletions
|
|
@ -1,7 +1,7 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { Magics } from 'Common/Enums';
|
||||
import { settingsSaveHelperSimpleFunction, trim } from 'Common/Utils';
|
||||
import { settingsSaveHelperSimpleFunction } from 'Common/Utils';
|
||||
import { i18n, trigger as translatorTrigger } from 'Common/Translator';
|
||||
|
||||
import Remote from 'Remote/Admin/Ajax';
|
||||
|
|
@ -47,19 +47,19 @@ class BrandingAdminSettings {
|
|||
|
||||
this.title.subscribe((value) => {
|
||||
Remote.saveAdminConfig(f1, {
|
||||
'Title': trim(value)
|
||||
'Title': value.trim()
|
||||
});
|
||||
});
|
||||
|
||||
this.loadingDesc.subscribe((value) => {
|
||||
Remote.saveAdminConfig(f2, {
|
||||
'LoadingDescription': trim(value)
|
||||
'LoadingDescription': value.trim()
|
||||
});
|
||||
});
|
||||
|
||||
this.faviconUrl.subscribe((value) => {
|
||||
Remote.saveAdminConfig(f3, {
|
||||
'FaviconUrl': trim(value)
|
||||
'FaviconUrl': value.trim()
|
||||
});
|
||||
});
|
||||
}, Magics.Time50ms);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { settingsSaveHelperSimpleFunction, defautOptionsAfterRender, trim } from 'Common/Utils';
|
||||
import { settingsSaveHelperSimpleFunction, defautOptionsAfterRender } from 'Common/Utils';
|
||||
|
||||
import { SaveSettingsStep, StorageResultType, Magics } from 'Common/Enums';
|
||||
import { i18n } from 'Common/Translator';
|
||||
|
|
@ -163,25 +163,25 @@ class ContactsAdminSettings {
|
|||
|
||||
this.contactsType.subscribe((value) => {
|
||||
Remote.saveAdminConfig(f5, {
|
||||
'ContactsPdoType': trim(value)
|
||||
'ContactsPdoType': value.trim()
|
||||
});
|
||||
});
|
||||
|
||||
this.pdoDsn.subscribe((value) => {
|
||||
Remote.saveAdminConfig(f1, {
|
||||
'ContactsPdoDsn': trim(value)
|
||||
'ContactsPdoDsn': value.trim()
|
||||
});
|
||||
});
|
||||
|
||||
this.pdoUser.subscribe((value) => {
|
||||
Remote.saveAdminConfig(f3, {
|
||||
'ContactsPdoUser': trim(value)
|
||||
'ContactsPdoUser': value.trim()
|
||||
});
|
||||
});
|
||||
|
||||
this.pdoPassword.subscribe((value) => {
|
||||
Remote.saveAdminConfig(f4, {
|
||||
'ContactsPdoPassword': trim(value)
|
||||
'ContactsPdoPassword': value.trim()
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import {
|
||||
trim,
|
||||
pInt,
|
||||
settingsSaveHelperSimpleFunction,
|
||||
changeTheme,
|
||||
|
|
@ -91,7 +90,7 @@ class GeneralAdminSettings {
|
|||
|
||||
this.language.subscribe((value) => {
|
||||
Remote.saveAdminConfig(f2, {
|
||||
'Language': trim(value)
|
||||
'Language': value.trim()
|
||||
});
|
||||
});
|
||||
|
||||
|
|
@ -101,7 +100,7 @@ class GeneralAdminSettings {
|
|||
.then(fReloadLanguageHelper(SaveSettingsStep.TrueResult), fReloadLanguageHelper(SaveSettingsStep.FalseResult))
|
||||
.then(() => {
|
||||
Remote.saveAdminConfig(null, {
|
||||
'LanguageAdmin': trim(value)
|
||||
'LanguageAdmin': value.trim()
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
@ -109,7 +108,7 @@ class GeneralAdminSettings {
|
|||
this.theme.subscribe((value) => {
|
||||
changeTheme(value, this.themeTrigger);
|
||||
Remote.saveAdminConfig(f3, {
|
||||
'Theme': trim(value)
|
||||
'Theme': value.trim()
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { settingsSaveHelperSimpleFunction, trim } from 'Common/Utils';
|
||||
import { settingsSaveHelperSimpleFunction } from 'Common/Utils';
|
||||
import { settingsGet } from 'Storage/Settings';
|
||||
|
||||
import AppStore from 'Stores/Admin/App';
|
||||
|
|
@ -42,7 +42,7 @@ class LoginAdminSettings {
|
|||
|
||||
this.defaultDomain.subscribe((value) => {
|
||||
Remote.saveAdminConfig(f1, {
|
||||
'LoginDefaultDomain': trim(value)
|
||||
'LoginDefaultDomain': value.trim()
|
||||
});
|
||||
});
|
||||
}, 50);
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { trim } from 'Common/Utils';
|
||||
import { StorageResultType, Magics } from 'Common/Enums';
|
||||
|
||||
import { settingsGet } from 'Storage/Settings';
|
||||
|
|
@ -76,9 +75,9 @@ class SecurityAdminSettings {
|
|||
this.onNewAdminPasswordResponse = this.onNewAdminPasswordResponse.bind(this);
|
||||
}
|
||||
|
||||
@command((self) => trim(self.adminLogin()) && self.adminPassword())
|
||||
@command((self) => self.adminLogin().trim() && self.adminPassword())
|
||||
saveNewAdminPasswordCommand() {
|
||||
if (!trim(this.adminLogin())) {
|
||||
if (!this.adminLogin().trim()) {
|
||||
this.adminLoginError(true);
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { windowResizeCallback, trim, delegateRunOnDestroy } from 'Common/Utils';
|
||||
import { windowResizeCallback, delegateRunOnDestroy } from 'Common/Utils';
|
||||
import { StorageResultType, Notification } from 'Common/Enums';
|
||||
import { getNotification } from 'Common/Translator';
|
||||
|
||||
|
|
@ -61,7 +61,7 @@ class FiltersUserSettings {
|
|||
@command((self) => self.haveChanges())
|
||||
saveChangesCommand() {
|
||||
if (!this.filters.saving()) {
|
||||
if (this.filterRaw.active() && !trim(this.filterRaw())) {
|
||||
if (this.filterRaw.active() && !this.filterRaw().trim()) {
|
||||
this.filterRaw.error(true);
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import ko from 'ko';
|
||||
|
||||
import { ClientSideKeyName, Notification, Magics } from 'Common/Enums';
|
||||
import { trim } from 'Common/Utils';
|
||||
import { getNotification, i18n } from 'Common/Translator';
|
||||
|
||||
import { removeFolderFromCacheList } from 'Common/Cache';
|
||||
|
|
@ -42,7 +41,7 @@ class FoldersUserSettings {
|
|||
}
|
||||
|
||||
folderEditOnEnter(folder) {
|
||||
const nameToEdit = folder ? trim(folder.nameForEdit()) : '';
|
||||
const nameToEdit = folder ? folder.nameForEdit().trim() : '';
|
||||
|
||||
if (nameToEdit && folder.name() !== nameToEdit) {
|
||||
Local.set(ClientSideKeyName.FoldersLashHash, '');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue