1
0
mirror of https://github.com/moparisthebest/mail synced 2024-11-29 20:32:15 -05:00

toggles unread/read when clicking the circle

This commit is contained in:
Felix Hammerl 2014-01-16 11:36:30 +01:00
parent 76b4f0767e
commit 3817bdc0c0
2 changed files with 4 additions and 4 deletions

View File

@ -81,10 +81,10 @@ define(function(require) {
};
/**
* Mark an email as unread
* Mark an email as unread or read, respectively
*/
$scope.markUnread = function(email) {
email.unread = true;
$scope.toggleUnread = function(email) {
email.unread = !email.unread;
$scope.synchronize();
};

View File

@ -13,7 +13,7 @@
<li ng-class="{'mail-list-active': email === state.mailList.selected, 'mail-list-attachment': email.attachments !== undefined && email.attachments.length > 0, 'mail-list-unread': email.unread, 'mail-list-replied': !email.unread && email.answered}" ng-click="select(email)" ng-repeat="email in state.nav.currentFolder.messages | orderBy:'uid':true | filter:searchText">
<h3>{{email.from[0].name || email.from[0].address}}</h3>
<div class="head">
<div class="flag" data-icon="{{(!email.unread && email.answered) ? '&#xe002;' : ''}}" ng-click="markUnread(email); $event.stopPropagation()"></div>
<div class="flag" data-icon="{{(!email.unread && email.answered) ? '&#xe002;' : ''}}" ng-click="toggleUnread(email); $event.stopPropagation()"></div>
<p class="subject">{{email.subject || 'No subject'}}</p>
<time>{{email.sentDate | date:'mediumDate'}}</time>
</div>