diff --git a/src/js/controller/mail-list.js b/src/js/controller/mail-list.js index 65979aa..a21dcae 100644 --- a/src/js/controller/mail-list.js +++ b/src/js/controller/mail-list.js @@ -143,7 +143,7 @@ define(function(require) { }; function createDummyMails(callback) { - var Email = function(unread, attachments, replied) { + var Email = function(unread, attachments, answered) { this.uid = '1'; this.from = [{ name: 'Whiteout Support', @@ -154,7 +154,7 @@ define(function(require) { }]; // list of receivers this.attachments = (attachments) ? [true] : undefined; this.unread = unread; - this.replied = replied; + this.answered = answered; this.sentDate = new Date('Thu Sep 19 2013 20:41:23 GMT+0200 (CEST)'); this.subject = "Welcome Max"; // Subject line this.body = "Hi Max,\n\n" + diff --git a/src/js/dao/email-dao.js b/src/js/dao/email-dao.js index 944d36a..d74e332 100644 --- a/src/js/dao/email-dao.js +++ b/src/js/dao/email-dao.js @@ -484,7 +484,13 @@ define(function(require) { return; } - emails.push(message); + // set gotten attributes like body to message object containing list meta data like 'unread' or 'replied' + messageItem.id = message.id; + messageItem.body = message.body; + messageItem.html = message.html; + messageItem.attachments = message.attachments; + + emails.push(messageItem); after(); }); }); diff --git a/src/tpl/mail-list.html b/src/tpl/mail-list.html index e00b545..e3405c2 100644 --- a/src/tpl/mail-list.html +++ b/src/tpl/mail-list.html @@ -4,7 +4,7 @@