diff --git a/ChangeLog b/ChangeLog index 8c65fa5f8..18b3531ef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2007-08-21 Wolfgang Sourdeau + * UI/MailerUI/UIxMailMainFrame.m ([UIxMailMainFrame + -composeAction]): restored method since it is needed by the + address book. + * UI/MailerUI/UIxMailAccountActions.m ([UIxMailAccountActions -composeAction]): the address fields should be arrays and not simple strings. diff --git a/UI/MailerUI/UIxMailMainFrame.m b/UI/MailerUI/UIxMailMainFrame.m index 9ad78fb1e..687d85094 100644 --- a/UI/MailerUI/UIxMailMainFrame.m +++ b/UI/MailerUI/UIxMailMainFrame.m @@ -26,6 +26,7 @@ #import #import +#import #import #import #import @@ -90,4 +91,23 @@ return [u hasSuffix:@"/"] ? @"view" : @"#"; } +- (id ) composeAction +{ + NSArray *accounts; + NSString *firstAccount, *newLocation; + SOGoMailAccounts *co; + NSDictionary *formValues; + + co = [self clientObject]; + accounts = [[context activeUser] mailAccounts]; + firstAccount = [[accounts objectsForKey: @"name"] objectAtIndex: 0]; + formValues = [[context request] formValues]; + newLocation = [NSString stringWithFormat: @"%@/%@/compose%@", + [co baseURLInContext: context], + firstAccount, + [formValues asURLParameters]]; + + return [self redirectToLocation: newLocation]; +} + @end /* UIxMailMainFrame */ diff --git a/UI/MailerUI/product.plist b/UI/MailerUI/product.plist index 843c51c08..214330cc8 100644 --- a/UI/MailerUI/product.plist +++ b/UI/MailerUI/product.plist @@ -256,9 +256,10 @@ categories = { protectedBy = "View"; pageName = "UIxMailMainFrame"; }; - getMail = { + compose = { protectedBy = "View"; - pageName = "UIxMailAccountsView"; + pageName = "UIxMailMainFrame"; + actionName = "compose"; }; }; };