added attachment icon to message list

This commit is contained in:
Tankred Hase 2013-09-11 19:50:34 +02:00
parent 13b51bd926
commit 4bd757acde
3 changed files with 12 additions and 5 deletions

View File

@ -68,6 +68,12 @@
@include read-bubble-grey;
}
.icon-attachment {
float: right;
margin-top: 1.9em;
margin-right: 0.5em;
}
li {
background-color: white;
margin: 8px 0;

View File

@ -60,7 +60,7 @@ define(function(require) {
}
function createDummyMails(callback) {
var Email = function(unread) {
var Email = function(unread, attachments) {
this.uid = '1';
this.from = [{
name: 'Whiteout Support',
@ -69,9 +69,7 @@ define(function(require) {
this.to = [{
address: 'max.musterman@gmail.com'
}]; // list of receivers
this.cc = [{
address: 'hans.wurst@gmail.com'
}]; // list of receivers
this.attachments = attachments;
this.unread = unread;
this.displayDate = '23.08.13';
this.longDisplayDate = 'Wednesday, 23.08.2013 19:23';
@ -82,7 +80,7 @@ define(function(require) {
"Best regards\nYour whiteout team"; // plaintext body
};
var dummys = [new Email(true), new Email(true), new Email(false), new Email(false), new Email(false), new Email(false)];
var dummys = [new Email(true, true), new Email(true), new Email(false, true), new Email(false), new Email(false), new Email(false)];
callback(dummys);
}

View File

@ -13,6 +13,9 @@
<ul>
<li ng-repeat="email in emails" ng-class="{selected: email === selected}" ng-click="select(email)">
<div ng-class="{unread: email.unread, read: !email.unread}"></div>
<div ng-switch="email.attachments !== undefined">
<div ng-switch-when="true" class="icon-attachment"></div>
</div>
<p class="from">{{email.from[0].name}}</p>
<p class="subject-line">
<span class="subject">{{email.subject}}</span>