Monotone-Parent: 82c1108954dbd812828ef1b00b0345b524a062a7

Monotone-Revision: 1bc4da9c10aec9ded2d443f77aedb8ceeaaf7ce8

Monotone-Author: flachapelle@inverse.ca
Monotone-Date: 2008-08-18T22:45:59
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Francis Lachapelle
2008-08-18 22:45:59 +00:00
parent 5f2d61a0d7
commit 0bede69b36
10 changed files with 223 additions and 51 deletions
+31
View File
@@ -22,6 +22,8 @@
#include <math.h>
#import <Foundation/NSDictionary.h>
#import <NGObjWeb/SoObject.h>
#import <NGObjWeb/SoPermissions.h>
#import <NGObjWeb/SoSecurityManager.h>
@@ -36,6 +38,7 @@
#import <NGCards/iCalRecurrenceRule.h>
#import <SoObjects/SOGo/SOGoUser.h>
#import <SoObjects/SOGo/SOGoDateFormatter.h>
#import <SoObjects/SOGo/SOGoContentObject.h>
#import <SoObjects/Appointments/SOGoAppointmentFolder.h>
#import <SoObjects/Appointments/SOGoAppointmentsFolder.h>
@@ -267,6 +270,34 @@
return [self jsCloseWithRefreshMethod: @"refreshEventsAndDisplay()"];
}
- (id <WOActionResults>) viewAction
{
id <WOActionResults> result;
NSDictionary *data;
SOGoAppointmentFolder *co;
SOGoDateFormatter *dateFormatter;
SOGoUser *user;
result = [context response];
user = [context activeUser];
co = [self clientObject];
dateFormatter = [user dateFormatterInContext: context];
[self event];
data = [NSDictionary dictionaryWithObjectsAndKeys:
[dateFormatter formattedDate: [event startDate]], @"startDate",
[dateFormatter formattedTime: [event startDate]], @"startTime",
([event hasRecurrenceRules]?@"1":@"0"), @"isReccurent",
([event isAllDay]?@"1":@"0"), @"isAllDay",
[event summary], @"summary",
[event location], @"location",
[event comment], @"description",
nil];
[(WOResponse*)result appendContentString: [data jsonRepresentation]];
return result;
}
- (BOOL) shouldTakeValuesFromRequest: (WORequest *) request
inContext: (WOContext*) context
{