Monotone-Parent: e028485fd0fd0bb51522ced58e9d11dd52dc844e
Monotone-Revision: bfdd8e3da1b7d0def1bb4ca50f7ac922cea2323a Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-10-03T22:07:56 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
39d3fec73f
commit
b035bb469a
|
@ -1,5 +1,9 @@
|
|||
2006-10-03 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* 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.
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#import <Foundation/NSString.h>
|
||||
#import <SoObjects/Contacts/SOGoContactFolders.h>
|
||||
|
||||
#import <SOGoUI/NSDictionary+URL.h>
|
||||
#import <SOGo/NSString+URL.h>
|
||||
|
||||
#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
|
||||
|
|
Loading…
Reference in New Issue