mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-22 03:45:25 +00:00
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:
@@ -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.
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -236,6 +236,11 @@
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailAccountsView";
|
||||
};
|
||||
compose = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailAccountsView";
|
||||
actionName = "compose";
|
||||
};
|
||||
getMail = {
|
||||
protectedBy = "View";
|
||||
pageName = "UIxMailAccountsView";
|
||||
|
||||
Reference in New Issue
Block a user