mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-09-07 00:17:03 +03:00
Remove signature trimming (fixed #62)
This commit is contained in:
parent
74ad0e2ca1
commit
b23551406e
4 changed files with 24 additions and 10 deletions
|
|
@ -565,10 +565,17 @@ PopupsComposeViewModel.prototype.onHide = function ()
|
||||||
kn.routeOn();
|
kn.routeOn();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} sSignature
|
||||||
|
* @param {string=} sFrom
|
||||||
|
* @return {string}
|
||||||
|
*/
|
||||||
PopupsComposeViewModel.prototype.convertSignature = function (sSignature, sFrom)
|
PopupsComposeViewModel.prototype.convertSignature = function (sSignature, sFrom)
|
||||||
{
|
{
|
||||||
if ('' !== sSignature)
|
if ('' !== sSignature)
|
||||||
{
|
{
|
||||||
|
sSignature = sSignature.replace(/[\r]/, '');
|
||||||
|
|
||||||
sFrom = Utils.pString(sFrom);
|
sFrom = Utils.pString(sFrom);
|
||||||
if ('' !== sFrom)
|
if ('' !== sFrom)
|
||||||
{
|
{
|
||||||
|
|
@ -576,10 +583,10 @@ PopupsComposeViewModel.prototype.convertSignature = function (sSignature, sFrom)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sSignature = sSignature.replace(/{{IF:FROM}}[\s\S]+{{\/IF:FROM}}/gm, '');
|
sSignature = sSignature.replace(/{{IF:FROM}}[\s\S]+{{\/IF:FROM}}[\n]?/gm, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
sSignature = "\r\n" + Utils.trim(sSignature.replace(/{{FROM}}/, '').replace(/{{IF:FROM}}/, '').replace(/{{\/IF:FROM}}/, ''));
|
sSignature = sSignature.replace(/{{FROM}}[\n]?/, '').replace(/{{IF:FROM}}[\n]?/, '').replace(/{{\/IF:FROM}}[\n]?/, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
return sSignature;
|
return sSignature;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "RainLoop",
|
"name": "RainLoop",
|
||||||
"title": "RainLoop Webmail",
|
"title": "RainLoop Webmail",
|
||||||
"version": "1.6.2",
|
"version": "1.6.2",
|
||||||
"release": "663",
|
"release": "664",
|
||||||
"description": "Simple, modern & fast web-based email client",
|
"description": "Simple, modern & fast web-based email client",
|
||||||
"homepage": "http://rainloop.net",
|
"homepage": "http://rainloop.net",
|
||||||
"main": "Gruntfile.js",
|
"main": "Gruntfile.js",
|
||||||
|
|
|
||||||
|
|
@ -8632,10 +8632,17 @@ PopupsComposeViewModel.prototype.onHide = function ()
|
||||||
kn.routeOn();
|
kn.routeOn();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {string} sSignature
|
||||||
|
* @param {string=} sFrom
|
||||||
|
* @return {string}
|
||||||
|
*/
|
||||||
PopupsComposeViewModel.prototype.convertSignature = function (sSignature, sFrom)
|
PopupsComposeViewModel.prototype.convertSignature = function (sSignature, sFrom)
|
||||||
{
|
{
|
||||||
if ('' !== sSignature)
|
if ('' !== sSignature)
|
||||||
{
|
{
|
||||||
|
sSignature = sSignature.replace(/[\r]/, '');
|
||||||
|
|
||||||
sFrom = Utils.pString(sFrom);
|
sFrom = Utils.pString(sFrom);
|
||||||
if ('' !== sFrom)
|
if ('' !== sFrom)
|
||||||
{
|
{
|
||||||
|
|
@ -8643,10 +8650,10 @@ PopupsComposeViewModel.prototype.convertSignature = function (sSignature, sFrom)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sSignature = sSignature.replace(/{{IF:FROM}}[\s\S]+{{\/IF:FROM}}/gm, '');
|
sSignature = sSignature.replace(/{{IF:FROM}}[\s\S]+{{\/IF:FROM}}[\n]?/gm, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
sSignature = "\r\n" + Utils.trim(sSignature.replace(/{{FROM}}/, '').replace(/{{IF:FROM}}/, '').replace(/{{\/IF:FROM}}/, ''));
|
sSignature = sSignature.replace(/{{FROM}}[\n]?/, '').replace(/{{IF:FROM}}[\n]?/, '').replace(/{{\/IF:FROM}}[\n]?/, '');
|
||||||
}
|
}
|
||||||
|
|
||||||
return sSignature;
|
return sSignature;
|
||||||
|
|
|
||||||
10
rainloop/v/0.0.0/static/js/app.min.js
vendored
10
rainloop/v/0.0.0/static/js/app.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue