Monotone-Parent: 463195ab0268a4a769eab22f23b6aecf0c87ad79

Monotone-Revision: 9abbb51cbabcad645190865841814453369fa85f

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2007-11-18T10:16:25
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2007-11-18 10:16:25 +00:00
parent e3cdb8ecbf
commit 73bfada6bf
50 changed files with 1751 additions and 1265 deletions
+8 -22
View File
@@ -264,7 +264,7 @@
unsigned int minutes;
iCalRecurrenceRule *rule;
event = (iCalEvent *) [[self clientObject] component: NO];
event = (iCalEvent *) [[self clientObject] component: NO secure: YES];
if (event)
{
startDate = [event startDate];
@@ -352,16 +352,7 @@
- (id <WOActionResults>) saveAction
{
SOGoAppointmentObject *clientObject;
NSString *iCalString;
clientObject = [self clientObject];
NSLog(@"saveAction, clientObject = %@", clientObject);
iCalString = [[clientObject calendar: NO] versitString];
NSLog(@"saveAction, iCalString = %@", iCalString);
[clientObject saveContentString: iCalString];
[[self clientObject] saveComponent: event];
return [self jsCloseWithRefreshMethod: @"refreshEventsAndDisplay()"];
}
@@ -385,7 +376,7 @@
iCalRecurrenceRule *rule;
clientObject = [self clientObject];
event = (iCalEvent *) [clientObject component: YES];
event = (iCalEvent *) [clientObject component: YES secure: NO];
[super takeValuesFromRequest: _rq inContext: _ctx];
@@ -443,23 +434,18 @@
// TODO: add tentatively
- (id) acceptOrDeclineAction: (BOOL) accept
- (id) acceptAction
{
[[self clientObject] changeParticipationStatus: (accept
? @"ACCEPTED"
: @"DECLINED")];
[[self clientObject] changeParticipationStatus: @"ACCEPTED"];
return self;
}
- (id) acceptAction
{
return [self acceptOrDeclineAction: YES];
}
- (id) declineAction
{
return [self acceptOrDeclineAction: NO];
[[self clientObject] changeParticipationStatus: @"DECLINED"];
return self;
}
@end
+12 -21
View File
@@ -41,6 +41,7 @@
#import <NGExtensions/NSObject+Logs.h>
#import <NGExtensions/NSString+misc.h>
#import <SoObjects/Appointments/iCalPerson+SOGo.h>
#import <SoObjects/Appointments/SOGoAppointmentFolder.h>
#import <SoObjects/Appointments/SOGoAppointmentFolders.h>
#import <SoObjects/Appointments/SOGoAppointmentObject.h>
@@ -245,6 +246,16 @@
return url;
}
- (BOOL) hasOrganizer
{
return (![organizer isVoid]);
}
- (NSString *) organizerName
{
return [organizer mailAddress];
}
- (void) setAttendeesNames: (NSString *) newAttendeesNames
{
ASSIGN (attendeesNames, newAttendeesNames);
@@ -694,29 +705,8 @@
respondsToSelector: @selector(saveContentString:)];
}
- (BOOL) containsConflict: (id) _component
{
[self subclassResponsibility: _cmd];
return NO;
}
/* access */
#if 0
- (iCalPerson *) getOrganizer
{
iCalPerson *p;
NSString *emailProp;
emailProp = [@"MAILTO:" stringByAppendingString:[self emailForUser]];
p = [[[iCalPerson alloc] init] autorelease];
[p setEmail:emailProp];
[p setCn:[self cnForUser]];
return p;
}
#endif
- (BOOL) isMyComponent
{
return ([[context activeUser] hasEmail: [organizer rfc822Email]]);
@@ -845,6 +835,7 @@
[currentAttendee setCn: [names objectAtIndex: count]];
[currentAttendee setEmail: currentEmail];
[currentAttendee setRole: @"REQ-PARTICIPANT"];
[currentAttendee setRsvp: @"TRUE"];
[currentAttendee
setParticipationStatus: iCalPersonPartStatNeedsAction];
}
+17 -10
View File
@@ -282,7 +282,7 @@
NSString *duration;
unsigned int minutes;
todo = (iCalToDo *) [[self clientObject] component: NO];
todo = (iCalToDo *) [[self clientObject] component: NO secure: YES];
if (todo)
{
startDate = [todo startDate];
@@ -345,16 +345,23 @@
- (id <WOActionResults>) saveAction
{
SOGoTaskObject *clientObject;
NSString *iCalString;
clientObject = [self clientObject];
iCalString = [[clientObject calendar: NO] versitString];
[clientObject saveContentString: iCalString];
[[self clientObject] saveComponent: todo];
return [self jsCloseWithRefreshMethod: @"refreshTasks()"];
}
// - (id <WOActionResults>) saveAction
// {
// SOGoTaskObject *clientObject;
// NSString *iCalString;
// clientObject = [self clientObject];
// iCalString = [[clientObject calendar: NO secure: NO] versitString];
// [clientObject saveContentString: iCalString];
// return [self jsCloseWithRefreshMethod: @"refreshTasks()"];
// }
- (BOOL) shouldTakeValuesFromRequest: (WORequest *) request
inContext: (WOContext*) context
{
@@ -372,7 +379,7 @@
SOGoTaskObject *clientObject;
clientObject = [self clientObject];
todo = (iCalToDo *) [clientObject component: YES];
todo = (iCalToDo *) [clientObject component: YES secure: NO];
[super takeValuesFromRequest: _rq inContext: _ctx];
@@ -428,7 +435,7 @@
NSString *newStatus, *iCalString;
clientObject = [self clientObject];
todo = (iCalToDo *) [clientObject component: NO];
todo = (iCalToDo *) [clientObject component: NO secure: NO];
if (todo)
{
newStatus = [self queryParameterForKey: @"status"];
@@ -441,7 +448,7 @@
[todo setStatus: @"IN-PROCESS"];
}
iCalString = [[clientObject calendar: NO] versitString];
iCalString = [[clientObject calendar: NO secure: NO] versitString];
[clientObject saveContentString: iCalString];
}