mirror of
https://github.com/moparisthebest/mail
synced 2024-11-26 10:52:17 -05:00
toggles unread/read when clicking the circle
This commit is contained in:
parent
76b4f0767e
commit
3817bdc0c0
@ -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();
|
||||
};
|
||||
|
||||
|
@ -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) ? '' : ''}}" ng-click="markUnread(email); $event.stopPropagation()"></div>
|
||||
<div class="flag" data-icon="{{(!email.unread && email.answered) ? '' : ''}}" ng-click="toggleUnread(email); $event.stopPropagation()"></div>
|
||||
<p class="subject">{{email.subject || 'No subject'}}</p>
|
||||
<time>{{email.sentDate | date:'mediumDate'}}</time>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user