"Edit as New" functionality (close #39)

This commit is contained in:
RainLoop Team
2014-01-18 01:36:01 +04:00
parent b0593b813e
commit 6ecb7006f8
22 changed files with 67 additions and 11 deletions

View File

@@ -714,6 +714,19 @@ PopupsComposeViewModel.prototype.onShow = function (sType, oMessageOrArray, aToE
this.subject(sSubject);
this.prepearMessageAttachments(oMessage, sComposeType);
this.aDraftInfo = Utils.isNonEmptyArray(aDraftInfo) && 3 === aDraftInfo.length ? aDraftInfo : null;
this.sInReplyTo = oMessage.sInReplyTo;
this.sReferences = oMessage.sReferences;
break;
case Enums.ComposeType.EditAsNew:
this.to(fEmailArrayToStringLineHelper(oMessage.to));
this.cc(fEmailArrayToStringLineHelper(oMessage.cc));
this.bcc(fEmailArrayToStringLineHelper(oMessage.bcc));
this.subject(sSubject);
this.prepearMessageAttachments(oMessage, sComposeType);
this.aDraftInfo = Utils.isNonEmptyArray(aDraftInfo) && 3 === aDraftInfo.length ? aDraftInfo : null;
this.sInReplyTo = oMessage.sInReplyTo;
this.sReferences = oMessage.sReferences;
@@ -754,7 +767,8 @@ PopupsComposeViewModel.prototype.onShow = function (sType, oMessageOrArray, aToE
break;
}
if (bSignatureToAll && '' !== sSignature)
if (bSignatureToAll && '' !== sSignature &&
Enums.ComposeType.EditAsNew !== sComposeType)
{
sText = Utils.convertPlainTextToHtml(this.convertSignature(sSignature,
fEmailArrayToStringLineHelper(oMessage.from, true))) + '<br />' + sText;
@@ -1312,6 +1326,7 @@ PopupsComposeViewModel.prototype.prepearMessageAttachments = function (oMessage,
case Enums.ComposeType.Forward:
case Enums.ComposeType.Draft:
case Enums.ComposeType.EditAsNew:
bAdd = true;
break;
}