From: helge Date: Mon, 16 Aug 2004 10:03:52 +0000 (+0000) Subject: git-svn-id: http://svn.opengroupware.org/SOGo/trunk@251 d1b88da0-ebda-0310-925b-ed51d... X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5bc5607e3cdc46a294396c5797bb767b865dac05;p=scalable-opengroupware.org git-svn-id: http://svn.opengroupware.org/SOGo/trunk@251 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/SOGo/UI/Scheduler/ChangeLog b/SOGo/UI/Scheduler/ChangeLog index 270023d2..81f93be1 100644 --- a/SOGo/UI/Scheduler/ChangeLog +++ b/SOGo/UI/Scheduler/ChangeLog @@ -1,3 +1,7 @@ +2004-08-16 Helge Hess + + * UIxAppointmentProposal: added duration popup (v0.9.57) + 2004-08-16 Marcus Mueller * v0.9.56 diff --git a/SOGo/UI/Scheduler/UIxAppointmentProposal.m b/SOGo/UI/Scheduler/UIxAppointmentProposal.m index ca55acb1..fb04a770 100644 --- a/SOGo/UI/Scheduler/UIxAppointmentProposal.m +++ b/SOGo/UI/Scheduler/UIxAppointmentProposal.m @@ -32,6 +32,7 @@ NSCalendarDate *endDate; NSArray *participants; /* array of iCalPerson's */ NSArray *resources; /* array of iCalPerson's */ + id duration; } @end @@ -41,6 +42,7 @@ @implementation UIxAppointmentProposal - (void)dealloc { + [self->duration release]; [self->startDate release]; [self->endDate release]; [self->participants release]; @@ -78,6 +80,30 @@ return self->endDate; } +- (void)setDuration:(id)_duration { + ASSIGN(self->duration, _duration); +} +- (id)duration { + return self->duration; +} +- (int)durationInMinutes { + return [[self duration] intValue]; +} +- (NSTimeInterval)durationAsTimeInterval { + return [self durationInMinutes] * 60; +} + +- (NSString *)itemDurationText { + // TODO: use a formatter + switch ([[self item] intValue]) { + case 30: return @"30 minutes"; + case 60: return @"1 hour"; + case 120: return @"2 hours"; + default: + return [NSString stringWithFormat:@"%@ minutes", [self item]]; + } +} + - (void)setParticipants:(NSArray *)_parts { ASSIGN(self->participants, _parts); } @@ -124,6 +150,11 @@ return [NSArray arrayWithObjects:@"2004-08-15", nil]; } +- (NSArray *)durationSteps { + // TODO: make configurable + return [NSArray arrayWithObjects:@"30", @"60", @"120", nil]; +} + /* slots */ - (BOOL)isFirstHalfGreen { diff --git a/SOGo/UI/Scheduler/UIxAppointmentProposal.wox b/SOGo/UI/Scheduler/UIxAppointmentProposal.wox index 493c9875..b7ef0b5e 100644 --- a/SOGo/UI/Scheduler/UIxAppointmentProposal.wox +++ b/SOGo/UI/Scheduler/UIxAppointmentProposal.wox @@ -105,7 +105,9 @@ : - duration popup here + diff --git a/SOGo/UI/Scheduler/Version b/SOGo/UI/Scheduler/Version index 30fb2be9..5d43ba69 100644 --- a/SOGo/UI/Scheduler/Version +++ b/SOGo/UI/Scheduler/Version @@ -1,6 +1,6 @@ # $Id$ -SUBMINOR_VERSION:=56 +SUBMINOR_VERSION:=57 # v0.9.41 requires libNGObjWeb v4.2.431 # v0.9.31 requires libWEExtensions v4.2.52