OpenPGP - part 2 - unstable (#53)

This commit is contained in:
RainLoop Team 2014-01-28 20:09:41 +04:00
parent d181974127
commit 0bb69d4494
23 changed files with 600 additions and 339 deletions

View file

@ -82,11 +82,16 @@ function MessageModel()
}, this);
this.body = null;
this.plainRaw = '';
this.isRtl = ko.observable(false);
this.isHtml = ko.observable(false);
this.hasImages = ko.observable(false);
this.attachments = ko.observableArray([]);
this.isPgpSigned = ko.observable(false);
this.isPgpEncrypted = ko.observable(false);
this.pgpSignature = ko.observable('');
this.priority = ko.observable(Enums.MessagePriority.Normal);
this.readReceipt = ko.observable('');
@ -253,6 +258,10 @@ MessageModel.prototype.clear = function ()
this.isHtml(false);
this.hasImages(false);
this.attachments([]);
this.isPgpSigned(false);
this.isPgpEncrypted(false);
this.pgpSignature('');
this.priority(Enums.MessagePriority.Normal);
this.readReceipt('');
@ -347,6 +356,13 @@ MessageModel.prototype.initUpdateByMessageJson = function (oJsonMessage)
this.sInReplyTo = oJsonMessage.InReplyTo;
this.sReferences = oJsonMessage.References;
if (Globals.bAllowOpenPGP)
{
this.isPgpSigned(!!oJsonMessage.PgpSigned);
this.isPgpEncrypted(!!oJsonMessage.PgpEncrypted);
this.pgpSignature(oJsonMessage.PgpSignature);
}
this.hasAttachments(!!oJsonMessage.HasAttachments);
this.attachmentsMainType(oJsonMessage.AttachmentsMainType);
@ -808,6 +824,10 @@ MessageModel.prototype.populateByMessageListItem = function (oMessage)
// this.hasImages(false);
// this.attachments([]);
// this.isPgpSigned(false);
// this.isPgpEncrypted(false);
// this.pgpSignature('');
this.priority(Enums.MessagePriority.Normal);
this.aDraftInfo = [];
this.sMessageId = '';