Signature builder small changes

This commit is contained in:
RainLoop Team 2015-02-16 05:21:18 +04:00
parent 5584c5037f
commit 4c6fd9cdd1
6 changed files with 19 additions and 22 deletions

View file

@ -9,7 +9,6 @@
ko = require('ko'),
Enums = require('Common/Enums'),
Translator = require('Common/Translator'),
Links = require('Common/Links'),
AccountStore = require('Stores/User/Account'),
@ -26,14 +25,6 @@
this.accounts = AccountStore.accounts;
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.identityForDeletion = ko.observable(null).deleteAccessHelper();
}

View file

@ -1131,8 +1131,8 @@
'EMAIL': sFrom
});
sText = '<br />' + sReplyTitle + ':' +
'<blockquote><p>' + sText + '</p></blockquote>';
sText = '<br /><br />' + sReplyTitle + ':' +
'<blockquote><p>' + Utils.trim(sText) + '</p></blockquote>';
break;
@ -1146,7 +1146,7 @@
(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_SUBJECT') + ': ' + Utils.encodeHtml(sSubject) +
'<br /><br />' + sText;
'<br /><br />' + Utils.trim(sText) + '<br /><br />';
break;
case Enums.ComposeType.ForwardAsAttachment:
sText = '';

View file

@ -2,6 +2,8 @@
<div class="form-horizontal">
<div class="legend">
<span class="i18n" data-i18n-text="SETTINGS_ACCOUNTS/LEGEND_ACCOUNTS"></span>
&nbsp;&nbsp;&nbsp;
<i class="icon-spinner animated" style="margin-top: 5px" data-bind="visible: accounts.loading"></i>
</div>
</div>
<a class="btn" data-bind="click: addNewAccount">
@ -9,11 +11,9 @@
&nbsp;&nbsp;
<span class="i18n" data-i18n-text="SETTINGS_ACCOUNTS/BUTTON_ADD_ACCOUNT"></span>
</a>
<div class="process-place" data-bind="style: {'visibility': visibility }">
<i class="icon-spinner animated"></i>
&nbsp;&nbsp;
<span data-bind="text: processText"></span>
</div>
<br />
<br />
<br />
<table class="table table-hover list-table accounts-list" data-bind="i18nUpdate: accounts">
<colgroup>
<col />

View file

@ -2,13 +2,16 @@
rl_signature_replacer = function (editor, sText, sSignature, bHtml, bInsertBefore)
{
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")
;
if (!bEmptyText && bHtml)
{
bEmptyText = '' !== $.trim(editor.__plainUtils.htmlToPlain(sText));
bEmptyText = '' !== $.trim(editor.__plainUtils.htmlToPlain(sTextWithoutSignature));
}
if (!/\u0002\u0002/gm.test(sText))

View file

@ -2,13 +2,16 @@
rl_signature_replacer = function (editor, sText, sSignature, bHtml, bInsertBefore)
{
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")
;
if (!bEmptyText && bHtml)
{
bEmptyText = '' !== $.trim(editor.__plainUtils.htmlToPlain(sText));
bEmptyText = '' !== $.trim(editor.__plainUtils.htmlToPlain(sTextWithoutSignature));
}
if (!/\u0002\u0002/gm.test(sText))

2
vendors/rl/rl.js vendored
View file

@ -6,7 +6,7 @@
*/
function CRLTopDriver() {}
CRLTopDriver.prototype.s = window['sessionStorage'];
CRLTopDriver.prototype.s = window['sessionStorage'] || null;
CRLTopDriver.prototype.t = window['top'] || window;