1
0
mirror of https://github.com/moparisthebest/mail synced 2025-02-16 15:10:10 -05:00

add dummy mail generate again for design

This commit is contained in:
Tankred Hase 2013-09-05 11:53:14 +02:00
parent e93407f478
commit 0f8d72dbfb

View File

@ -11,7 +11,7 @@ define(function(require) {
$scope.selected = email;
};
fetchList(function(emails) {
createDummyMails(function(emails) {
$scope.emails = emails;
$scope.$apply();
});
@ -34,15 +34,40 @@ define(function(require) {
return;
}
emails.forEach(function(email) {
// set display date
email.displayDate = moment(email.sentDate).format('DD.MM.YY');
});
addDisplayDate(emails);
callback(emails);
});
});
}
function addDisplayDate(emails) {
emails.forEach(function(email) {
// set display date
email.displayDate = moment(email.sentDate).format('DD.MM.YY');
});
return emails;
}
function createDummyMails(callback) {
var Email = function(unread) {
this.from = [{
name: 'Whiteout Support',
address: 'support@whiteout.io'
}]; // sender address
this.to = [{
address: 'max.musterman@gmail.com'
}]; // list of receivers
this.unread = unread;
this.displayDate = '23.08.13';
this.subject = "Welcome Max"; // Subject line
this.body = "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy."; // plaintext body
};
var dummys = [new Email(true), new Email(true), new Email(false), new Email(false), new Email(false), new Email(false)];
callback(dummys);
}
return MessageListCtrl;
});