From 3f12e72af01152213cbbaab6acd51b2b6249f86a Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Tue, 3 Oct 2006 16:12:32 +0000 Subject: [PATCH] Monotone-Parent: 4c1856e056f5a2d88369a3bd6c3054a5b479f549 Monotone-Revision: 0a40fd3ca846353b46531655128873c9575677fa Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-10-03T16:12:32 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 ++++++ UI/Contacts/UIxContactFoldersView.m | 22 ++++++++++++++++++---- 2 files changed, 24 insertions(+), 4 deletions(-) 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