diff --git a/ChangeLog b/ChangeLog index aef80aabd..a9263849c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2006-10-03 Wolfgang Sourdeau + * UI/Contacts/UIxContactFoldersView.m ([UIxContactFoldersView + -defaultAction]): keep the url parameters when redirecting. + ([UIxContactFoldersView -selectForSchedulerAction]) + ([UIxContactFoldersView -selectForMailerAction]): new action + methods for the /scheduler-contacts and /mailer-contacts invocations. + * SoObjects/SOGo/SOGoObject.m: compose the action url using the newly available NSString+URL category. diff --git a/UI/Contacts/UIxContactFoldersView.m b/UI/Contacts/UIxContactFoldersView.m index 36c73f9f8..018ece737 100644 --- a/UI/Contacts/UIxContactFoldersView.m +++ b/UI/Contacts/UIxContactFoldersView.m @@ -34,10 +34,14 @@ - (id) defaultAction { SOGoContactFolders *folders; + NSString *url; folders = [self clientObject]; + url = [NSString stringWithFormat: @"%@/view%@", + [folders defaultSourceName], + [[self queryParameters] asURLParameters]]; - return [self redirectToLocation: [folders defaultSourceName]]; + return [self redirectToLocation: url]; } - (id) newAction @@ -53,7 +57,7 @@ return [self redirectToLocation: url]; } -- (id) selectAction +- (id) _selectActionForApplication: (NSString *) actionName { SOGoContactFolders *folders; NSString *url, *selectorId; @@ -61,11 +65,21 @@ folders = [self clientObject]; selectorId = [self queryParameterForKey: @"selectorId"]; - url = [NSString stringWithFormat: @"%@/select?selectorId=%@", + url = [NSString stringWithFormat: @"%@/%@?selectorId=%@", [folders defaultSourceName], - selectorId]; + actionName, selectorId]; return [self redirectToLocation: url]; } +- (id) selectForSchedulerAction +{ + return [self _selectActionForApplication: @"scheduler-contacts"]; +} + +- (id) selectForMailerAction +{ + return [self _selectActionForApplication: @"mailer-contacts"]; +} + @end