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

@ -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;