mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-01 21:49:21 +03:00
Identities redesign
This commit is contained in:
parent
df1c369a9d
commit
44241b859c
22 changed files with 267 additions and 183 deletions
|
|
@ -1330,7 +1330,8 @@ class Actions
|
|||
{
|
||||
foreach ($aSubIdentities as $aItem)
|
||||
{
|
||||
if (isset($aItem['Id'], $aItem['Email'], $aItem['Name'], $aItem['ReplyTo'], $aItem['Bcc']))
|
||||
if (isset($aItem['Id'], $aItem['Email'], $aItem['Name'], $aItem['ReplyTo'], $aItem['Bcc']) &&
|
||||
$aItem['Id'] !== $oAccount->Email())
|
||||
{
|
||||
$oItem = \RainLoop\Identity::NewInstance($aItem['Id'], $aItem['Email'],
|
||||
$aItem['Name'], $aItem['ReplyTo'], $aItem['Bcc']);
|
||||
|
|
@ -1339,14 +1340,6 @@ class Actions
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (0 === \count($aIdentities))
|
||||
{
|
||||
$aIdentities[] = \RainLoop\Identity::NewInstance($oAccount->Email(), $oAccount->Email(),
|
||||
$oSettings->GetConf('DisplayName', ''),
|
||||
$oSettings->GetConf('ReplyTo', '')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return $aIdentities;
|
||||
|
|
@ -1514,20 +1507,6 @@ class Actions
|
|||
$sReplyTo = \trim($this->GetActionParam('ReplyTo', ''));
|
||||
$sBcc = \trim($this->GetActionParam('Bcc', ''));
|
||||
|
||||
if ($sId === $oAccount->Email())
|
||||
{
|
||||
$sEmail = $oAccount->Email();
|
||||
|
||||
$oSettings = $this->SettingsProvider()->Load($oAccount);
|
||||
if ($oSettings)
|
||||
{
|
||||
$oSettings->SetConf('DisplayName', $sName);
|
||||
$oSettings->SetConf('ReplyTo', $sReplyTo);
|
||||
|
||||
$this->SettingsProvider()->Save($oAccount, $oSettings);
|
||||
}
|
||||
}
|
||||
|
||||
if (empty($sEmail))
|
||||
{
|
||||
throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::UnknownError);
|
||||
|
|
@ -1583,7 +1562,7 @@ class Actions
|
|||
$oAccount = $this->getAccountFromToken();
|
||||
|
||||
$sId = \trim($this->GetActionParam('IdToDelete', ''));
|
||||
if (empty($sId) || $sId === $oAccount->Email())
|
||||
if (empty($sId))
|
||||
{
|
||||
throw new \RainLoop\Exceptions\ClientException(\RainLoop\Notifications::UnknownError);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@
|
|||
</label>
|
||||
<label data-bind="click: function () { allowIdentities(!allowIdentities()); }">
|
||||
<i data-bind="css: allowIdentities() ? 'icon-checkbox-checked' : 'icon-checkbox-unchecked'"></i>
|
||||
Allow identities
|
||||
Allow additional identities
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,39 @@
|
|||
<div class="b-settings-identities">
|
||||
<div class="form-horizontal">
|
||||
<div class="legend">
|
||||
<span class="i18n" data-bind="text: legent"></span>
|
||||
<span class="i18n" data-i18n-text="SETTINGS_IDENTITIES/LEGEND_IDENTITY"></span>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
<span class="i18n" data-i18n-text="SETTINGS_IDENTITIES/LABEL_DISPLAY_NAME"></span>
|
||||
</label>
|
||||
<div class="controls">
|
||||
<input class="input-xlarge" type="text" data-bind="value: displayName, saveTrigger: displayNameTrigger" />
|
||||
<div data-bind="saveTrigger: displayNameTrigger"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group" style="display: none">
|
||||
<label class="control-label">
|
||||
<span class="i18n" data-i18n-text="SETTINGS_IDENTITIES/LABEL_REPLY_TO"></span>
|
||||
</label>
|
||||
<div class="controls">
|
||||
<input class="input-xlarge" type="text" data-bind="value: replyTo" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
<span class="i18n" data-i18n-text="SETTINGS_IDENTITIES/LABEL_SIGNATURE"></span>
|
||||
</label>
|
||||
<div class="controls">
|
||||
<textarea class="input-xxlarge" data-bind="value: signature, saveTrigger: signatureTrigger" rows="7" spellcheck="true"></textarea>
|
||||
<div style="vertical-align: top;" data-bind="saveTrigger: signatureTrigger"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-horizontal">
|
||||
<div class="legend">
|
||||
<span class="i18n" data-i18n-text="SETTINGS_IDENTITIES/LEGEND_IDENTITIES"></span>
|
||||
</div>
|
||||
</div>
|
||||
<a class="btn" data-bind="click: addNewIdentity">
|
||||
|
|
@ -39,15 +71,4 @@
|
|||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<br />
|
||||
<br />
|
||||
<div class="form-horizontal">
|
||||
<div class="legend">
|
||||
<span class="i18n" data-i18n-text="SETTINGS_IDENTITIES/LEGEND_SIGNATURE"></span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<textarea class="input-xxlarge" data-bind="value: signature, saveTrigger: signatureTrigger" rows="7" spellcheck="true"></textarea>
|
||||
<div style="vertical-align: top;" data-bind="saveTrigger: signatureTrigger"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,20 +1,20 @@
|
|||
<div class="b-settings-personal">
|
||||
<div class="b-settings-identity">
|
||||
<div class="form-horizontal">
|
||||
<div class="legend">
|
||||
<span class="i18n" data-i18n-text="SETTINGS_PERSONAL/LEGEND_PERSONAL"></span>
|
||||
<span class="i18n" data-i18n-text="SETTINGS_IDENTITY/LEGEND_IDENTITY"></span>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
<span class="i18n" data-i18n-text="SETTINGS_PERSONAL/LABEL_DISPLAY_NAME"></span>
|
||||
<span class="i18n" data-i18n-text="SETTINGS_IDENTITY/LABEL_DISPLAY_NAME"></span>
|
||||
</label>
|
||||
<div class="controls">
|
||||
<input class="input-xlarge" type="text" data-bind="value: displayName, saveTrigger: nameTrigger" />
|
||||
<div data-bind="saveTrigger: nameTrigger"></div>
|
||||
<input class="input-xlarge" type="text" data-bind="value: displayName, saveTrigger: displayNameTrigger" />
|
||||
<div data-bind="saveTrigger: displayNameTrigger"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group" style="display: none">
|
||||
<label class="control-label">
|
||||
<span class="i18n" data-i18n-text="SETTINGS_PERSONAL/LABEL_REPLY_TO"></span>
|
||||
<span class="i18n" data-i18n-text="SETTINGS_IDENTITY/LABEL_REPLY_TO"></span>
|
||||
</label>
|
||||
<div class="controls">
|
||||
<input class="input-xlarge" type="text" data-bind="value: replyTo" />
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
</div>
|
||||
<div class="control-group">
|
||||
<label class="control-label">
|
||||
<span class="i18n" data-i18n-text="SETTINGS_PERSONAL/LABEL_SIGNATURE"></span>
|
||||
<span class="i18n" data-i18n-text="SETTINGS_IDENTITY/LABEL_SIGNATURE"></span>
|
||||
</label>
|
||||
<div class="controls">
|
||||
<textarea class="input-xxlarge" data-bind="value: signature, saveTrigger: signatureTrigger" rows="7" spellcheck="true"></textarea>
|
||||
|
|
@ -250,14 +250,15 @@ LABEL_PERSONAL_NAME = "Persönlich"
|
|||
LABEL_GENERAL_NAME = "Allgemein"
|
||||
LABEL_FOLDERS_NAME = "Ordner"
|
||||
LABEL_ACCOUNTS_NAME = "Konten"
|
||||
LABEL_IDENTITY_NAME = "Identity"
|
||||
LABEL_IDENTITIES_NAME = "Identities"
|
||||
LABEL_SOCIAL_NAME = "Social"
|
||||
LABEL_THEMES_NAME = "Vorlagen"
|
||||
LABEL_CHANGE_PASSWORD_NAME = "Passwort"
|
||||
BUTTON_BACK = "Zurück"
|
||||
|
||||
[SETTINGS_PERSONAL]
|
||||
LEGEND_PERSONAL = "Persönlich"
|
||||
[SETTINGS_IDENTITY]
|
||||
LEGEND_IDENTITY = "Identity"
|
||||
LABEL_DISPLAY_NAME = "Name"
|
||||
LABEL_REPLY_TO = "Reply To"
|
||||
LABEL_SIGNATURE = "Signatur"
|
||||
|
|
@ -331,8 +332,11 @@ LOADING_PROCESS = "Liste der Konten wird geladen"
|
|||
DELETING_ASK = "Sind Sie sicher?"
|
||||
|
||||
[SETTINGS_IDENTITIES]
|
||||
LEGEND_IDENTITIES_FOR = "Identities for \"%EMAIL%\""
|
||||
LEGEND_SIGNATURE = "Signature"
|
||||
LEGEND_IDENTITY = "Identity"
|
||||
LEGEND_IDENTITIES = "Additional Identities"
|
||||
LABEL_DISPLAY_NAME = "Name"
|
||||
LABEL_REPLY_TO = "Reply To"
|
||||
LABEL_SIGNATURE = "Signatur"
|
||||
BUTTON_ADD_IDENTITY = "Add Identity"
|
||||
BUTTON_DELETE = "Delete"
|
||||
LOADING_PROCESS = "Updating identity list"
|
||||
|
|
|
|||
|
|
@ -250,14 +250,15 @@ LABEL_PERSONAL_NAME = "Personal"
|
|||
LABEL_GENERAL_NAME = "General"
|
||||
LABEL_FOLDERS_NAME = "Folders"
|
||||
LABEL_ACCOUNTS_NAME = "Accounts"
|
||||
LABEL_IDENTITY_NAME = "Identity"
|
||||
LABEL_IDENTITIES_NAME = "Identities"
|
||||
LABEL_SOCIAL_NAME = "Social"
|
||||
LABEL_THEMES_NAME = "Themes"
|
||||
LABEL_CHANGE_PASSWORD_NAME = "Password"
|
||||
BUTTON_BACK = "Back"
|
||||
|
||||
[SETTINGS_PERSONAL]
|
||||
LEGEND_PERSONAL = "Personal"
|
||||
[SETTINGS_IDENTITY]
|
||||
LEGEND_IDENTITY = "Identity"
|
||||
LABEL_DISPLAY_NAME = "Name"
|
||||
LABEL_REPLY_TO = "Reply-To"
|
||||
LABEL_SIGNATURE = "Signature"
|
||||
|
|
@ -331,8 +332,11 @@ LOADING_PROCESS = "Updating account list"
|
|||
DELETING_ASK = "Are you sure?"
|
||||
|
||||
[SETTINGS_IDENTITIES]
|
||||
LEGEND_IDENTITIES_FOR = "Identities for \"%EMAIL%\""
|
||||
LEGEND_SIGNATURE = "Signature"
|
||||
LEGEND_IDENTITY = "Identity"
|
||||
LEGEND_IDENTITIES = "Additional Identities"
|
||||
LABEL_DISPLAY_NAME = "Name"
|
||||
LABEL_REPLY_TO = "Reply-To"
|
||||
LABEL_SIGNATURE = "Signature"
|
||||
BUTTON_ADD_IDENTITY = "Add Identity"
|
||||
BUTTON_DELETE = "Delete"
|
||||
LOADING_PROCESS = "Updating identity list"
|
||||
|
|
|
|||
|
|
@ -250,14 +250,15 @@ LABEL_PERSONAL_NAME = "Personal"
|
|||
LABEL_GENERAL_NAME = "General"
|
||||
LABEL_FOLDERS_NAME = "Carpetas"
|
||||
LABEL_ACCOUNTS_NAME = "Cuentas"
|
||||
LABEL_IDENTITY_NAME = "Identity"
|
||||
LABEL_IDENTITIES_NAME = "Identities"
|
||||
LABEL_SOCIAL_NAME = "Social"
|
||||
LABEL_THEMES_NAME = "Temas"
|
||||
LABEL_CHANGE_PASSWORD_NAME = "Contraseña"
|
||||
BUTTON_BACK = "Atrás"
|
||||
|
||||
[SETTINGS_PERSONAL]
|
||||
LEGEND_PERSONAL = "Personal"
|
||||
[SETTINGS_IDENTITY]
|
||||
LEGEND_IDENTITY = "Identity"
|
||||
LABEL_DISPLAY_NAME = "Nombre"
|
||||
LABEL_REPLY_TO = "Responder a"
|
||||
LABEL_SIGNATURE = "Firma"
|
||||
|
|
@ -331,8 +332,11 @@ LOADING_PROCESS = "Actualizando lista de cuentas"
|
|||
DELETING_ASK = "Estas seguro?"
|
||||
|
||||
[SETTINGS_IDENTITIES]
|
||||
LEGEND_IDENTITIES_FOR = "Identities for \"%EMAIL%\""
|
||||
LEGEND_SIGNATURE = "Signature"
|
||||
LEGEND_IDENTITY = "Identity"
|
||||
LEGEND_IDENTITIES = "Additional Identities"
|
||||
LABEL_DISPLAY_NAME = "Nombre"
|
||||
LABEL_REPLY_TO = "Responder a"
|
||||
LABEL_SIGNATURE = "Firma"
|
||||
BUTTON_ADD_IDENTITY = "Add Identity"
|
||||
BUTTON_DELETE = "Delete"
|
||||
LOADING_PROCESS = "Updating identity list"
|
||||
|
|
|
|||
|
|
@ -250,14 +250,15 @@ LABEL_PERSONAL_NAME = "Personnel"
|
|||
LABEL_GENERAL_NAME = "Général"
|
||||
LABEL_FOLDERS_NAME = "Dossiers"
|
||||
LABEL_ACCOUNTS_NAME = "Comptes"
|
||||
LABEL_IDENTITY_NAME = "Identity"
|
||||
LABEL_IDENTITIES_NAME = "Identities"
|
||||
LABEL_SOCIAL_NAME = "Social"
|
||||
LABEL_THEMES_NAME = "Thèmes"
|
||||
LABEL_CHANGE_PASSWORD_NAME = "Mot de passe"
|
||||
BUTTON_BACK = "Retour"
|
||||
|
||||
[SETTINGS_PERSONAL]
|
||||
LEGEND_PERSONAL = "Personnel"
|
||||
[SETTINGS_IDENTITY]
|
||||
LEGEND_IDENTITY = "Identity"
|
||||
LABEL_DISPLAY_NAME = "Nom"
|
||||
LABEL_REPLY_TO = "Répondre à"
|
||||
LABEL_SIGNATURE = "Signature"
|
||||
|
|
@ -331,8 +332,11 @@ LOADING_PROCESS = "Mise à jour de la liste des comptes"
|
|||
DELETING_ASK = "Êtes-vous sûr ?"
|
||||
|
||||
[SETTINGS_IDENTITIES]
|
||||
LEGEND_IDENTITIES_FOR = "Identitiés pour \"%EMAIL%\""
|
||||
LEGEND_SIGNATURE = "Signature"
|
||||
LEGEND_IDENTITY = "Identity"
|
||||
LEGEND_IDENTITIES = "Additional Identities"
|
||||
LABEL_DISPLAY_NAME = "Nom"
|
||||
LABEL_REPLY_TO = "Répondre à"
|
||||
LABEL_SIGNATURE = "Signature"
|
||||
BUTTON_ADD_IDENTITY = "Ajouter une identitié"
|
||||
BUTTON_DELETE = "Supprimer"
|
||||
LOADING_PROCESS = "Met à jour la liste d'identités"
|
||||
|
|
|
|||
|
|
@ -250,14 +250,15 @@ LABEL_PERSONAL_NAME = "Persónulegt"
|
|||
LABEL_GENERAL_NAME = "Almennt"
|
||||
LABEL_FOLDERS_NAME = "Möppur"
|
||||
LABEL_ACCOUNTS_NAME = "Aðgangar"
|
||||
LABEL_IDENTITY_NAME = "Identity"
|
||||
LABEL_IDENTITIES_NAME = "Identities"
|
||||
LABEL_SOCIAL_NAME = "Félagsmiðlar"
|
||||
LABEL_THEMES_NAME = "Þemur"
|
||||
LABEL_CHANGE_PASSWORD_NAME = "Lykilorð"
|
||||
BUTTON_BACK = "Til baka"
|
||||
|
||||
[SETTINGS_PERSONAL]
|
||||
LEGEND_PERSONAL = "Persónulegt"
|
||||
[SETTINGS_IDENTITY]
|
||||
LEGEND_IDENTITY = "Identity"
|
||||
LABEL_DISPLAY_NAME = "Nafn"
|
||||
LABEL_REPLY_TO = "Svara"
|
||||
LABEL_SIGNATURE = "Undirskrift"
|
||||
|
|
@ -331,8 +332,11 @@ LOADING_PROCESS = "Uppfæri aðgangslista"
|
|||
DELETING_ASK = "Ertu viss?"
|
||||
|
||||
[SETTINGS_IDENTITIES]
|
||||
LEGEND_IDENTITIES_FOR = "Identities for \"%EMAIL%\""
|
||||
LEGEND_SIGNATURE = "Signature"
|
||||
LEGEND_IDENTITY = "Identity"
|
||||
LEGEND_IDENTITIES = "Additional Identities"
|
||||
LABEL_DISPLAY_NAME = "Nafn"
|
||||
LABEL_REPLY_TO = "Svara"
|
||||
LABEL_SIGNATURE = "Undirskrift"
|
||||
BUTTON_ADD_IDENTITY = "Add Identity"
|
||||
BUTTON_DELETE = "Delete"
|
||||
LOADING_PROCESS = "Updating identity list"
|
||||
|
|
|
|||
|
|
@ -250,14 +250,15 @@ LABEL_PERSONAL_NAME = "Personīgie"
|
|||
LABEL_GENERAL_NAME = "Vispārējie"
|
||||
LABEL_FOLDERS_NAME = "Mapes"
|
||||
LABEL_ACCOUNTS_NAME = "Konti"
|
||||
LABEL_IDENTITY_NAME = "Identity"
|
||||
LABEL_IDENTITIES_NAME = "Identities"
|
||||
LABEL_SOCIAL_NAME = "Sociālie"
|
||||
LABEL_THEMES_NAME = "Tēmas"
|
||||
LABEL_CHANGE_PASSWORD_NAME = "Parole"
|
||||
BUTTON_BACK = "Atpakaļ"
|
||||
|
||||
[SETTINGS_PERSONAL]
|
||||
LEGEND_PERSONAL = "Personīgie"
|
||||
[SETTINGS_IDENTITY]
|
||||
LEGEND_IDENTITY = "Identity"
|
||||
LABEL_DISPLAY_NAME = "Vārds"
|
||||
LABEL_REPLY_TO = "Atbildēt uz"
|
||||
LABEL_SIGNATURE = "Paraksts"
|
||||
|
|
@ -331,8 +332,11 @@ LOADING_PROCESS = "Atjauno kontu sarakstu"
|
|||
DELETING_ASK = "Tiešām?"
|
||||
|
||||
[SETTINGS_IDENTITIES]
|
||||
LEGEND_IDENTITIES_FOR = "Identities for \"%EMAIL%\""
|
||||
LEGEND_SIGNATURE = "Signature"
|
||||
LEGEND_IDENTITY = "Identity"
|
||||
LEGEND_IDENTITIES = "Additional Identities"
|
||||
LABEL_DISPLAY_NAME = "Vārds"
|
||||
LABEL_REPLY_TO = "Atbildēt uz"
|
||||
LABEL_SIGNATURE = "Paraksts"
|
||||
BUTTON_ADD_IDENTITY = "Add Identity"
|
||||
BUTTON_DELETE = "Delete"
|
||||
LOADING_PROCESS = "Updating identity list"
|
||||
|
|
|
|||
|
|
@ -250,14 +250,15 @@ LABEL_PERSONAL_NAME = "Persoonlijk"
|
|||
LABEL_GENERAL_NAME = "Algemeen"
|
||||
LABEL_FOLDERS_NAME = "Mappen"
|
||||
LABEL_ACCOUNTS_NAME = "Accounts"
|
||||
LABEL_IDENTITY_NAME = "Identity"
|
||||
LABEL_IDENTITIES_NAME = "Identities"
|
||||
LABEL_SOCIAL_NAME = "Social"
|
||||
LABEL_THEMES_NAME = "Themes"
|
||||
LABEL_CHANGE_PASSWORD_NAME = "Paswoord"
|
||||
BUTTON_BACK = "Terug"
|
||||
|
||||
[SETTINGS_PERSONAL]
|
||||
LEGEND_PERSONAL = "Persoonlijk"
|
||||
[SETTINGS_IDENTITY]
|
||||
LEGEND_IDENTITY = "Identity"
|
||||
LABEL_DISPLAY_NAME = "Naam"
|
||||
LABEL_REPLY_TO = "Antwoorden naar"
|
||||
LABEL_SIGNATURE = "Handtekening"
|
||||
|
|
@ -331,8 +332,11 @@ LOADING_PROCESS = "Updating account lijst"
|
|||
DELETING_ASK = "Ben je zeker?"
|
||||
|
||||
[SETTINGS_IDENTITIES]
|
||||
LEGEND_IDENTITIES_FOR = "Identities for \"%EMAIL%\""
|
||||
LEGEND_SIGNATURE = "Signature"
|
||||
LEGEND_IDENTITY = "Identity"
|
||||
LEGEND_IDENTITIES = "Additional Identities"
|
||||
LABEL_DISPLAY_NAME = "Naam"
|
||||
LABEL_REPLY_TO = "Antwoorden naar"
|
||||
LABEL_SIGNATURE = "Handtekening"
|
||||
BUTTON_ADD_IDENTITY = "Add Identity"
|
||||
BUTTON_DELETE = "Delete"
|
||||
LOADING_PROCESS = "Updating identity list"
|
||||
|
|
|
|||
|
|
@ -250,14 +250,15 @@ LABEL_PERSONAL_NAME = "Pessoal"
|
|||
LABEL_GENERAL_NAME = "Geral"
|
||||
LABEL_FOLDERS_NAME = "Pastas"
|
||||
LABEL_ACCOUNTS_NAME = "Contas"
|
||||
LABEL_IDENTITY_NAME = "Identity"
|
||||
LABEL_IDENTITIES_NAME = "Identities"
|
||||
LABEL_SOCIAL_NAME = "Social"
|
||||
LABEL_THEMES_NAME = "Temas"
|
||||
LABEL_CHANGE_PASSWORD_NAME = "Senha"
|
||||
BUTTON_BACK = "Voltar"
|
||||
|
||||
[SETTINGS_PERSONAL]
|
||||
LEGEND_PERSONAL = "Pessoal"
|
||||
[SETTINGS_IDENTITY]
|
||||
LEGEND_IDENTITY = "Identity"
|
||||
LABEL_DISPLAY_NAME = "Nome"
|
||||
LABEL_REPLY_TO = "Reenviar para"
|
||||
LABEL_SIGNATURE = "Assinatura"
|
||||
|
|
@ -331,8 +332,11 @@ LOADING_PROCESS = "Atualizar a lista de contas"
|
|||
DELETING_ASK = "Você tem certeza?"
|
||||
|
||||
[SETTINGS_IDENTITIES]
|
||||
LEGEND_IDENTITIES_FOR = "Identities for \"%EMAIL%\""
|
||||
LEGEND_SIGNATURE = "Signature"
|
||||
LEGEND_IDENTITY = "Identity"
|
||||
LEGEND_IDENTITIES = "Additional Identities"
|
||||
LABEL_DISPLAY_NAME = "Nome"
|
||||
LABEL_REPLY_TO = "Reenviar para"
|
||||
LABEL_SIGNATURE = "Assinatura"
|
||||
BUTTON_ADD_IDENTITY = "Add Identity"
|
||||
BUTTON_DELETE = "Delete"
|
||||
LOADING_PROCESS = "Updating identity list"
|
||||
|
|
|
|||
|
|
@ -250,14 +250,15 @@ LABEL_PERSONAL_NAME = "Персональные"
|
|||
LABEL_GENERAL_NAME = "Основные"
|
||||
LABEL_FOLDERS_NAME = "Папки"
|
||||
LABEL_ACCOUNTS_NAME = "Аккаунты"
|
||||
LABEL_IDENTITY_NAME = "Профиль"
|
||||
LABEL_IDENTITIES_NAME = "Профили"
|
||||
LABEL_SOCIAL_NAME = "Социальные"
|
||||
LABEL_THEMES_NAME = "Темы"
|
||||
LABEL_CHANGE_PASSWORD_NAME = "Пароль"
|
||||
BUTTON_BACK = "Назад"
|
||||
|
||||
[SETTINGS_PERSONAL]
|
||||
LEGEND_PERSONAL = "Персональные Настройки"
|
||||
[SETTINGS_IDENTITY]
|
||||
LEGEND_IDENTITY = "Настройки профиля"
|
||||
LABEL_DISPLAY_NAME = "Имя"
|
||||
LABEL_REPLY_TO = "Отвечать на"
|
||||
LABEL_SIGNATURE = "Подпись"
|
||||
|
|
@ -331,8 +332,11 @@ LOADING_PROCESS = "Обновление списка аккаунтов"
|
|||
DELETING_ASK = "Точно?"
|
||||
|
||||
[SETTINGS_IDENTITIES]
|
||||
LEGEND_IDENTITIES_FOR = "Профили для \"%EMAIL%\""
|
||||
LEGEND_SIGNATURE = "Подпись"
|
||||
LEGEND_IDENTITY = "Настройки основного профиля"
|
||||
LEGEND_IDENTITIES = "Дополнительные профили"
|
||||
LABEL_DISPLAY_NAME = "Имя"
|
||||
LABEL_REPLY_TO = "Отвечать на"
|
||||
LABEL_SIGNATURE = "Подпись"
|
||||
BUTTON_ADD_IDENTITY = "Добавить профиль"
|
||||
BUTTON_DELETE = "Удалить"
|
||||
LOADING_PROCESS = "Обновление списка профилей"
|
||||
|
|
|
|||
|
|
@ -7501,6 +7501,7 @@ function PopupsComposeViewModel()
|
|||
|
||||
var
|
||||
self = this,
|
||||
oRainLoopData = RL.data(),
|
||||
fEmailArrayToStringLineHelper = function (aList) {
|
||||
|
||||
var
|
||||
|
|
@ -7594,12 +7595,21 @@ function PopupsComposeViewModel()
|
|||
this.currentIdentityResultEmail = ko.observable('');
|
||||
|
||||
this.identitiesOptions = ko.computed(function () {
|
||||
return _.map(RL.data().identities(), function (oItem) {
|
||||
return {
|
||||
|
||||
var aList = [{
|
||||
'optValue': oRainLoopData.accountEmail(),
|
||||
'optText': this.formattedFrom(false)
|
||||
}];
|
||||
|
||||
_.each(oRainLoopData.identities(), function (oItem) {
|
||||
aList.push({
|
||||
'optValue': oItem.id,
|
||||
'optText': oItem.formattedNameForCompose()
|
||||
};
|
||||
});
|
||||
});
|
||||
|
||||
return aList;
|
||||
|
||||
}, this);
|
||||
|
||||
ko.computed(function () {
|
||||
|
|
@ -7612,7 +7622,7 @@ function PopupsComposeViewModel()
|
|||
sID = this.currentIdentityID()
|
||||
;
|
||||
|
||||
if (this.bAllowIdentities && sID)
|
||||
if (this.bAllowIdentities && sID && sID !== RL.data().accountEmail())
|
||||
{
|
||||
oItem = _.find(aList, function (oItem) {
|
||||
return oItem && sID === oItem['id'];
|
||||
|
|
@ -7624,9 +7634,11 @@ function PopupsComposeViewModel()
|
|||
if ('' === sResult && aList[0])
|
||||
{
|
||||
this.currentIdentityID(aList[0]['id']);
|
||||
return '';
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
if ('' === sResult)
|
||||
{
|
||||
sResult = this.formattedFrom(false);
|
||||
sResultEmail = this.formattedFrom(true);
|
||||
|
|
@ -7909,10 +7921,8 @@ PopupsComposeViewModel.prototype.findIdentityIdByMessage = function (sComposeTyp
|
|||
oIDs[oItem.email()] = oItem['id'];
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
oIDs[RL.data().accountEmail()] = RL.data().accountEmail();
|
||||
}
|
||||
|
||||
oIDs[RL.data().accountEmail()] = RL.data().accountEmail();
|
||||
|
||||
switch (sComposeType)
|
||||
{
|
||||
|
|
@ -11557,57 +11567,6 @@ SettingsGeneral.prototype.selectLanguage = function ()
|
|||
kn.showScreenPopup(PopupsLanguagesViewModel);
|
||||
};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function SettingsPersonal()
|
||||
{
|
||||
var oData = RL.data();
|
||||
|
||||
this.displayName = oData.displayName;
|
||||
this.replyTo = oData.replyTo;
|
||||
this.signature = oData.signature;
|
||||
|
||||
this.nameTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
this.replyTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
this.signatureTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
}
|
||||
|
||||
Utils.addSettingsViewModel(SettingsPersonal, 'SettingsPersonal', 'SETTINGS_LABELS/LABEL_PERSONAL_NAME', 'personal');
|
||||
|
||||
SettingsPersonal.prototype.onBuild = function ()
|
||||
{
|
||||
var self = this;
|
||||
_.delay(function () {
|
||||
|
||||
var
|
||||
oData = RL.data(),
|
||||
f1 = Utils.settingsSaveHelperSimpleFunction(self.nameTrigger, self),
|
||||
f2 = Utils.settingsSaveHelperSimpleFunction(self.replyTrigger, self),
|
||||
f3 = Utils.settingsSaveHelperSimpleFunction(self.signatureTrigger, self)
|
||||
;
|
||||
|
||||
oData.displayName.subscribe(function (sValue) {
|
||||
RL.remote().saveSettings(f1, {
|
||||
'DisplayName': sValue
|
||||
});
|
||||
});
|
||||
|
||||
oData.replyTo.subscribe(function (sValue) {
|
||||
RL.remote().saveSettings(f2, {
|
||||
'ReplyTo': sValue
|
||||
});
|
||||
});
|
||||
|
||||
oData.signature.subscribe(function (sValue) {
|
||||
RL.remote().saveSettings(f3, {
|
||||
'Signature': sValue
|
||||
});
|
||||
});
|
||||
|
||||
}, 50);
|
||||
};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -11674,6 +11633,57 @@ SettingsAccounts.prototype.deleteAccount = function (oAccountToRemove)
|
|||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
function SettingsIdentity()
|
||||
{
|
||||
var oData = RL.data();
|
||||
|
||||
this.displayName = oData.displayName;
|
||||
this.signature = oData.signature;
|
||||
this.replyTo = oData.replyTo;
|
||||
|
||||
this.displayNameTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
this.replyTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
this.signatureTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
}
|
||||
|
||||
Utils.addSettingsViewModel(SettingsIdentity, 'SettingsIdentity', 'SETTINGS_LABELS/LABEL_IDENTITY_NAME', 'identity');
|
||||
|
||||
SettingsIdentity.prototype.onBuild = function ()
|
||||
{
|
||||
var self = this;
|
||||
_.delay(function () {
|
||||
|
||||
var
|
||||
oData = RL.data(),
|
||||
f1 = Utils.settingsSaveHelperSimpleFunction(self.displayNameTrigger, self),
|
||||
f2 = Utils.settingsSaveHelperSimpleFunction(self.replyTrigger, self),
|
||||
f3 = Utils.settingsSaveHelperSimpleFunction(self.signatureTrigger, self)
|
||||
;
|
||||
|
||||
oData.displayName.subscribe(function (sValue) {
|
||||
RL.remote().saveSettings(f1, {
|
||||
'DisplayName': sValue
|
||||
});
|
||||
});
|
||||
|
||||
oData.replyTo.subscribe(function (sValue) {
|
||||
RL.remote().saveSettings(f2, {
|
||||
'ReplyTo': sValue
|
||||
});
|
||||
});
|
||||
|
||||
oData.signature.subscribe(function (sValue) {
|
||||
RL.remote().saveSettings(f3, {
|
||||
'Signature': sValue
|
||||
});
|
||||
});
|
||||
|
||||
}, 50);
|
||||
};
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
*/
|
||||
|
|
@ -11681,12 +11691,16 @@ function SettingsIdentities()
|
|||
{
|
||||
var oData = RL.data();
|
||||
|
||||
this.displayName = oData.displayName;
|
||||
this.signature = oData.signature;
|
||||
this.replyTo = oData.replyTo;
|
||||
|
||||
this.displayNameTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
this.replyTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
this.signatureTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
|
||||
this.identities = oData.identities;
|
||||
|
||||
this.legent = ko.computed(function () {
|
||||
return Utils.i18n('SETTINGS_IDENTITIES/LEGEND_IDENTITIES_FOR', {'EMAIL': oData.accountEmail()});
|
||||
}, this);
|
||||
|
||||
this.processText = ko.computed(function () {
|
||||
return oData.identitiesLoading() ? Utils.i18n('SETTINGS_IDENTITIES/LOADING_PROCESS') : '';
|
||||
}, this);
|
||||
|
|
@ -11708,9 +11722,6 @@ function SettingsIdentities()
|
|||
}
|
||||
}
|
||||
]});
|
||||
|
||||
this.signature = oData.signature;
|
||||
this.signatureTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
}
|
||||
|
||||
Utils.addSettingsViewModel(SettingsIdentities, 'SettingsIdentities', 'SETTINGS_LABELS/LABEL_IDENTITIES_NAME', 'identities');
|
||||
|
|
@ -11726,7 +11737,6 @@ SettingsIdentities.prototype.editIdentity = function (oIdentity)
|
|||
};
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {IdentityModel} oIdentityToRemove
|
||||
*/
|
||||
SettingsIdentities.prototype.deleteIdentity = function (oIdentityToRemove)
|
||||
|
|
@ -11770,11 +11780,25 @@ SettingsIdentities.prototype.onBuild = function (oDom)
|
|||
|
||||
var
|
||||
oData = RL.data(),
|
||||
f1 = Utils.settingsSaveHelperSimpleFunction(self.signatureTrigger, self)
|
||||
f1 = Utils.settingsSaveHelperSimpleFunction(self.displayNameTrigger, self),
|
||||
f2 = Utils.settingsSaveHelperSimpleFunction(self.replyTrigger, self),
|
||||
f3 = Utils.settingsSaveHelperSimpleFunction(self.signatureTrigger, self)
|
||||
;
|
||||
|
||||
oData.signature.subscribe(function (sValue) {
|
||||
oData.displayName.subscribe(function (sValue) {
|
||||
RL.remote().saveSettings(f1, {
|
||||
'DisplayName': sValue
|
||||
});
|
||||
});
|
||||
|
||||
oData.replyTo.subscribe(function (sValue) {
|
||||
RL.remote().saveSettings(f2, {
|
||||
'ReplyTo': sValue
|
||||
});
|
||||
});
|
||||
|
||||
oData.signature.subscribe(function (sValue) {
|
||||
RL.remote().saveSettings(f3, {
|
||||
'Signature': sValue
|
||||
});
|
||||
});
|
||||
|
|
@ -15780,7 +15804,7 @@ RainLoopApp.prototype.bootstart = function ()
|
|||
|
||||
if (this.settingsGet('AllowIdentities'))
|
||||
{
|
||||
Utils.removeSettingsViewModel(SettingsPersonal);
|
||||
Utils.removeSettingsViewModel(SettingsIdentity);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue