diff --git a/ChangeLog b/ChangeLog index 6c0244f36..b2553e86a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2006-10-03 Wolfgang Sourdeau + * UI/Contacts/UIxContactFoldersView.m ([UIxContactFoldersView -defaultAction]) + ([UIxContactFoldersView -newAction]): invoke + _selectActionForApplication: on self with the proper attribute too. + * UI/Contacts/UIxContactsSelectionViewContainer.m: removed since we now use the action mechanism in UIxContactsListView to keep the same view for the contact selectors and the regular contact view. diff --git a/UI/Contacts/UIxContactFoldersView.m b/UI/Contacts/UIxContactFoldersView.m index 018ece737..7024c2837 100644 --- a/UI/Contacts/UIxContactFoldersView.m +++ b/UI/Contacts/UIxContactFoldersView.m @@ -23,7 +23,7 @@ #import #import -#import +#import #import "common.h" @@ -31,45 +31,34 @@ @implementation UIxContactFoldersView -- (id) defaultAction +- (id) _selectActionForApplication: (NSString *) actionName { SOGoContactFolders *folders; - NSString *url; + NSString *url, *action; + WORequest *request; folders = [self clientObject]; - url = [NSString stringWithFormat: @"%@/view%@", - [folders defaultSourceName], - [[self queryParameters] asURLParameters]]; + action = [NSString stringWithFormat: @"../%@/%@", + [folders defaultSourceName], + actionName]; + + request = [[self context] request]; + + url = [[request uri] composeURLWithAction: action + parameters: [self queryParameters] + andHash: NO]; return [self redirectToLocation: url]; } +- (id) defaultAction +{ + return [self _selectActionForApplication: @"view"]; +} + - (id) newAction { - SOGoContactFolders *folders; - NSString *url; - - folders = [self clientObject]; - url = [NSString stringWithFormat: @"%@/new%@", - [folders defaultSourceName], - [[self queryParameters] asURLParameters]]; - - return [self redirectToLocation: url]; -} - -- (id) _selectActionForApplication: (NSString *) actionName -{ - SOGoContactFolders *folders; - NSString *url, *selectorId; - - folders = [self clientObject]; - selectorId = [self queryParameterForKey: @"selectorId"]; - - url = [NSString stringWithFormat: @"%@/%@?selectorId=%@", - [folders defaultSourceName], - actionName, selectorId]; - - return [self redirectToLocation: url]; + return [self _selectActionForApplication: @"new"]; } - (id) selectForSchedulerAction