mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-02-24 18:56:24 +00:00
(feat) added replied/forwarded message status support + pimped UI a bit
This commit is contained in:
committed by
Francis Lachapelle
parent
8a74c9f9e0
commit
2d22c56efe
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright (C) 2006-2014 Inverse inc.
|
||||
Copyright (C) 2006-2015 Inverse inc.
|
||||
|
||||
This file is part of SOGo
|
||||
|
||||
@@ -269,11 +269,27 @@
|
||||
- (BOOL) isMessageFlagged
|
||||
{
|
||||
NSArray *flags;
|
||||
|
||||
|
||||
flags = [[self message] valueForKey: @"flags"];
|
||||
return [flags containsObject: @"flagged"];
|
||||
}
|
||||
|
||||
- (BOOL) isMessageAnswered
|
||||
{
|
||||
NSArray *flags;
|
||||
|
||||
flags = [[self message] valueForKey: @"flags"];
|
||||
return [flags containsObject: @"answered"];
|
||||
}
|
||||
|
||||
- (BOOL) isMessageForwarded
|
||||
{
|
||||
NSArray *flags;
|
||||
|
||||
flags = [[self message] valueForKey: @"flags"];
|
||||
return [flags containsObject: @"$forwarded"];
|
||||
}
|
||||
|
||||
- (NSString *) messageUidString
|
||||
{
|
||||
return [[[self message] valueForKey:@"uid"] stringValue];
|
||||
@@ -750,7 +766,7 @@
|
||||
msgsList = [[msgs objectForKey: @"fetch"] objectEnumerator];
|
||||
[self setMessage: [msgsList nextObject]];
|
||||
|
||||
msg = [NSMutableArray arrayWithObjects: @"To", @"hasAttachment", @"isFlagged", @"Subject", @"From", @"isRead", @"Priority", @"RelativeDate", @"Size", @"Flags", @"uid", nil];
|
||||
msg = [NSMutableArray arrayWithObjects: @"To", @"hasAttachment", @"isFlagged", @"Subject", @"From", @"isRead", @"Priority", @"RelativeDate", @"Size", @"Flags", @"uid", @"isAnswered", @"isForwarded", nil];
|
||||
[headers addObject: msg];
|
||||
while (message)
|
||||
{
|
||||
@@ -818,15 +834,23 @@
|
||||
|
||||
// Mail labels / tags
|
||||
tags = [NSMutableArray arrayWithArray: [message objectForKey: @"flags"]];
|
||||
[tags removeObject: @"answered"];
|
||||
[tags removeObject: @"deleted"];
|
||||
[tags removeObject: @"flaggged"];
|
||||
[tags removeObject: @"flagged"];
|
||||
[tags removeObject: @"recent"];
|
||||
[tags removeObject: @"seen"];
|
||||
[tags removeObject: @"$forwarded"];
|
||||
[msg addObject: tags];
|
||||
|
||||
// UID
|
||||
[msg addObject: [message objectForKey: @"uid"]];
|
||||
[headers addObject: msg];
|
||||
|
||||
// isAnswered
|
||||
[msg addObject: [NSNumber numberWithBool: [self isMessageAnswered]]];
|
||||
|
||||
// isForwarded
|
||||
[msg addObject: [NSNumber numberWithBool: [self isMessageForwarded]]];
|
||||
|
||||
[self setMessage: [msgsList nextObject]];
|
||||
}
|
||||
|
||||
@@ -76,6 +76,21 @@
|
||||
</label>
|
||||
<input type="text" name="subject" ng-model="message.editable.subject"/>
|
||||
</md-input-container>
|
||||
|
||||
<div layout="row" layout-align="center center" ng-hide="hidePriority">
|
||||
<span class="md-body-1">
|
||||
<var:string label:value="Priority"/>
|
||||
</span>
|
||||
<md-slider flex="flex"
|
||||
md-discrete="md-discrete"
|
||||
ng-model="message.editable.priority"
|
||||
step="1"
|
||||
min="1"
|
||||
max="5"
|
||||
aria-label="rating">
|
||||
<!-- priority -->
|
||||
</md-slider>
|
||||
</div>
|
||||
|
||||
<div class="pseudo-input-container" ng-hide="hideAttachments">
|
||||
<label class="pseudo-input-label">
|
||||
@@ -103,9 +118,16 @@
|
||||
<!-- TOOLBAR TO SHOW CC/BCC/ATTACHMENT FIELDS -->
|
||||
<div layout="column" layout-align="start end">
|
||||
<md-button class="iconButton" ng-show="hideCc" ng-click="hideCc = false">Cc</md-button>
|
||||
<md-button class="iconButton" ng-show="hideBcc" ng-click="hideBcc = false">Bcc</md-button>
|
||||
<md-button class="iconButton" ng-show="hideBcc"
|
||||
ng-click="hideBcc = false">Bcc</md-button>
|
||||
<md-button class="iconButton" ng-show="hidePriority" ng-click="hidePriority = false">
|
||||
<i class="md-icon-info-outline"><!-- show priority --></i>
|
||||
</md-button>
|
||||
<md-button class="iconButton" ng-show="hideAttachments" ng-click="hideAttachments = false">
|
||||
<i class="md-icon-attach-file"><!-- delete tag --></i>
|
||||
<i class="md-icon-attach-file"><!-- show attachment --></i>
|
||||
</md-button>
|
||||
<md-button class="iconButton" ng-click="returnReceipt = !returnReceipt">
|
||||
<i class="md-icon-receipt"><!-- return receipt --></i>
|
||||
</md-button>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -19,10 +19,12 @@
|
||||
ng-repeat="currentMessage in mailbox.$messages track by currentMessage.id"
|
||||
ng-class="{unread: !currentMessage.isread}">
|
||||
<md-item-content ui-sref-active="_selected" layout="row" class="md-flex">
|
||||
<div><sg-gravatar-image class="md-tile-left"
|
||||
email="{{currentMessage['from'][0].email}}"
|
||||
size="48"><!-- gravatar -->
|
||||
</sg-gravatar-image></div>
|
||||
<div>
|
||||
<sg-gravatar-image class="md-tile-left"
|
||||
email="{{currentMessage['from'][0].email}}"
|
||||
size="48"><!-- gravatar -->
|
||||
</sg-gravatar-image>
|
||||
</div>
|
||||
<div class="sg-tile-content">
|
||||
<a ui-sref="mail.account.mailbox.message({accountId: account.id, mailboxId: (mailbox.path | encodeUri), messageId: currentMessage.uid})">
|
||||
<div class="sg-md-subhead-multi subject">
|
||||
@@ -35,8 +37,9 @@
|
||||
</a>
|
||||
</div>
|
||||
<div class="sg-tile-icons">
|
||||
<!--<a><i class="md-icon-star"> </i></a>-->
|
||||
<i class="md-icon-flag" ng-show="currentMessage.isflagged"> </i>
|
||||
<i class="md-icon-star" ng-show="currentMessage.isflagged"> </i>
|
||||
<i class="md-icon-reply" ng-show="currentMessage.isanswered"> </i>
|
||||
<i class="md-icon-forward" ng-show="currentMessage.isforwarded"> </i>
|
||||
<i class="md-icon-attach-file disable" ng-show="currentMessage.hasattachment"> </i>
|
||||
</div>
|
||||
</md-item-content>
|
||||
|
||||
@@ -62,23 +62,30 @@
|
||||
<div class="sg-icon-bar--vertical">
|
||||
<!-- todo: Replace md-tooltip values by localizable string variable -->
|
||||
<md-button class="iconButton"
|
||||
ng-hide="message.isDraft"
|
||||
ui-sref="mail.account.mailbox.message.action({accountId: account.id, mailboxId: (mailbox.path | encodeUri), messageId: message.uid, actionName: 'reply'})"
|
||||
aria-label="reply">
|
||||
<md-tooltip md-direction="left"><var:string label:value="Reply to Sender Only"/></md-tooltip>
|
||||
<i class="md-icon-reply"><!-- reply --></i>
|
||||
</md-button>
|
||||
<md-button class="iconButton" aria-label="Reply All"
|
||||
ui-sref="mail.account.mailbox.message.action({accountId: account.id, mailboxId: (mailbox.path | encodeUri), messageId: message.uid, actionName: 'replyall'})"><i class="md-icon-reply-all"><!-- reply all --></i>
|
||||
ng-hide="message.isDraft"
|
||||
ui-sref="mail.account.mailbox.message.action({accountId: account.id, mailboxId: (mailbox.path | encodeUri), messageId: message.uid, actionName: 'replyall'})">
|
||||
<i class="md-icon-reply-all"><!-- reply all --></i>
|
||||
</md-button>
|
||||
<md-button class="iconButton" aria-label="Forward"
|
||||
ui-sref="mail.account.mailbox.message.action({accountId: account.id, mailboxId: (mailbox.path | encodeUri), messageId: message.uid, actionName: 'forward'})"><i class="md-icon-forward"><!-- forward --></i>
|
||||
ng-hide="message.isDraft"
|
||||
ui-sref="mail.account.mailbox.message.action({accountId: account.id, mailboxId: (mailbox.path | encodeUri), messageId: message.uid, actionName: 'forward'})">
|
||||
<i class="md-icon-forward"><!-- forward --></i>
|
||||
</md-button>
|
||||
<md-button class="iconButton" aria-label="Edit"
|
||||
ui-sref="mail.account.mailbox.message.edit({accountId: account.id, mailboxId: (mailbox.path | encodeUri), messageId: message.uid})"
|
||||
ng-show="message.isDraft"><i class="md-icon-create"><!-- edit --></i>
|
||||
ng-show="message.isDraft"
|
||||
ui-sref="mail.account.mailbox.message.edit({accountId: account.id, mailboxId: (mailbox.path | encodeUri), messageId: message.uid})">
|
||||
<i class="md-icon-create"><!-- edit --></i>
|
||||
</md-button>
|
||||
<md-button class="iconButton" aria-label="Delete"
|
||||
ng-click="doDelete(message)"><i class="md-icon-delete"><!-- delete --></i>
|
||||
ng-click="doDelete(message)">
|
||||
<i class="md-icon-delete"><!-- delete --></i>
|
||||
</md-button>
|
||||
<md-button class="iconButton" aria-label="Load Images"
|
||||
ng-show="message.$hasUnsafeContent"
|
||||
|
||||
Reference in New Issue
Block a user