mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-07-13 03:27:39 +03:00
Signature builder small changes
This commit is contained in:
parent
5584c5037f
commit
4c6fd9cdd1
6 changed files with 19 additions and 22 deletions
|
|
@ -9,7 +9,6 @@
|
||||||
ko = require('ko'),
|
ko = require('ko'),
|
||||||
|
|
||||||
Enums = require('Common/Enums'),
|
Enums = require('Common/Enums'),
|
||||||
Translator = require('Common/Translator'),
|
|
||||||
Links = require('Common/Links'),
|
Links = require('Common/Links'),
|
||||||
|
|
||||||
AccountStore = require('Stores/User/Account'),
|
AccountStore = require('Stores/User/Account'),
|
||||||
|
|
@ -26,14 +25,6 @@
|
||||||
this.accounts = AccountStore.accounts;
|
this.accounts = AccountStore.accounts;
|
||||||
this.identities = IdentityStore.identities;
|
this.identities = IdentityStore.identities;
|
||||||
|
|
||||||
this.processText = ko.computed(function () {
|
|
||||||
return AccountStore.accounts.loading() ? Translator.i18n('SETTINGS_ACCOUNTS/LOADING_PROCESS') : '';
|
|
||||||
}, this);
|
|
||||||
|
|
||||||
this.visibility = ko.computed(function () {
|
|
||||||
return '' === this.processText() ? 'hidden' : 'visible';
|
|
||||||
}, this);
|
|
||||||
|
|
||||||
this.accountForDeletion = ko.observable(null).deleteAccessHelper();
|
this.accountForDeletion = ko.observable(null).deleteAccessHelper();
|
||||||
this.identityForDeletion = ko.observable(null).deleteAccessHelper();
|
this.identityForDeletion = ko.observable(null).deleteAccessHelper();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1131,8 +1131,8 @@
|
||||||
'EMAIL': sFrom
|
'EMAIL': sFrom
|
||||||
});
|
});
|
||||||
|
|
||||||
sText = '<br />' + sReplyTitle + ':' +
|
sText = '<br /><br />' + sReplyTitle + ':' +
|
||||||
'<blockquote><p>' + sText + '</p></blockquote>';
|
'<blockquote><p>' + Utils.trim(sText) + '</p></blockquote>';
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
@ -1146,7 +1146,7 @@
|
||||||
(0 < sCc.length ? '<br />' + Translator.i18n('COMPOSE/FORWARD_MESSAGE_TOP_CC') + ': ' + sCc : '') +
|
(0 < sCc.length ? '<br />' + Translator.i18n('COMPOSE/FORWARD_MESSAGE_TOP_CC') + ': ' + sCc : '') +
|
||||||
'<br />' + Translator.i18n('COMPOSE/FORWARD_MESSAGE_TOP_SENT') + ': ' + Utils.encodeHtml(sDate) +
|
'<br />' + Translator.i18n('COMPOSE/FORWARD_MESSAGE_TOP_SENT') + ': ' + Utils.encodeHtml(sDate) +
|
||||||
'<br />' + Translator.i18n('COMPOSE/FORWARD_MESSAGE_TOP_SUBJECT') + ': ' + Utils.encodeHtml(sSubject) +
|
'<br />' + Translator.i18n('COMPOSE/FORWARD_MESSAGE_TOP_SUBJECT') + ': ' + Utils.encodeHtml(sSubject) +
|
||||||
'<br /><br />' + sText;
|
'<br /><br />' + Utils.trim(sText) + '<br /><br />';
|
||||||
break;
|
break;
|
||||||
case Enums.ComposeType.ForwardAsAttachment:
|
case Enums.ComposeType.ForwardAsAttachment:
|
||||||
sText = '';
|
sText = '';
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
<div class="form-horizontal">
|
<div class="form-horizontal">
|
||||||
<div class="legend">
|
<div class="legend">
|
||||||
<span class="i18n" data-i18n-text="SETTINGS_ACCOUNTS/LEGEND_ACCOUNTS"></span>
|
<span class="i18n" data-i18n-text="SETTINGS_ACCOUNTS/LEGEND_ACCOUNTS"></span>
|
||||||
|
|
||||||
|
<i class="icon-spinner animated" style="margin-top: 5px" data-bind="visible: accounts.loading"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a class="btn" data-bind="click: addNewAccount">
|
<a class="btn" data-bind="click: addNewAccount">
|
||||||
|
|
@ -9,11 +11,9 @@
|
||||||
|
|
||||||
<span class="i18n" data-i18n-text="SETTINGS_ACCOUNTS/BUTTON_ADD_ACCOUNT"></span>
|
<span class="i18n" data-i18n-text="SETTINGS_ACCOUNTS/BUTTON_ADD_ACCOUNT"></span>
|
||||||
</a>
|
</a>
|
||||||
<div class="process-place" data-bind="style: {'visibility': visibility }">
|
<br />
|
||||||
<i class="icon-spinner animated"></i>
|
<br />
|
||||||
|
<br />
|
||||||
<span data-bind="text: processText"></span>
|
|
||||||
</div>
|
|
||||||
<table class="table table-hover list-table accounts-list" data-bind="i18nUpdate: accounts">
|
<table class="table table-hover list-table accounts-list" data-bind="i18nUpdate: accounts">
|
||||||
<colgroup>
|
<colgroup>
|
||||||
<col />
|
<col />
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,16 @@
|
||||||
rl_signature_replacer = function (editor, sText, sSignature, bHtml, bInsertBefore)
|
rl_signature_replacer = function (editor, sText, sSignature, bHtml, bInsertBefore)
|
||||||
{
|
{
|
||||||
var
|
var
|
||||||
bEmptyText = '' === $.trim(sText),
|
sTextWithoutSignature = sText
|
||||||
|
.replace(/\u0002\u0002[\s\S]*\u0003\u0003/gm, '')
|
||||||
|
.replace(/\u0004\u0004[\s\S]*\u0005\u0005/gm, ''),
|
||||||
|
bEmptyText = '' === $.trim(sTextWithoutSignature),
|
||||||
sNewLine = (bHtml ? '<br />' : "\n")
|
sNewLine = (bHtml ? '<br />' : "\n")
|
||||||
;
|
;
|
||||||
|
|
||||||
if (!bEmptyText && bHtml)
|
if (!bEmptyText && bHtml)
|
||||||
{
|
{
|
||||||
bEmptyText = '' !== $.trim(editor.__plainUtils.htmlToPlain(sText));
|
bEmptyText = '' !== $.trim(editor.__plainUtils.htmlToPlain(sTextWithoutSignature));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!/\u0002\u0002/gm.test(sText))
|
if (!/\u0002\u0002/gm.test(sText))
|
||||||
|
|
|
||||||
7
vendors/ckeditor-plugins/signature/plugin.js
vendored
7
vendors/ckeditor-plugins/signature/plugin.js
vendored
|
|
@ -2,13 +2,16 @@
|
||||||
rl_signature_replacer = function (editor, sText, sSignature, bHtml, bInsertBefore)
|
rl_signature_replacer = function (editor, sText, sSignature, bHtml, bInsertBefore)
|
||||||
{
|
{
|
||||||
var
|
var
|
||||||
bEmptyText = '' === $.trim(sText),
|
sTextWithoutSignature = sText
|
||||||
|
.replace(/\u0002\u0002[\s\S]*\u0003\u0003/gm, '')
|
||||||
|
.replace(/\u0004\u0004[\s\S]*\u0005\u0005/gm, ''),
|
||||||
|
bEmptyText = '' === $.trim(sTextWithoutSignature),
|
||||||
sNewLine = (bHtml ? '<br />' : "\n")
|
sNewLine = (bHtml ? '<br />' : "\n")
|
||||||
;
|
;
|
||||||
|
|
||||||
if (!bEmptyText && bHtml)
|
if (!bEmptyText && bHtml)
|
||||||
{
|
{
|
||||||
bEmptyText = '' !== $.trim(editor.__plainUtils.htmlToPlain(sText));
|
bEmptyText = '' !== $.trim(editor.__plainUtils.htmlToPlain(sTextWithoutSignature));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!/\u0002\u0002/gm.test(sText))
|
if (!/\u0002\u0002/gm.test(sText))
|
||||||
|
|
|
||||||
2
vendors/rl/rl.js
vendored
2
vendors/rl/rl.js
vendored
|
|
@ -6,7 +6,7 @@
|
||||||
*/
|
*/
|
||||||
function CRLTopDriver() {}
|
function CRLTopDriver() {}
|
||||||
|
|
||||||
CRLTopDriver.prototype.s = window['sessionStorage'];
|
CRLTopDriver.prototype.s = window['sessionStorage'] || null;
|
||||||
|
|
||||||
CRLTopDriver.prototype.t = window['top'] || window;
|
CRLTopDriver.prototype.t = window['top'] || window;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue