Improve Mail module

- JSONinfied mail folder create and delete actions
- restored sgFolderTree directive
- extended folder types with "shared" and "otherUsers"
- added mailbox creation at the account level
This commit is contained in:
Francis Lachapelle
2014-12-18 15:22:29 -05:00
parent 7237052526
commit 494a809276
8 changed files with 137 additions and 74 deletions
+9 -4
View File
@@ -187,6 +187,7 @@
NGImap4Connection *connection;
NSException *error;
NSURL *srcURL, *destURL;
NSDictionary *jsonResponse;
NSMutableDictionary *moduleSettings, *threadsCollapsed;
NSString *currentMailbox, *currentAccount, *keyForMsgUIDs;
@@ -202,8 +203,10 @@
error = [connection moveMailboxAtURL: srcURL toURL: destURL];
if (error)
{
response = [self responseWithStatus: 500];
[response appendContentString: @"Unable to move folder."];
jsonResponse = [NSDictionary dictionaryWithObject: [self labelForKey: @"Unable to move folder."]
forKey: @"error"];
response = [self responseWithStatus: 500
andString: [jsonResponse jsonRepresentation]];
}
else
{
@@ -232,8 +235,10 @@
}
else
{
response = [self responseWithStatus: 500];
[response appendContentString: @"Unable to move folder."];
jsonResponse = [NSDictionary dictionaryWithObject: [self labelForKey: @"Unable to move folder."]
forKey: @"error"];
response = [self responseWithStatus: 500
andString: [jsonResponse jsonRepresentation]];
}
return response;