mirror of
https://github.com/the-djmaze/snappymail.git
synced 2025-01-01 12:32:40 +08:00
"Add your signature to all the outgoing messages" configuration (close #52)
This commit is contained in:
parent
fa35368e45
commit
b0593b813e
23 changed files with 161 additions and 22 deletions
|
@ -9,6 +9,7 @@ function SettingsIdentities()
|
|||
|
||||
this.displayName = oData.displayName;
|
||||
this.signature = oData.signature;
|
||||
this.signatureToAll = oData.signatureToAll;
|
||||
this.replyTo = oData.replyTo;
|
||||
|
||||
this.displayNameTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
|
@ -119,5 +120,11 @@ SettingsIdentities.prototype.onBuild = function (oDom)
|
|||
});
|
||||
});
|
||||
|
||||
oData.signatureToAll.subscribe(function (bValue) {
|
||||
RL.remote().saveSettings(null, {
|
||||
'SignatureToAll': bValue ? '1' : '0'
|
||||
});
|
||||
});
|
||||
|
||||
}, 50);
|
||||
};
|
|
@ -9,6 +9,7 @@ function SettingsIdentity()
|
|||
|
||||
this.displayName = oData.displayName;
|
||||
this.signature = oData.signature;
|
||||
this.signatureToAll = oData.signatureToAll;
|
||||
this.replyTo = oData.replyTo;
|
||||
|
||||
this.displayNameTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
|
@ -47,6 +48,12 @@ SettingsIdentity.prototype.onBuild = function ()
|
|||
'Signature': sValue
|
||||
});
|
||||
});
|
||||
|
||||
oData.signatureToAll.subscribe(function (bValue) {
|
||||
RL.remote().saveSettings(null, {
|
||||
'SignatureToAll': bValue ? '1' : '0'
|
||||
});
|
||||
});
|
||||
|
||||
}, 50);
|
||||
};
|
||||
|
|
|
@ -66,6 +66,7 @@ function WebMailDataStorage()
|
|||
// personal
|
||||
this.displayName = ko.observable('');
|
||||
this.signature = ko.observable('');
|
||||
this.signatureToAll = ko.observable(false);
|
||||
this.replyTo = ko.observable('');
|
||||
|
||||
// accounts
|
||||
|
@ -398,6 +399,7 @@ WebMailDataStorage.prototype.populateDataOnStart = function()
|
|||
this.displayName(RL.settingsGet('DisplayName'));
|
||||
this.replyTo(RL.settingsGet('ReplyTo'));
|
||||
this.signature(RL.settingsGet('Signature'));
|
||||
this.signatureToAll(!!RL.settingsGet('SignatureToAll'));
|
||||
|
||||
this.lastFoldersHash = RL.local().get(Enums.ClientSideKeyName.FoldersLashHash) || '';
|
||||
|
||||
|
|
|
@ -565,6 +565,26 @@ PopupsComposeViewModel.prototype.onHide = function ()
|
|||
kn.routeOn();
|
||||
};
|
||||
|
||||
PopupsComposeViewModel.prototype.convertSignature = function (sSignature, sFrom)
|
||||
{
|
||||
if ('' !== sSignature)
|
||||
{
|
||||
sFrom = Utils.pString(sFrom);
|
||||
if ('' !== sFrom)
|
||||
{
|
||||
sSignature = sSignature.replace(/{{FROM}}/, sFrom);
|
||||
}
|
||||
else
|
||||
{
|
||||
sSignature = sSignature.replace(/{{IF:FROM}}[\s\S]+{{\/IF:FROM}}/gm, '');
|
||||
}
|
||||
|
||||
sSignature = Utils.trim(sSignature.replace(/{{FROM}}/, '').replace(/{{IF:FROM}}/, '').replace(/{{\/IF:FROM}}/, ''));
|
||||
}
|
||||
|
||||
return sSignature;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string=} sType = Enums.ComposeType.Empty
|
||||
* @param {?MessageModel|Array=} oMessageOrArray = null
|
||||
|
@ -587,11 +607,13 @@ PopupsComposeViewModel.prototype.onShow = function (sType, oMessageOrArray, aToE
|
|||
aResplyAllParts = [],
|
||||
oExcludeEmail = {},
|
||||
mEmail = RL.data().accountEmail(),
|
||||
sSignature = RL.data().signature(),
|
||||
bSignatureToAll = RL.data().signatureToAll(),
|
||||
aDownloads = [],
|
||||
aDraftInfo = null,
|
||||
oMessage = null,
|
||||
sComposeType = sType || Enums.ComposeType.Empty,
|
||||
fEmailArrayToStringLineHelper = function (aList) {
|
||||
fEmailArrayToStringLineHelper = function (aList, bFriendly) {
|
||||
|
||||
var
|
||||
iIndex = 0,
|
||||
|
@ -601,7 +623,7 @@ PopupsComposeViewModel.prototype.onShow = function (sType, oMessageOrArray, aToE
|
|||
|
||||
for (; iIndex < iLen; iIndex++)
|
||||
{
|
||||
aResult.push(aList[iIndex].toLine(false));
|
||||
aResult.push(aList[iIndex].toLine(!!bFriendly));
|
||||
}
|
||||
|
||||
return aResult.join(', ');
|
||||
|
@ -732,12 +754,19 @@ PopupsComposeViewModel.prototype.onShow = function (sType, oMessageOrArray, aToE
|
|||
break;
|
||||
}
|
||||
|
||||
if (bSignatureToAll && '' !== sSignature)
|
||||
{
|
||||
sText = Utils.convertPlainTextToHtml(this.convertSignature(sSignature,
|
||||
fEmailArrayToStringLineHelper(oMessage.from, true))) + '<br />' + sText;
|
||||
}
|
||||
|
||||
this.oEditor.setRawText(sText, oMessage.isHtml());
|
||||
}
|
||||
}
|
||||
else if (this.oEditor && Enums.ComposeType.Empty === sComposeType)
|
||||
{
|
||||
this.oEditor.setRawText('<br />' + Utils.convertPlainTextToHtml(RL.data().signature()), Enums.EditorDefaultType.Html === RL.data().editorDefaultType());
|
||||
this.oEditor.setRawText(Utils.convertPlainTextToHtml(this.convertSignature(sSignature)),
|
||||
Enums.EditorDefaultType.Html === RL.data().editorDefaultType());
|
||||
}
|
||||
else if (Utils.isNonEmptyArray(oMessageOrArray))
|
||||
{
|
||||
|
|
|
@ -1103,6 +1103,7 @@ class Actions
|
|||
$aResult['DisplayName'] = '';
|
||||
$aResult['ReplyTo'] = '';
|
||||
$aResult['Signature'] = '';
|
||||
$aResult['SignatureToAll'] = false;
|
||||
$aResult['ParentEmail'] = '';
|
||||
$aResult['InterfaceAnimation'] = \RainLoop\Enumerations\InterfaceAnimation::NORMAL;
|
||||
$aResult['CustomThemeType'] = \RainLoop\Enumerations\CustomThemeType::LIGHT;
|
||||
|
@ -1141,6 +1142,7 @@ class Actions
|
|||
$aResult['DisplayName'] = $oSettings->GetConf('DisplayName', $aResult['DisplayName']);
|
||||
$aResult['ReplyTo'] = $oSettings->GetConf('ReplyTo', $aResult['ReplyTo']);
|
||||
$aResult['Signature'] = $oSettings->GetConf('Signature', $aResult['Signature']);
|
||||
$aResult['SignatureToAll'] = !!$oSettings->GetConf('SignatureToAll', $aResult['SignatureToAll']);
|
||||
|
||||
$aResult['ParentEmail'] = $oAccount->ParentEmail();
|
||||
}
|
||||
|
@ -3082,6 +3084,7 @@ class Actions
|
|||
$this->setSettingsFromParams($oSettings, 'DisplayName', 'string');
|
||||
$this->setSettingsFromParams($oSettings, 'ReplyTo', 'string');
|
||||
$this->setSettingsFromParams($oSettings, 'Signature', 'string');
|
||||
$this->setSettingsFromParams($oSettings, 'SignatureToAll', 'bool');
|
||||
|
||||
$this->setSettingsFromParams($oSettings, 'CustomThemeImg', 'string');
|
||||
|
||||
|
|
|
@ -4,31 +4,40 @@
|
|||
<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>
|
||||
<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>
|
||||
<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>
|
||||
<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 class="control-group">
|
||||
<div class="controls">
|
||||
<label data-bind="click: function () { signatureToAll(!signatureToAll()); }">
|
||||
<i data-bind="css: signatureToAll() ? 'icon-checkbox-checked' : 'icon-checkbox-unchecked'"></i>
|
||||
|
||||
<span class="i18n" data-i18n-text="SETTINGS_IDENTITIES/LABEL_ADD_SIGNATURE_TO_ALL"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="form-horizontal">
|
||||
|
|
|
@ -29,5 +29,14 @@
|
|||
<div style="vertical-align: top;" data-bind="saveTrigger: signatureTrigger"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="control-group">
|
||||
<div class="controls">
|
||||
<label data-bind="click: function () { signatureToAll(!signatureToAll()); }">
|
||||
<i data-bind="css: signatureToAll() ? 'icon-checkbox-checked' : 'icon-checkbox-unchecked'"></i>
|
||||
|
||||
<span class="i18n" data-i18n-text="SETTINGS_IDENTITIES/LABEL_ADD_SIGNATURE_TO_ALL"></span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -295,6 +295,7 @@ LEGEND_IDENTITY = "Identity"
|
|||
LABEL_DISPLAY_NAME = "Name"
|
||||
LABEL_REPLY_TO = "Reply To"
|
||||
LABEL_SIGNATURE = "Signatur"
|
||||
LABEL_ADD_SIGNATURE_TO_ALL = "Add your signature to all the outgoing messages"
|
||||
|
||||
[SETTINGS_GENERAL]
|
||||
LEGEND_GENERAL = "Allgemein"
|
||||
|
@ -382,6 +383,7 @@ LEGEND_IDENTITIES = "Additional Identities"
|
|||
LABEL_DISPLAY_NAME = "Name"
|
||||
LABEL_REPLY_TO = "Reply To"
|
||||
LABEL_SIGNATURE = "Signatur"
|
||||
LABEL_ADD_SIGNATURE_TO_ALL = "Add your signature to all the outgoing messages"
|
||||
BUTTON_ADD_IDENTITY = "Add Identity"
|
||||
BUTTON_DELETE = "Delete"
|
||||
LOADING_PROCESS = "Updating identity list"
|
||||
|
|
|
@ -295,6 +295,7 @@ LEGEND_IDENTITY = "Identity"
|
|||
LABEL_DISPLAY_NAME = "Name"
|
||||
LABEL_REPLY_TO = "Reply-To"
|
||||
LABEL_SIGNATURE = "Signature"
|
||||
LABEL_ADD_SIGNATURE_TO_ALL = "Add your signature to all the outgoing messages"
|
||||
|
||||
[SETTINGS_GENERAL]
|
||||
LEGEND_GENERAL = "General"
|
||||
|
@ -382,6 +383,7 @@ LEGEND_IDENTITIES = "Additional Identities"
|
|||
LABEL_DISPLAY_NAME = "Name"
|
||||
LABEL_REPLY_TO = "Reply-To"
|
||||
LABEL_SIGNATURE = "Signature"
|
||||
LABEL_ADD_SIGNATURE_TO_ALL = "Add your signature to all the outgoing messages"
|
||||
BUTTON_ADD_IDENTITY = "Add Identity"
|
||||
BUTTON_DELETE = "Delete"
|
||||
LOADING_PROCESS = "Updating identity list"
|
||||
|
|
|
@ -295,6 +295,7 @@ LEGEND_IDENTITY = "Identity"
|
|||
LABEL_DISPLAY_NAME = "Nombre"
|
||||
LABEL_REPLY_TO = "Responder a"
|
||||
LABEL_SIGNATURE = "Firma"
|
||||
LABEL_ADD_SIGNATURE_TO_ALL = "Add your signature to all the outgoing messages"
|
||||
|
||||
[SETTINGS_GENERAL]
|
||||
LEGEND_GENERAL = "General"
|
||||
|
@ -382,6 +383,7 @@ LEGEND_IDENTITIES = "Additional Identities"
|
|||
LABEL_DISPLAY_NAME = "Nombre"
|
||||
LABEL_REPLY_TO = "Responder a"
|
||||
LABEL_SIGNATURE = "Firma"
|
||||
LABEL_ADD_SIGNATURE_TO_ALL = "Add your signature to all the outgoing messages"
|
||||
BUTTON_ADD_IDENTITY = "Add Identity"
|
||||
BUTTON_DELETE = "Delete"
|
||||
LOADING_PROCESS = "Updating identity list"
|
||||
|
|
|
@ -295,6 +295,7 @@ LEGEND_IDENTITY = "Identité"
|
|||
LABEL_DISPLAY_NAME = "Nom"
|
||||
LABEL_REPLY_TO = "Répondre à"
|
||||
LABEL_SIGNATURE = "Signature"
|
||||
LABEL_ADD_SIGNATURE_TO_ALL = "Add your signature to all the outgoing messages"
|
||||
|
||||
[SETTINGS_GENERAL]
|
||||
LEGEND_GENERAL = "Général"
|
||||
|
@ -382,6 +383,7 @@ LEGEND_IDENTITIES = "Identités supplémentaires"
|
|||
LABEL_DISPLAY_NAME = "Nom"
|
||||
LABEL_REPLY_TO = "Répondre à"
|
||||
LABEL_SIGNATURE = "Signature"
|
||||
LABEL_ADD_SIGNATURE_TO_ALL = "Add your signature to all the outgoing messages"
|
||||
BUTTON_ADD_IDENTITY = "Ajouter une identitié"
|
||||
BUTTON_DELETE = "Supprimer"
|
||||
LOADING_PROCESS = "Met à jour la liste d'identités"
|
||||
|
|
|
@ -295,6 +295,7 @@ LEGEND_IDENTITY = "Identity"
|
|||
LABEL_DISPLAY_NAME = "Nafn"
|
||||
LABEL_REPLY_TO = "Svara"
|
||||
LABEL_SIGNATURE = "Undirskrift"
|
||||
LABEL_ADD_SIGNATURE_TO_ALL = "Add your signature to all the outgoing messages"
|
||||
|
||||
[SETTINGS_GENERAL]
|
||||
LEGEND_GENERAL = "Almennt"
|
||||
|
@ -382,6 +383,7 @@ LEGEND_IDENTITIES = "Additional Identities"
|
|||
LABEL_DISPLAY_NAME = "Nafn"
|
||||
LABEL_REPLY_TO = "Svara"
|
||||
LABEL_SIGNATURE = "Undirskrift"
|
||||
LABEL_ADD_SIGNATURE_TO_ALL = "Add your signature to all the outgoing messages"
|
||||
BUTTON_ADD_IDENTITY = "Add Identity"
|
||||
BUTTON_DELETE = "Delete"
|
||||
LOADING_PROCESS = "Updating identity list"
|
||||
|
|
|
@ -292,6 +292,7 @@ LEGEND_IDENTITY = "신원"
|
|||
LABEL_DISPLAY_NAME = "이름"
|
||||
LABEL_REPLY_TO = "답장"
|
||||
LABEL_SIGNATURE = "서명"
|
||||
LABEL_ADD_SIGNATURE_TO_ALL = "Add your signature to all the outgoing messages"
|
||||
|
||||
[SETTINGS_GENERAL]
|
||||
LEGEND_GENERAL = "일반"
|
||||
|
@ -379,6 +380,7 @@ LEGEND_IDENTITIES = "새 신원 추가"
|
|||
LABEL_DISPLAY_NAME = "이름"
|
||||
LABEL_REPLY_TO = "답장"
|
||||
LABEL_SIGNATURE = "서명"
|
||||
LABEL_ADD_SIGNATURE_TO_ALL = "Add your signature to all the outgoing messages"
|
||||
BUTTON_ADD_IDENTITY = "신원 추가"
|
||||
BUTTON_DELETE = "삭제"
|
||||
LOADING_PROCESS = "신원 목록을 업데이트하고 있습니다."
|
||||
|
|
|
@ -295,6 +295,7 @@ LEGEND_IDENTITY = "Identity"
|
|||
LABEL_DISPLAY_NAME = "Vārds"
|
||||
LABEL_REPLY_TO = "Atbildēt uz"
|
||||
LABEL_SIGNATURE = "Paraksts"
|
||||
LABEL_ADD_SIGNATURE_TO_ALL = "Add your signature to all the outgoing messages"
|
||||
|
||||
[SETTINGS_GENERAL]
|
||||
LEGEND_GENERAL = "Vispārējie"
|
||||
|
@ -382,6 +383,7 @@ LEGEND_IDENTITIES = "Additional Identities"
|
|||
LABEL_DISPLAY_NAME = "Vārds"
|
||||
LABEL_REPLY_TO = "Atbildēt uz"
|
||||
LABEL_SIGNATURE = "Paraksts"
|
||||
LABEL_ADD_SIGNATURE_TO_ALL = "Add your signature to all the outgoing messages"
|
||||
BUTTON_ADD_IDENTITY = "Add Identity"
|
||||
BUTTON_DELETE = "Delete"
|
||||
LOADING_PROCESS = "Updating identity list"
|
||||
|
|
|
@ -295,6 +295,7 @@ LEGEND_IDENTITY = "Identity"
|
|||
LABEL_DISPLAY_NAME = "Naam"
|
||||
LABEL_REPLY_TO = "Antwoorden naar"
|
||||
LABEL_SIGNATURE = "Handtekening"
|
||||
LABEL_ADD_SIGNATURE_TO_ALL = "Add your signature to all the outgoing messages"
|
||||
|
||||
[SETTINGS_GENERAL]
|
||||
LEGEND_GENERAL = "Algemeen"
|
||||
|
@ -382,6 +383,7 @@ LEGEND_IDENTITIES = "Additional Identities"
|
|||
LABEL_DISPLAY_NAME = "Naam"
|
||||
LABEL_REPLY_TO = "Antwoorden naar"
|
||||
LABEL_SIGNATURE = "Handtekening"
|
||||
LABEL_ADD_SIGNATURE_TO_ALL = "Add your signature to all the outgoing messages"
|
||||
BUTTON_ADD_IDENTITY = "Add Identity"
|
||||
BUTTON_DELETE = "Delete"
|
||||
LOADING_PROCESS = "Updating identity list"
|
||||
|
|
|
@ -295,6 +295,7 @@ LEGEND_IDENTITY = "Identitet"
|
|||
LABEL_DISPLAY_NAME = "Navn"
|
||||
LABEL_REPLY_TO = "Svar til"
|
||||
LABEL_SIGNATURE = "Signatur"
|
||||
LABEL_ADD_SIGNATURE_TO_ALL = "Add your signature to all the outgoing messages"
|
||||
|
||||
[SETTINGS_GENERAL]
|
||||
LEGEND_GENERAL = "Generelt"
|
||||
|
@ -382,6 +383,7 @@ LEGEND_IDENTITIES = "Tilleggs Identities"
|
|||
LABEL_DISPLAY_NAME = "Navn"
|
||||
LABEL_REPLY_TO = "Svar til"
|
||||
LABEL_SIGNATURE = "Signatur"
|
||||
LABEL_ADD_SIGNATURE_TO_ALL = "Add your signature to all the outgoing messages"
|
||||
BUTTON_ADD_IDENTITY = "Legg Identity"
|
||||
BUTTON_DELETE = "Slett"
|
||||
LOADING_PROCESS = "Oppdaterer identitet liste"
|
||||
|
|
|
@ -295,6 +295,7 @@ LEGEND_IDENTITY = "Tożsamość"
|
|||
LABEL_DISPLAY_NAME = "Imie"
|
||||
LABEL_REPLY_TO = "Zwrotny adres e-mail"
|
||||
LABEL_SIGNATURE = "Sygnatura"
|
||||
LABEL_ADD_SIGNATURE_TO_ALL = "Add your signature to all the outgoing messages"
|
||||
|
||||
[SETTINGS_GENERAL]
|
||||
LEGEND_GENERAL = "Ogólne"
|
||||
|
@ -382,6 +383,7 @@ LEGEND_IDENTITIES = "Dodatkowe Tożsamości"
|
|||
LABEL_DISPLAY_NAME = "Nazwa"
|
||||
LABEL_REPLY_TO = "Odp. do"
|
||||
LABEL_SIGNATURE = "Sygnatura"
|
||||
LABEL_ADD_SIGNATURE_TO_ALL = "Add your signature to all the outgoing messages"
|
||||
BUTTON_ADD_IDENTITY = "Dodaj Tożsamość"
|
||||
BUTTON_DELETE = "Usuń"
|
||||
LOADING_PROCESS = "Aktualizuj listę tożsamości"
|
||||
|
|
|
@ -295,6 +295,7 @@ LEGEND_IDENTITY = "Identity"
|
|||
LABEL_DISPLAY_NAME = "Nome"
|
||||
LABEL_REPLY_TO = "Reenviar para"
|
||||
LABEL_SIGNATURE = "Assinatura"
|
||||
LABEL_ADD_SIGNATURE_TO_ALL = "Add your signature to all the outgoing messages"
|
||||
|
||||
[SETTINGS_GENERAL]
|
||||
LEGEND_GENERAL = "Geral"
|
||||
|
@ -382,6 +383,7 @@ LEGEND_IDENTITIES = "Additional Identities"
|
|||
LABEL_DISPLAY_NAME = "Nome"
|
||||
LABEL_REPLY_TO = "Reenviar para"
|
||||
LABEL_SIGNATURE = "Assinatura"
|
||||
LABEL_ADD_SIGNATURE_TO_ALL = "Add your signature to all the outgoing messages"
|
||||
BUTTON_ADD_IDENTITY = "Add Identity"
|
||||
BUTTON_DELETE = "Delete"
|
||||
LOADING_PROCESS = "Updating identity list"
|
||||
|
|
|
@ -295,6 +295,7 @@ LEGEND_IDENTITY = "Identity"
|
|||
LABEL_DISPLAY_NAME = "Nome"
|
||||
LABEL_REPLY_TO = "Reenviar para"
|
||||
LABEL_SIGNATURE = "Assinatura"
|
||||
LABEL_ADD_SIGNATURE_TO_ALL = "Add your signature to all the outgoing messages"
|
||||
|
||||
[SETTINGS_GENERAL]
|
||||
LEGEND_GENERAL = "Geral"
|
||||
|
@ -382,6 +383,7 @@ LEGEND_IDENTITIES = "Additional Identities"
|
|||
LABEL_DISPLAY_NAME = "Nome"
|
||||
LABEL_REPLY_TO = "Reenviar para"
|
||||
LABEL_SIGNATURE = "Assinatura"
|
||||
LABEL_ADD_SIGNATURE_TO_ALL = "Add your signature to all the outgoing messages"
|
||||
BUTTON_ADD_IDENTITY = "Add Identity"
|
||||
BUTTON_DELETE = "Delete"
|
||||
LOADING_PROCESS = "Updating identity list"
|
||||
|
|
|
@ -295,6 +295,7 @@ LEGEND_IDENTITY = "Настройки профиля"
|
|||
LABEL_DISPLAY_NAME = "Имя"
|
||||
LABEL_REPLY_TO = "Отвечать на"
|
||||
LABEL_SIGNATURE = "Подпись"
|
||||
LABEL_ADD_SIGNATURE_TO_ALL = "Add your signature to all the outgoing messages"
|
||||
|
||||
[SETTINGS_GENERAL]
|
||||
LEGEND_GENERAL = "Основные Настройки"
|
||||
|
@ -382,6 +383,7 @@ LEGEND_IDENTITIES = "Дополнительные профили"
|
|||
LABEL_DISPLAY_NAME = "Имя"
|
||||
LABEL_REPLY_TO = "Отвечать на"
|
||||
LABEL_SIGNATURE = "Подпись"
|
||||
LABEL_ADD_SIGNATURE_TO_ALL = "Добавлять свою подпись ко всем исходящим сообщениям"
|
||||
BUTTON_ADD_IDENTITY = "Добавить профиль"
|
||||
BUTTON_DELETE = "Удалить"
|
||||
LOADING_PROCESS = "Обновление списка профилей"
|
||||
|
|
|
@ -295,6 +295,7 @@ LEGEND_IDENTITY = "签名"
|
|||
LABEL_DISPLAY_NAME = "名称"
|
||||
LABEL_REPLY_TO = "回复"
|
||||
LABEL_SIGNATURE = "签名"
|
||||
LABEL_ADD_SIGNATURE_TO_ALL = "Add your signature to all the outgoing messages"
|
||||
|
||||
[SETTINGS_GENERAL]
|
||||
LEGEND_GENERAL = "一般设置"
|
||||
|
@ -382,6 +383,7 @@ LEGEND_IDENTITIES = "附加签名"
|
|||
LABEL_DISPLAY_NAME = "名称"
|
||||
LABEL_REPLY_TO = "回复"
|
||||
LABEL_SIGNATURE = "签名"
|
||||
LABEL_ADD_SIGNATURE_TO_ALL = "Add your signature to all the outgoing messages"
|
||||
BUTTON_ADD_IDENTITY = "添加签名"
|
||||
BUTTON_DELETE = "删除"
|
||||
LOADING_PROCESS = "更新签名中"
|
||||
|
|
|
@ -8573,6 +8573,26 @@ PopupsComposeViewModel.prototype.onHide = function ()
|
|||
kn.routeOn();
|
||||
};
|
||||
|
||||
PopupsComposeViewModel.prototype.convertSignature = function (sSignature, sFrom)
|
||||
{
|
||||
if ('' !== sSignature)
|
||||
{
|
||||
sFrom = Utils.pString(sFrom);
|
||||
if ('' !== sFrom)
|
||||
{
|
||||
sSignature = sSignature.replace(/{{FROM}}/, sFrom);
|
||||
}
|
||||
else
|
||||
{
|
||||
sSignature = sSignature.replace(/{{IF:FROM}}[\s\S]+{{\/IF:FROM}}/gm, '');
|
||||
}
|
||||
|
||||
sSignature = Utils.trim(sSignature.replace(/{{FROM}}/, '').replace(/{{IF:FROM}}/, '').replace(/{{\/IF:FROM}}/, ''));
|
||||
}
|
||||
|
||||
return sSignature;
|
||||
};
|
||||
|
||||
/**
|
||||
* @param {string=} sType = Enums.ComposeType.Empty
|
||||
* @param {?MessageModel|Array=} oMessageOrArray = null
|
||||
|
@ -8595,11 +8615,13 @@ PopupsComposeViewModel.prototype.onShow = function (sType, oMessageOrArray, aToE
|
|||
aResplyAllParts = [],
|
||||
oExcludeEmail = {},
|
||||
mEmail = RL.data().accountEmail(),
|
||||
sSignature = RL.data().signature(),
|
||||
bSignatureToAll = RL.data().signatureToAll(),
|
||||
aDownloads = [],
|
||||
aDraftInfo = null,
|
||||
oMessage = null,
|
||||
sComposeType = sType || Enums.ComposeType.Empty,
|
||||
fEmailArrayToStringLineHelper = function (aList) {
|
||||
fEmailArrayToStringLineHelper = function (aList, bFriendly) {
|
||||
|
||||
var
|
||||
iIndex = 0,
|
||||
|
@ -8609,7 +8631,7 @@ PopupsComposeViewModel.prototype.onShow = function (sType, oMessageOrArray, aToE
|
|||
|
||||
for (; iIndex < iLen; iIndex++)
|
||||
{
|
||||
aResult.push(aList[iIndex].toLine(false));
|
||||
aResult.push(aList[iIndex].toLine(!!bFriendly));
|
||||
}
|
||||
|
||||
return aResult.join(', ');
|
||||
|
@ -8740,12 +8762,19 @@ PopupsComposeViewModel.prototype.onShow = function (sType, oMessageOrArray, aToE
|
|||
break;
|
||||
}
|
||||
|
||||
if (bSignatureToAll && '' !== sSignature)
|
||||
{
|
||||
sText = Utils.convertPlainTextToHtml(this.convertSignature(sSignature,
|
||||
fEmailArrayToStringLineHelper(oMessage.from, true))) + '<br />' + sText;
|
||||
}
|
||||
|
||||
this.oEditor.setRawText(sText, oMessage.isHtml());
|
||||
}
|
||||
}
|
||||
else if (this.oEditor && Enums.ComposeType.Empty === sComposeType)
|
||||
{
|
||||
this.oEditor.setRawText('<br />' + Utils.convertPlainTextToHtml(RL.data().signature()), Enums.EditorDefaultType.Html === RL.data().editorDefaultType());
|
||||
this.oEditor.setRawText(Utils.convertPlainTextToHtml(this.convertSignature(sSignature)),
|
||||
Enums.EditorDefaultType.Html === RL.data().editorDefaultType());
|
||||
}
|
||||
else if (Utils.isNonEmptyArray(oMessageOrArray))
|
||||
{
|
||||
|
@ -12687,6 +12716,7 @@ function SettingsIdentity()
|
|||
|
||||
this.displayName = oData.displayName;
|
||||
this.signature = oData.signature;
|
||||
this.signatureToAll = oData.signatureToAll;
|
||||
this.replyTo = oData.replyTo;
|
||||
|
||||
this.displayNameTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
|
@ -12725,6 +12755,12 @@ SettingsIdentity.prototype.onBuild = function ()
|
|||
'Signature': sValue
|
||||
});
|
||||
});
|
||||
|
||||
oData.signatureToAll.subscribe(function (bValue) {
|
||||
RL.remote().saveSettings(null, {
|
||||
'SignatureToAll': bValue ? '1' : '0'
|
||||
});
|
||||
});
|
||||
|
||||
}, 50);
|
||||
};
|
||||
|
@ -12738,6 +12774,7 @@ function SettingsIdentities()
|
|||
|
||||
this.displayName = oData.displayName;
|
||||
this.signature = oData.signature;
|
||||
this.signatureToAll = oData.signatureToAll;
|
||||
this.replyTo = oData.replyTo;
|
||||
|
||||
this.displayNameTrigger = ko.observable(Enums.SaveSettingsStep.Idle);
|
||||
|
@ -12848,6 +12885,12 @@ SettingsIdentities.prototype.onBuild = function (oDom)
|
|||
});
|
||||
});
|
||||
|
||||
oData.signatureToAll.subscribe(function (bValue) {
|
||||
RL.remote().saveSettings(null, {
|
||||
'SignatureToAll': bValue ? '1' : '0'
|
||||
});
|
||||
});
|
||||
|
||||
}, 50);
|
||||
};
|
||||
/**
|
||||
|
@ -13528,6 +13571,7 @@ function WebMailDataStorage()
|
|||
// personal
|
||||
this.displayName = ko.observable('');
|
||||
this.signature = ko.observable('');
|
||||
this.signatureToAll = ko.observable(false);
|
||||
this.replyTo = ko.observable('');
|
||||
|
||||
// accounts
|
||||
|
@ -13860,6 +13904,7 @@ WebMailDataStorage.prototype.populateDataOnStart = function()
|
|||
this.displayName(RL.settingsGet('DisplayName'));
|
||||
this.replyTo(RL.settingsGet('ReplyTo'));
|
||||
this.signature(RL.settingsGet('Signature'));
|
||||
this.signatureToAll(!!RL.settingsGet('SignatureToAll'));
|
||||
|
||||
this.lastFoldersHash = RL.local().get(Enums.ClientSideKeyName.FoldersLashHash) || '';
|
||||
|
||||
|
|
14
rainloop/v/0.0.0/static/js/app.min.js
vendored
14
rainloop/v/0.0.0/static/js/app.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue