Monotone-Parent: e028485fd0fd0bb51522ced58e9d11dd52dc844e
Monotone-Revision: bfdd8e3da1b7d0def1bb4ca50f7ac922cea2323a Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2006-10-03T22:07:56 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
39d3fec73f
commit
b035bb469a
|
@ -1,5 +1,9 @@
|
||||||
2006-10-03 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
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
|
* UI/Contacts/UIxContactsSelectionViewContainer.m: removed since
|
||||||
we now use the action mechanism in UIxContactsListView to keep the
|
we now use the action mechanism in UIxContactsListView to keep the
|
||||||
same view for the contact selectors and the regular contact view.
|
same view for the contact selectors and the regular contact view.
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
#import <Foundation/NSString.h>
|
#import <Foundation/NSString.h>
|
||||||
#import <SoObjects/Contacts/SOGoContactFolders.h>
|
#import <SoObjects/Contacts/SOGoContactFolders.h>
|
||||||
|
|
||||||
#import <SOGoUI/NSDictionary+URL.h>
|
#import <SOGo/NSString+URL.h>
|
||||||
|
|
||||||
#import "common.h"
|
#import "common.h"
|
||||||
|
|
||||||
|
@ -31,45 +31,34 @@
|
||||||
|
|
||||||
@implementation UIxContactFoldersView
|
@implementation UIxContactFoldersView
|
||||||
|
|
||||||
- (id) defaultAction
|
- (id) _selectActionForApplication: (NSString *) actionName
|
||||||
{
|
{
|
||||||
SOGoContactFolders *folders;
|
SOGoContactFolders *folders;
|
||||||
NSString *url;
|
NSString *url, *action;
|
||||||
|
WORequest *request;
|
||||||
|
|
||||||
folders = [self clientObject];
|
folders = [self clientObject];
|
||||||
url = [NSString stringWithFormat: @"%@/view%@",
|
action = [NSString stringWithFormat: @"../%@/%@",
|
||||||
[folders defaultSourceName],
|
[folders defaultSourceName],
|
||||||
[[self queryParameters] asURLParameters]];
|
actionName];
|
||||||
|
|
||||||
|
request = [[self context] request];
|
||||||
|
|
||||||
|
url = [[request uri] composeURLWithAction: action
|
||||||
|
parameters: [self queryParameters]
|
||||||
|
andHash: NO];
|
||||||
|
|
||||||
return [self redirectToLocation: url];
|
return [self redirectToLocation: url];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (id) defaultAction
|
||||||
|
{
|
||||||
|
return [self _selectActionForApplication: @"view"];
|
||||||
|
}
|
||||||
|
|
||||||
- (id) newAction
|
- (id) newAction
|
||||||
{
|
{
|
||||||
SOGoContactFolders *folders;
|
return [self _selectActionForApplication: @"new"];
|
||||||
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];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (id) selectForSchedulerAction
|
- (id) selectForSchedulerAction
|
||||||
|
|
Loading…
Reference in a new issue