mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-11-23 15:32:37 +00:00
Merge branch 'master' into feature/addMissingStrings2
Conflicts: UI/AdministrationUI/English.lproj/Localizable.strings UI/PreferencesUI/English.lproj/Localizable.strings UI/Templates/PreferencesUI/UIxFilterEditor.wox
This commit is contained in:
commit
9b0a2c5fae
390 files changed
+57470
-27697
No files matched your search
@@ -65,6 +65,9 @@
|
||||
"Account: " = "Account: ";
|
||||
"Shared Account: " = "Shared Account: ";
|
||||
|
||||
/* Empty right pane */
|
||||
"No message selected" = "No message selected";
|
||||
|
||||
/* acls */
|
||||
"Access rights to" = "Access rights to";
|
||||
"For user" = "For user";
|
||||
@@ -228,6 +231,9 @@
|
||||
"Delete Message" = "Delete Message";
|
||||
"Delete Selected Messages" = "Delete Selected Messages";
|
||||
|
||||
/* Number of selected messages in list */
|
||||
"selected" = "selected";
|
||||
|
||||
"This Folder" = "This Folder";
|
||||
|
||||
/* Label popup menu */
|
||||
|
||||
@@ -639,6 +639,7 @@ static NSArray *infoKeys = nil;
|
||||
|
||||
co = [self clientObject];
|
||||
[co fetchInfo];
|
||||
[co setIsHTML: isHTML];
|
||||
|
||||
if ([[mimeType type] isEqualToString: @"multipart"])
|
||||
{
|
||||
@@ -648,7 +649,6 @@ static NSArray *infoKeys = nil;
|
||||
{
|
||||
info = [self infoFromRequest];
|
||||
[co setHeaders: info];
|
||||
[co setIsHTML: isHTML];
|
||||
[co setText: (isHTML ? [NSString stringWithFormat: @"<html>%@</html>", text] : text)];;
|
||||
error = [co storeInfo];
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
newKeyForMsgUIDs = [[NSString stringWithFormat:@"/%@/folder%@", currentAccount, newFolderName] asCSSIdentifier];
|
||||
newKeyForMsgUIDs = [NSString stringWithFormat:@"/%@/folder%@", [currentAccount asCSSIdentifier], [newFolderName asCSSIdentifier]];
|
||||
error = [co renameTo: newFolderName];
|
||||
if (error)
|
||||
{
|
||||
@@ -451,7 +451,7 @@
|
||||
NSMutableDictionary *moduleSettings, *threadsCollapsed;
|
||||
NSMutableArray *mailboxThreadsCollapsed;
|
||||
NSString *destinationFolder;
|
||||
SOGoUserSettings *us;
|
||||
SOGoUserSettings *us=nil;
|
||||
WOResponse *response;
|
||||
NSDictionary *data;
|
||||
SOGoMailFolder *co;
|
||||
@@ -739,6 +739,7 @@
|
||||
NSDictionary *content, *result;
|
||||
BOOL addOrRemove;
|
||||
NGImap4Client *client;
|
||||
id flag;
|
||||
|
||||
int i;
|
||||
|
||||
@@ -751,7 +752,13 @@
|
||||
|
||||
// We unescape our flags
|
||||
for (i = [flags count]-1; i >= 0; i--)
|
||||
[flags replaceObjectAtIndex: i withObject: [[flags objectAtIndex: i] fromCSSIdentifier]];
|
||||
{
|
||||
flag = [flags objectAtIndex: i];
|
||||
if ([flag isKindOfClass: [NSString class]])
|
||||
[flags replaceObjectAtIndex: i withObject: [flag fromCSSIdentifier]];
|
||||
else
|
||||
[flags removeObjectAtIndex: i];
|
||||
}
|
||||
|
||||
co = [self clientObject];
|
||||
client = [[co imap4Connection] client];
|
||||
|
||||
@@ -164,13 +164,15 @@
|
||||
//
|
||||
// Sometimes, the MUAs don't send over the string in () so we ignore it.
|
||||
//
|
||||
- (NSString *) messagePriority
|
||||
- (NSDictionary *) messagePriority
|
||||
{
|
||||
NSString *result;
|
||||
NSUInteger priority;
|
||||
NSString *description;
|
||||
NSData *data;
|
||||
|
||||
data = [message objectForKey: @"header"];
|
||||
result = @"";
|
||||
priority = 3;
|
||||
description = [self labelForKey: @"normal" inContext: context];
|
||||
|
||||
if (data)
|
||||
{
|
||||
@@ -191,15 +193,34 @@
|
||||
s = [[s substringFromIndex: r.location+1]
|
||||
stringByTrimmingCharactersInSet: [NSCharacterSet whitespaceAndNewlineCharacterSet]];
|
||||
|
||||
if ([s hasPrefix: @"1"]) result = [self labelForKey: @"highest" inContext: context];
|
||||
else if ([s hasPrefix: @"2"]) result = [self labelForKey: @"high" inContext: context];
|
||||
else if ([s hasPrefix: @"4"]) result = [self labelForKey: @"low" inContext: context];
|
||||
else if ([s hasPrefix: @"5"]) result = [self labelForKey: @"lowest" inContext: context];
|
||||
if ([s hasPrefix: @"1"])
|
||||
{
|
||||
priority = 1;
|
||||
description = [self labelForKey: @"highest" inContext: context];
|
||||
}
|
||||
else if ([s hasPrefix: @"2"])
|
||||
{
|
||||
priority = 2;
|
||||
description = [self labelForKey: @"high" inContext: context];
|
||||
}
|
||||
else if ([s hasPrefix: @"4"])
|
||||
{
|
||||
priority = 4;
|
||||
description = [self labelForKey: @"low" inContext: context];
|
||||
}
|
||||
else if ([s hasPrefix: @"5"])
|
||||
{
|
||||
priority = 5;
|
||||
description = [self labelForKey: @"lowest" inContext: context];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
return [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
[NSNumber numberWithInt: priority], @"level",
|
||||
description, @"name",
|
||||
nil];
|
||||
}
|
||||
|
||||
- (NSString *) messageSubject
|
||||
@@ -623,11 +644,12 @@
|
||||
- (NSDictionary *) getUIDsInFolder: (SOGoMailFolder *) folder
|
||||
withHeaders: (BOOL) includeHeaders
|
||||
{
|
||||
NSMutableDictionary *data;
|
||||
NSArray *uids, *threadedUids, *headers;
|
||||
NSRange r;
|
||||
NSMutableDictionary *data;
|
||||
SOGoMailAccount *account;
|
||||
id quota;
|
||||
|
||||
NSRange r;
|
||||
int count;
|
||||
|
||||
data = [NSMutableDictionary dictionary];
|
||||
@@ -645,10 +667,14 @@
|
||||
if (includeHeaders)
|
||||
{
|
||||
// Also retrieve the first headers, up to 'headersPrefetchMaxSize'
|
||||
count = [[uids flattenedArray] count];
|
||||
if (count > headersPrefetchMaxSize) count = headersPrefetchMaxSize;
|
||||
NSArray *a;
|
||||
|
||||
a = [uids flattenedArray];
|
||||
count = [a count];
|
||||
if (count > headersPrefetchMaxSize)
|
||||
count = headersPrefetchMaxSize;
|
||||
r = NSMakeRange(0, count);
|
||||
headers = [self getHeadersForUIDs: [[uids flattenedArray] subarrayWithRange: r]
|
||||
headers = [self getHeadersForUIDs: [a subarrayWithRange: r]
|
||||
inFolder: folder];
|
||||
|
||||
[data setObject: headers forKey: @"headers"];
|
||||
@@ -717,6 +743,8 @@
|
||||
* @apiSuccess (Success 200) {String} headers.From.email Sender's email address
|
||||
* @apiSuccess (Success 200) {Number} headers.isRead 1 if message is read
|
||||
* @apiSuccess (Success 200) {String} headers.Priority Priority
|
||||
* @apiSuccess (Success 200) {String} headers.Priority.level Priority number
|
||||
* @apiSuccess (Success 200) {String} headers.Priority.name Priority description
|
||||
* @apiSuccess (Success 200) {String} headers.RelativeDate Message date relative to now
|
||||
* @apiSuccess (Success 200) {String} headers.Size Formatted message size
|
||||
* @apiSuccess (Success 200) {String[]} headers.Flags Flags, such as "answered" and "seen"
|
||||
@@ -745,7 +773,6 @@
|
||||
noHeaders = [[[requestContent objectForKey: @"sortingAttributes"] objectForKey:@"noHeaders"] boolValue];
|
||||
data = [self getUIDsInFolder: folder
|
||||
withHeaders: !noHeaders];
|
||||
|
||||
[response appendContentString: [data jsonRepresentation]];
|
||||
|
||||
return response;
|
||||
@@ -879,7 +906,7 @@
|
||||
data = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
@"No UID specified", @"error", nil];
|
||||
return [self responseWithStatus: 404 /* Not Found */
|
||||
andString: [data jsonRepresentation]];
|
||||
andString: [data jsonRepresentation]];
|
||||
}
|
||||
|
||||
uids = [data objectForKey: @"uids"];
|
||||
|
||||
@@ -87,6 +87,11 @@
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSString *) modulePath
|
||||
{
|
||||
return @"Mail";
|
||||
}
|
||||
|
||||
- (void) _setupContext
|
||||
{
|
||||
SOGoUser *activeUser;
|
||||
@@ -118,6 +123,18 @@
|
||||
return [accounts jsonRepresentation];
|
||||
}
|
||||
|
||||
- (WOResponse *) mailAccountsAction
|
||||
{
|
||||
WOResponse *response;
|
||||
NSString *s;
|
||||
|
||||
s = [self mailAccounts];
|
||||
response = [self responseWithStatus: 200
|
||||
andString: s];
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
- (NSString *) userNames
|
||||
{
|
||||
NSArray *accounts, *userNames;
|
||||
@@ -311,12 +328,17 @@
|
||||
|
||||
- (WOResponse *) getFoldersStateAction
|
||||
{
|
||||
NSString *expandedFolders;
|
||||
id o;
|
||||
NSArray *expandedFolders;
|
||||
|
||||
[self _setupContext];
|
||||
expandedFolders = [moduleSettings objectForKey: @"ExpandedFolders"];
|
||||
o = [moduleSettings objectForKey: @"ExpandedFolders"];
|
||||
if ([o isKindOfClass: [NSString class]])
|
||||
expandedFolders = [o componentsSeparatedByString: @","];
|
||||
else
|
||||
expandedFolders = o;
|
||||
|
||||
return [self responseWithStatus: 200 andString: expandedFolders];
|
||||
return [self responseWithStatus: 200 andJSONRepresentation: expandedFolders];
|
||||
}
|
||||
|
||||
- (NSString *) verticalDragHandleStyle
|
||||
@@ -374,14 +396,14 @@
|
||||
- (WOResponse *) saveFoldersStateAction
|
||||
{
|
||||
WORequest *request;
|
||||
NSString *expandedFolders;
|
||||
NSArray *expandedFolders;
|
||||
|
||||
[self _setupContext];
|
||||
request = [context request];
|
||||
expandedFolders = [request formValueForKey: @"expandedFolders"];
|
||||
expandedFolders = [[request contentAsString] objectFromJSONString];
|
||||
|
||||
[moduleSettings setObject: expandedFolders
|
||||
forKey: @"ExpandedFolders"];
|
||||
forKey: @"ExpandedFolders"];
|
||||
|
||||
[us synchronize];
|
||||
|
||||
@@ -603,7 +625,7 @@
|
||||
|
||||
- (NSString *) columnsDisplayCount
|
||||
{
|
||||
return [NSString stringWithFormat: @"%d", [[self columnsDisplayOrder] count]];
|
||||
return [NSString stringWithFormat: @"%d", (int)[[self columnsDisplayOrder] count]];
|
||||
}
|
||||
|
||||
- (void) setCurrentColumn: (NSDictionary *) newCurrentColumn
|
||||
@@ -709,8 +731,8 @@
|
||||
|
||||
for (k = 0; k < [pathComponents count]; k++)
|
||||
{
|
||||
component = [NSString stringWithFormat: @"folder%@", [pathComponents objectAtIndex: k]];
|
||||
[path appendString: [component asCSSIdentifier]];
|
||||
component = [[pathComponents objectAtIndex: k] asCSSIdentifier];
|
||||
[path appendString: [NSString stringWithFormat: @"folder%@", component]];
|
||||
if (k < [pathComponents count] - 1)
|
||||
[path appendString: @"/"];
|
||||
}
|
||||
|
||||
@@ -57,6 +57,7 @@
|
||||
#import <Mailer/SOGoMailFolder.h>
|
||||
#import <MailPartViewers/UIxMailRenderingContext.h> // cyclic
|
||||
#import <MailPartViewers/UIxMailSizeFormatter.h>
|
||||
#import <MailPartViewers/UIxMailPartViewer.h>
|
||||
|
||||
#import "WOContext+UIxMailer.h"
|
||||
#import "UIxMailFormatter.h"
|
||||
@@ -229,7 +230,7 @@ static NSString *mailETag = nil;
|
||||
|
||||
- (id <WOActionResults>) defaultAction
|
||||
{
|
||||
id <WOActionResults> response;
|
||||
WOResponse *response;
|
||||
NSString *s;
|
||||
NSMutableDictionary *data;
|
||||
NSArray *addresses;
|
||||
|
||||
@@ -342,10 +342,19 @@
|
||||
actionClass = "UIxMailMainFrame";
|
||||
actionName = "unseenCount";
|
||||
};
|
||||
mailAccounts = {
|
||||
protectedBy = "View";
|
||||
actionClass = "UIxMailMainFrame";
|
||||
actionName = "mailAccounts";
|
||||
};
|
||||
// viewerTemplate = {
|
||||
// protectedBy = "View";
|
||||
// pageName = "UIxMailViewTemplate";
|
||||
// };
|
||||
UIxMailPopupView = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailPopupView";
|
||||
};
|
||||
UIxMailEditor = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailEditor";
|
||||
|
||||
Reference in new issue
Block a user