From 8e52a5b318b51121dc64c43dc5d4e628d1df5cee Mon Sep 17 00:00:00 2001 From: helge Date: Sun, 15 Aug 2004 14:55:58 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/trunk@224 d1b88da0-ebda-0310-925b-ed51d893ca5b --- SOGo/UI/Scheduler/ChangeLog | 8 + SOGo/UI/Scheduler/UIxAppointmentEditor.m | 17 +- SOGo/UI/Scheduler/UIxAppointmentProposal.m | 43 ++++ SOGo/UI/Scheduler/UIxAppointmentProposal.wox | 199 +++---------------- SOGo/UI/Scheduler/Version | 2 +- 5 files changed, 90 insertions(+), 179 deletions(-) diff --git a/SOGo/UI/Scheduler/ChangeLog b/SOGo/UI/Scheduler/ChangeLog index 78c3f490..cf61cebf 100644 --- a/SOGo/UI/Scheduler/ChangeLog +++ b/SOGo/UI/Scheduler/ChangeLog @@ -1,3 +1,11 @@ +2004-08-15 Helge Hess + + * v0.9.42 + + * UIxAppointmentEditor.m: minor cleanups + + * UIxAppointmentProposal.wox: made mockup code dynamic + 2004-08-15 Marcus Mueller * v0.9.41 diff --git a/SOGo/UI/Scheduler/UIxAppointmentEditor.m b/SOGo/UI/Scheduler/UIxAppointmentEditor.m index c5f73e5d..83853c86 100644 --- a/SOGo/UI/Scheduler/UIxAppointmentEditor.m +++ b/SOGo/UI/Scheduler/UIxAppointmentEditor.m @@ -61,11 +61,11 @@ - (NSString *)icalString; // TODO: this is in NGiCal @end -@interface NSObject (AppointmentHack) +@interface NSObject(AppointmentHack) - (BOOL)isAppointment; @end -@implementation NSObject (AppointmentHack) +@implementation NSObject(AppointmentHack) - (BOOL)isAppointment { return [self isKindOfClass:NSClassFromString(@"SOGoAppointmentObject")]; } @@ -348,7 +348,7 @@ - (id)saveAction { SOGoAppointment *apt; NSString *iCalString; - NSString *summary, *location, *uri; + NSString *uri; NSCalendarDate *sd, *ed; NSArray *attendees; WORequest *req; @@ -385,16 +385,13 @@ [apt setStartDate:sd]; [apt setEndDate:ed]; - summary = [req formValueForKey:@"summary"]; - [apt setSummary:summary]; - location = [req formValueForKey:@"location"]; - [apt setLocation:location]; - - [apt removeAllAttendees]; /* clean up */ + [apt setSummary:[req formValueForKey:@"summary"]]; + [apt setLocation:[req formValueForKey:@"location"]]; + attendees = [self getICalPersonsFromFormValues: [req formValuesForKey:@"participants"] treatAsResource:NO]; - [apt appendAttendees:attendees]; + [apt setAttendees:attendees]; attendees = [self getICalPersonsFromFormValues: [req formValuesForKey:@"resources"] treatAsResource:YES]; diff --git a/SOGo/UI/Scheduler/UIxAppointmentProposal.m b/SOGo/UI/Scheduler/UIxAppointmentProposal.m index a1ea38c0..9e7c86ac 100644 --- a/SOGo/UI/Scheduler/UIxAppointmentProposal.m +++ b/SOGo/UI/Scheduler/UIxAppointmentProposal.m @@ -24,6 +24,8 @@ @interface UIxAppointmentProposal : UIxComponent { + id item; + id currentDay; } @end @@ -31,4 +33,45 @@ #include "common.h" @implementation UIxAppointmentProposal + +/* notifications */ + +- (void)sleep { + [self->currentDay release]; self->currentDay = nil; + [self->item release]; self->item = nil; + [super sleep]; +} + +/* accessors */ + +- (void)setItem:(id)_item { + ASSIGN(self->item, _item); +} +- (id)item { + return self->item; +} + +- (void)setCurrentDay:(id)_day { + ASSIGN(self->currentDay, _day); +} +- (id)currentDay { + return self->currentDay; +} + +- (NSArray *)hours { + // TODO: from 'earliest start' to 'latest endtime' + unsigned lStartHour = 9, lEndHour = 17, i; + NSMutableArray *ma; + + ma = [NSMutableArray arrayWithCapacity:lEndHour - lStartHour + 2]; + for (i = lStartHour; i <= lEndHour; i++) + [ma addObject:[NSNumber numberWithInt:i]]; + return ma; +} + +- (NSArray *)days { + // TODO: from startdate to enddate + return [NSArray arrayWithObjects:@"2004-08-15", nil]; +} + @end /* UIxAppointmentProposal */ diff --git a/SOGo/UI/Scheduler/UIxAppointmentProposal.wox b/SOGo/UI/Scheduler/UIxAppointmentProposal.wox index f2ff902c..3e94adf2 100644 --- a/SOGo/UI/Scheduler/UIxAppointmentProposal.wox +++ b/SOGo/UI/Scheduler/UIxAppointmentProposal.wox @@ -135,178 +135,41 @@ - - - 9 - - - 10 - - - 11 - - - 12 - - - 13 - - - 14 - - - 15 - - - 16 - - - 17 - + + + + + - - 00 - - - 30 - - - 00 - - - 30 - - - 00 - - - 30 - - - 00 - - - 30 - - - 00 - - - 30 - - - 00 - - - 30 - - - 00 - - - 30 - - - 00 - - - 30 - - - 00 - - - + + 00 + + + 30 - - - - - 2004-08-15 - - - new - - - new - - - new - - - new - - - new - - - new - - - new - - - new - - - new - - - new - - - new - - - new - - - new - - - new - - - new - - - new - - - new - - + + + + + + + + + + new + + + + + diff --git a/SOGo/UI/Scheduler/Version b/SOGo/UI/Scheduler/Version index ca2e7269..26001ebe 100644 --- a/SOGo/UI/Scheduler/Version +++ b/SOGo/UI/Scheduler/Version @@ -1,6 +1,6 @@ # $Id$ -SUBMINOR_VERSION:=41 +SUBMINOR_VERSION:=42 # v0.9.41 requires libNGObjWeb v4.2.431 # v0.9.31 requires libWEExtensions v4.2.52 -- 2.39.5