Monotone-Parent: c4b57bd1cf368f4918027a1afcabf6f86bae1404

Monotone-Revision: 70ab4ae0cde514bb9351f75f64a1d92afee561ec

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2006-08-03T21:34:19
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2006-08-03 21:34:19 +00:00
parent 9e0cdaabe0
commit d7601f5d27
3 changed files with 47 additions and 0 deletions
+11
View File
@@ -1,5 +1,16 @@
2006-08-03 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* UI/MailerUI/UIxMailAccountsView.m ([UIxMailAccountsView
-composeAction]): new action method that permits external object
to write a message from the default (primary) account.
* UI/Contacts/UIxContactEditorBase.m ([UIxContactEditorBase
-initSnapshot]): new method with code taken from "defaultAction"
but needed for others.
([UIxContactEditorBase -writeAction]): new action designed to
compose the correct URL needed to obtain the MailerUI's email
editor with the correct "mailto" parameter.
* UI/Common/UIxSortableTableHeader.m: moved from MailerUI to
Common so that other modules can use it.
+31
View File
@@ -20,6 +20,7 @@
*/
#include <SOGoUI/UIxComponent.h>
#include <SOGoUI/NSString+URL.h>
@interface UIxMailAccountsView : UIxComponent
{
@@ -54,4 +55,34 @@
return actionResult;
}
- (id) composeAction
{
NSArray *c;
NSString *inbox, *url, *parameter;
NSMutableDictionary *urlParams;
id actionResult;
c = [[self clientObject] toManyRelationshipKeys];
if ([c count] > 0)
{
urlParams = [NSMutableDictionary new];
[urlParams autorelease];
parameter = [self queryParameterForKey: @"mailto"];
if (parameter)
[urlParams setObject: parameter
forKey: @"mailto"];
inbox = [NSString stringWithFormat: @"%@/INBOX",
[c objectAtIndex: 0]];
url = [inbox composeURLWithAction: @"compose"
parameters: urlParams
andHash: NO];
actionResult = [self redirectToLocation: url];
}
else
actionResult = self;
return actionResult;
}
@end /* UIxMailAccountsView */
+5
View File
@@ -236,6 +236,11 @@
protectedBy = "View";
pageName = "UIxMailAccountsView";
};
compose = {
protectedBy = "View";
pageName = "UIxMailAccountsView";
actionName = "compose";
};
getMail = {
protectedBy = "View";
pageName = "UIxMailAccountsView";