Merge pull request #1112 from Rudloff/feature/unsubscribe

Add unsubscribe button
This commit is contained in:
RainLoop Team 2016-07-17 18:04:26 +03:00 committed by GitHub
commit c148e19ea3
9 changed files with 53 additions and 1 deletions

View file

@ -53,6 +53,7 @@ class MessageModel extends AbstractModel
this.bcc = [];
this.replyTo = [];
this.deliveredTo = [];
this.unsubsribeLinks = [];
this.newForAnimation = ko.observable(false);
@ -141,6 +142,7 @@ class MessageModel extends AbstractModel
this.bcc = [];
this.replyTo = [];
this.deliveredTo = [];
this.unsubsribeLinks = [];
this.newForAnimation(false);
@ -246,6 +248,7 @@ class MessageModel extends AbstractModel
this.bcc = emailArrayFromJson(json.Bcc);
this.replyTo = emailArrayFromJson(json.ReplyTo);
this.deliveredTo = emailArrayFromJson(json.DeliveredTo);
this.unsubsribeLinks = json.UnsubsribeLinks;
this.subject(json.Subject);
if (isArray(json.SubjectParts))
@ -716,6 +719,7 @@ class MessageModel extends AbstractModel
this.bcc = message.bcc;
this.replyTo = message.replyTo;
this.deliveredTo = message.deliveredTo;
this.unsubsribeLinks = message.unsubsribeLinks;
this.unseen(message.unseen());
this.flagged(message.flagged());

View file

@ -290,6 +290,7 @@ function MessageViewMailBoxUserView()
this.viewSize = ko.observable('');
this.viewLineAsCss = ko.observable('');
this.viewViewLink = ko.observable('');
this.viewUnsubscribeLink = ko.observable('');
this.viewDownloadLink = ko.observable('');
this.viewUserPic = ko.observable(Consts.DATA_IMAGE_USER_DOT_PIC);
this.viewUserPicVisible = ko.observable(false);
@ -374,6 +375,7 @@ function MessageViewMailBoxUserView()
this.viewSize(oMessage.friendlySize());
this.viewLineAsCss(oMessage.lineAsCss());
this.viewViewLink(oMessage.viewLink());
this.viewUnsubscribeLink(oMessage.unsubsribeLinks[0]);
this.viewDownloadLink(oMessage.downloadLink());
this.viewIsImportant(oMessage.isImportant());
this.viewIsFlagged(oMessage.flagged());