mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-08-26 00:43:22 +00:00
applied comments
This commit is contained in:
@@ -13,6 +13,7 @@
|
|||||||
"Print" = "Print";
|
"Print" = "Print";
|
||||||
"Stop" = "Stop";
|
"Stop" = "Stop";
|
||||||
"Write" = "Write";
|
"Write" = "Write";
|
||||||
|
"Search" = "Search";
|
||||||
|
|
||||||
"Send" = "Send";
|
"Send" = "Send";
|
||||||
"Contacts" = "Contacts";
|
"Contacts" = "Contacts";
|
||||||
@@ -41,6 +42,7 @@
|
|||||||
"Attachment" = "Attachment";
|
"Attachment" = "Attachment";
|
||||||
"Unread" = "Unread";
|
"Unread" = "Unread";
|
||||||
"Flagged" = "Flagged";
|
"Flagged" = "Flagged";
|
||||||
|
"Search inbox" = "Search inbox";
|
||||||
|
|
||||||
/* Main Frame */
|
/* Main Frame */
|
||||||
|
|
||||||
@@ -94,8 +96,9 @@
|
|||||||
"To" = "To";
|
"To" = "To";
|
||||||
"Cc" = "Cc";
|
"Cc" = "Cc";
|
||||||
"Bcc" = "Bcc";
|
"Bcc" = "Bcc";
|
||||||
"Reply-To" = "Reply-To";
|
"Reply-To" = "Reply-To";
|
||||||
"Add address" = "Add address";
|
"Add address" = "Add address";
|
||||||
|
"Body" = "Body";
|
||||||
|
|
||||||
"Open" = "Open";
|
"Open" = "Open";
|
||||||
"Select All" = "Select All";
|
"Select All" = "Select All";
|
||||||
@@ -237,6 +240,17 @@
|
|||||||
"As Not Junk" = "As Not Junk";
|
"As Not Junk" = "As Not Junk";
|
||||||
"Run Junk Mail Controls" = "Run Junk Mail Controls";
|
"Run Junk Mail Controls" = "Run Junk Mail Controls";
|
||||||
|
|
||||||
|
"Search messages in" = "Search messages in";
|
||||||
|
"Search" = "Search";
|
||||||
|
"Search subfolders" = "Search subfolders";
|
||||||
|
"Match any of the following" = "Match any of the following";
|
||||||
|
"Match all of the following" = "Match all of the following";
|
||||||
|
"contains" = "contains";
|
||||||
|
"does not contain" = "does not contain";
|
||||||
|
"No matches found" = "No matches found";
|
||||||
|
"results found" = "results found";
|
||||||
|
"result found" = "result found";
|
||||||
|
|
||||||
/* Folder operations */
|
/* Folder operations */
|
||||||
"Name :" = "Name :";
|
"Name :" = "Name :";
|
||||||
"Enter the new name of your folder :"
|
"Enter the new name of your folder :"
|
||||||
|
|||||||
@@ -323,35 +323,20 @@
|
|||||||
return @"ARRIVAL";
|
return @"ARRIVAL";
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *) imap4SortKey
|
|
||||||
{
|
|
||||||
NSString *sort;
|
|
||||||
NSDictionary *urlParams, *sortingAttributes;
|
|
||||||
WORequest *request;
|
|
||||||
|
|
||||||
request = [context request];
|
|
||||||
urlParams = [[request contentAsString] objectFromJSONString];
|
|
||||||
sortingAttributes = [urlParams objectForKey:@"sortingAttributes"];
|
|
||||||
sort = [sortingAttributes objectForKey:@"sort"];
|
|
||||||
|
|
||||||
return [sort uppercaseString];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (NSString *) imap4SortOrdering
|
- (NSString *) imap4SortOrdering
|
||||||
{
|
{
|
||||||
NSString *sort;
|
WORequest *request;
|
||||||
NSString *module;
|
NSString *sort, *module;
|
||||||
NSMutableDictionary *moduleSettings;
|
NSMutableDictionary *moduleSettings;
|
||||||
NSDictionary *urlParams, *sortingAttributes;
|
NSDictionary *urlParams, *sortingAttributes;
|
||||||
WORequest *request;
|
|
||||||
BOOL asc;
|
|
||||||
SOGoUser *activeUser;
|
SOGoUser *activeUser;
|
||||||
SOGoUserSettings *us;
|
SOGoUserSettings *us;
|
||||||
|
BOOL asc;
|
||||||
|
|
||||||
sort = [self imap4SortKey];
|
|
||||||
request = [context request];
|
request = [context request];
|
||||||
urlParams = [[request contentAsString] objectFromJSONString];
|
urlParams = [[request contentAsString] objectFromJSONString];
|
||||||
sortingAttributes = [urlParams objectForKey:@"sortingAttributes"];
|
sortingAttributes = [urlParams objectForKey:@"sortingAttributes"];
|
||||||
|
sort = [[sortingAttributes objectForKey:@"sort"] uppercaseString];
|
||||||
asc = [[sortingAttributes objectForKey:@"asc"] boolValue];
|
asc = [[sortingAttributes objectForKey:@"asc"] boolValue];
|
||||||
|
|
||||||
activeUser = [context activeUser];
|
activeUser = [context activeUser];
|
||||||
@@ -409,14 +394,12 @@
|
|||||||
NSArray *filters;
|
NSArray *filters;
|
||||||
NSString *searchBy, *searchArgument, *searchInput, *searchString, *match;
|
NSString *searchBy, *searchArgument, *searchInput, *searchString, *match;
|
||||||
NSMutableArray *searchArray;
|
NSMutableArray *searchArray;
|
||||||
int nbFilters, i;
|
int nbFilters = 0, i;
|
||||||
|
|
||||||
request = [context request];
|
request = [context request];
|
||||||
content = [[request contentAsString] objectFromJSONString];
|
content = [[request contentAsString] objectFromJSONString];
|
||||||
qualifier = nil;
|
qualifier = nil;
|
||||||
searchString = nil;
|
searchString = nil;
|
||||||
nbFilters = 0;
|
|
||||||
searchArray = [[NSMutableArray alloc] init];
|
|
||||||
|
|
||||||
if ([content objectForKey:@"filters"])
|
if ([content objectForKey:@"filters"])
|
||||||
{
|
{
|
||||||
@@ -425,6 +408,7 @@
|
|||||||
nbFilters = [filters count];
|
nbFilters = [filters count];
|
||||||
match = [NSString stringWithString:[sortingAttributes objectForKey:@"match"]]; // AND, OR
|
match = [NSString stringWithString:[sortingAttributes objectForKey:@"match"]]; // AND, OR
|
||||||
|
|
||||||
|
searchArray = [NSMutableArray arrayWithCapacity:nbFilters];
|
||||||
for (i = 0; i < nbFilters; i++)
|
for (i = 0; i < nbFilters; i++)
|
||||||
{
|
{
|
||||||
searchBy = [NSString stringWithString:[[filters objectAtIndex:i] objectForKey:@"searchBy"]];
|
searchBy = [NSString stringWithString:[[filters objectAtIndex:i] objectForKey:@"searchBy"]];
|
||||||
@@ -443,17 +427,15 @@
|
|||||||
qualifier = [[EOOrQualifier alloc] initWithQualifierArray: searchArray];
|
qualifier = [[EOOrQualifier alloc] initWithQualifierArray: searchArray];
|
||||||
else
|
else
|
||||||
qualifier = [[EOAndQualifier alloc] initWithQualifierArray: searchArray];
|
qualifier = [[EOAndQualifier alloc] initWithQualifierArray: searchArray];
|
||||||
|
|
||||||
[searchArray release];
|
|
||||||
[qualifier autorelease];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return qualifier;
|
return qualifier;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSArray *) getSortedUIDsInFolder: (SOGoMailFolder *) mailFolder
|
- (NSArray *) getSortedUIDsInFolder: (SOGoMailFolder *) mailFolder
|
||||||
{
|
{
|
||||||
EOQualifier *qualifier, *fetchQualifier, *notDeleted;
|
EOQualifier *qualifier, *fetchQualifier, *notDeleted;
|
||||||
|
|
||||||
if (!sortedUIDs)
|
if (!sortedUIDs)
|
||||||
{
|
{
|
||||||
notDeleted = [EOQualifier qualifierWithQualifierFormat: @"(not (flags = %@))", @"deleted"];
|
notDeleted = [EOQualifier qualifierWithQualifierFormat: @"(not (flags = %@))", @"deleted"];
|
||||||
@@ -472,7 +454,7 @@
|
|||||||
|
|
||||||
[sortedUIDs retain];
|
[sortedUIDs retain];
|
||||||
}
|
}
|
||||||
|
|
||||||
return sortedUIDs;
|
return sortedUIDs;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -689,7 +671,7 @@
|
|||||||
|
|
||||||
- (id <WOActionResults>) getUIDsAction
|
- (id <WOActionResults>) getUIDsAction
|
||||||
{
|
{
|
||||||
NSDictionary *data;
|
NSDictionary *data, *requestContent;
|
||||||
NSString *noHeaders;
|
NSString *noHeaders;
|
||||||
SOGoMailFolder *folder;
|
SOGoMailFolder *folder;
|
||||||
WORequest *request;
|
WORequest *request;
|
||||||
@@ -697,12 +679,14 @@
|
|||||||
|
|
||||||
request = [context request];
|
request = [context request];
|
||||||
response = [context response];
|
response = [context response];
|
||||||
|
requestContent = [[request contentAsString] objectFromJSONString];
|
||||||
|
|
||||||
[response setHeader: @"text/plain; charset=utf-8"
|
[response setHeader: @"text/plain; charset=utf-8"
|
||||||
forKey: @"content-type"];
|
forKey: @"content-type"];
|
||||||
|
|
||||||
folder = [self clientObject];
|
folder = [self clientObject];
|
||||||
|
|
||||||
noHeaders = [request formValueForKey: @"no_headers"];
|
noHeaders = [[requestContent objectForKey: @"sortingAttributes"] objectForKey:@"no_headers"];
|
||||||
data = [self getUIDsInFolder: folder
|
data = [self getUIDsInFolder: folder
|
||||||
withHeaders: ([noHeaders length] == 0)];
|
withHeaders: ([noHeaders length] == 0)];
|
||||||
|
|
||||||
|
|||||||
+37
-63
@@ -32,87 +32,61 @@
|
|||||||
|
|
||||||
- (id) init
|
- (id) init
|
||||||
{
|
{
|
||||||
item = nil;
|
item = nil;
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) dealloc
|
- (void) dealloc
|
||||||
{
|
{
|
||||||
[item release];
|
[item release];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void) setItem: (NSString *) newItem
|
- (void) setItem: (NSString *) newItem
|
||||||
{
|
{
|
||||||
ASSIGN(item, newItem);
|
ASSIGN(item, newItem);
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *) item
|
- (NSString *) item
|
||||||
{
|
{
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSArray *) mailAccountsList
|
- (NSArray *) mailAccountsList
|
||||||
{
|
{
|
||||||
SOGoMailAccount *co, *accountFolder;
|
SOGoMailAccount *mAccount;
|
||||||
SOGoMailAccounts *accountsFolder;
|
SOGoMailAccounts *mAccounts;
|
||||||
SOGoUserFolder *userFolder;
|
NSString *userName, *option, *aString;
|
||||||
NSString *userName, *option, *lookup;
|
NSArray *accountFolders;
|
||||||
NSArray *folders;
|
NSMutableArray *mailboxes;
|
||||||
NSMutableArray *mailboxes;
|
NSDictionary *accountName;
|
||||||
NSDictionary *mailAccount;
|
int nbMailboxes, nbMailAccounts, i, j;
|
||||||
int nbMailboxes, nbMailAccounts, i, j;
|
|
||||||
|
|
||||||
|
|
||||||
userFolder = [[context activeUser] homeFolderInContext: context];
|
|
||||||
accountsFolder = [userFolder lookupName: @"Mail" inContext: context acquire: NO];
|
|
||||||
nbMailAccounts = [[accountsFolder mailAccounts] count];
|
|
||||||
|
|
||||||
mailboxes = [[NSMutableArray alloc] init];
|
// Number of accounts linked with the current user
|
||||||
for (i = 0; i < nbMailAccounts; i++)
|
mAccounts = [self clientObject];
|
||||||
{
|
nbMailAccounts = [[mAccounts mailAccounts] count];
|
||||||
mailAccount = [[[accountsFolder mailAccounts] objectAtIndex:i] objectForKey:@"name"]; // Keys on this account = (name, port, encryption, mailboxes, serverName, identities, userName)
|
|
||||||
userName = [[[accountsFolder mailAccounts] objectAtIndex:i] objectForKey:@"userName"];
|
|
||||||
lookup = [NSString stringWithFormat:@"%i", i];
|
|
||||||
accountFolder = [accountsFolder lookupName:lookup inContext: context acquire: NO];
|
|
||||||
folders = [accountFolder allFoldersMetadata];
|
|
||||||
nbMailboxes = [folders count];
|
|
||||||
[mailboxes addObject:mailAccount];
|
|
||||||
for (j = 0; j < nbMailboxes; j++)
|
|
||||||
{
|
|
||||||
option = [NSString stringWithFormat:@"%@%@", userName, [[folders objectAtIndex:j] objectForKey:@"displayName"]];
|
|
||||||
[mailboxes addObject:option];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return mailboxes;
|
|
||||||
[mailboxes release];
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
mailboxes = [[NSMutableArray alloc] init];
|
||||||
// The objective here is to return the parent view layout and select the print
|
for (i = 0; i < nbMailAccounts; i++)
|
||||||
// layout corresponding. Default print view: list view
|
{
|
||||||
/*
|
accountName = [[[mAccounts mailAccounts] objectAtIndex:i] objectForKey:@"name"]; // Keys on this account = (name, port, encryption, mailboxes, serverName, identities, userName)
|
||||||
- (NSString *) mailAccountSelected
|
userName = [[[mAccounts mailAccounts] objectAtIndex:i] objectForKey:@"userName"];
|
||||||
{
|
|
||||||
SOGoUser *activeUser;
|
aString = [NSString stringWithFormat:@"%i", i];
|
||||||
NSString *parentView;
|
mAccount = [mAccounts lookupName:aString inContext: context acquire: NO];
|
||||||
|
accountFolders = [mAccount allFoldersMetadata];
|
||||||
activeUser = [context activeUser];
|
|
||||||
us = [activeUser userSettings];
|
// Number of mailboxes inside the current account
|
||||||
parentView = [[us objectForKey:@"Calendar"] objectForKey:@"View" ];
|
nbMailboxes = [accountFolders count];
|
||||||
|
[mailboxes addObject:accountName];
|
||||||
if ([parentView isEqualToString:@"dayview"])
|
for (j = 0; j < nbMailboxes; j++)
|
||||||
return @"Daily";
|
{
|
||||||
|
option = [NSString stringWithFormat:@"%@%@", userName, [[accountFolders objectAtIndex:j] objectForKey:@"displayName"]];
|
||||||
else if ([parentView isEqualToString:@"weekview"])
|
[mailboxes addObject:option];
|
||||||
return @"Weekly";
|
}
|
||||||
|
}
|
||||||
else if ([parentView isEqualToString:@"multicolumndayview"])
|
return mailboxes;
|
||||||
return @"Multi-Columns";
|
[mailboxes release];
|
||||||
|
|
||||||
else
|
|
||||||
return @"LIST";
|
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
|
|
||||||
@end
|
@end
|
||||||
@@ -100,9 +100,9 @@ function searchMails() {
|
|||||||
var accountNumber = "/" + userNames.indexOf(accountUser);
|
var accountNumber = "/" + userNames.indexOf(accountUser);
|
||||||
|
|
||||||
var position = searchLocation.length;
|
var position = searchLocation.length;
|
||||||
var folderName = accountNumber + "/folder" + searchLocation[1];
|
var folderName = accountNumber + "/folder" + searchLocation[1].replace(" ", "_SP_");
|
||||||
for (i = 2; i < position; i++)
|
for (i = 2; i < position; i++)
|
||||||
folderName += accountNumber + "/folder" + searchLocation[i];
|
folderName += "/folder" + searchLocation[i];
|
||||||
|
|
||||||
var folderPath = optionsList[selectedIndex].innerText;
|
var folderPath = optionsList[selectedIndex].innerText;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user