From: znek Date: Mon, 16 Aug 2004 11:01:55 +0000 (+0000) Subject: fixed date/time fields X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=992336d3644cc857b0d4126649c7beacf49f67b2;p=scalable-opengroupware.org fixed date/time fields git-svn-id: http://svn.opengroupware.org/SOGo/trunk@252 d1b88da0-ebda-0310-925b-ed51d893ca5b --- diff --git a/SOGo/UI/Scheduler/ChangeLog b/SOGo/UI/Scheduler/ChangeLog index 81f93be1..ba1a65bb 100644 --- a/SOGo/UI/Scheduler/ChangeLog +++ b/SOGo/UI/Scheduler/ChangeLog @@ -1,3 +1,9 @@ +2004-08-16 Marcus Mueller + + * v0.9.58 + + * UIxAppointmentProposal.[wox,m]: fixed date/time fields. + 2004-08-16 Helge Hess * UIxAppointmentProposal: added duration popup (v0.9.57) diff --git a/SOGo/UI/Scheduler/UIxAppointmentProposal.m b/SOGo/UI/Scheduler/UIxAppointmentProposal.m index fb04a770..c4005ea7 100644 --- a/SOGo/UI/Scheduler/UIxAppointmentProposal.m +++ b/SOGo/UI/Scheduler/UIxAppointmentProposal.m @@ -28,8 +28,18 @@ id currentDay; /* individual values */ - NSCalendarDate *startDate; - NSCalendarDate *endDate; + id startDateHour; + id startDateMinute; + id startDateDay; + id startDateMonth; + id startDateYear; + + id endDateHour; + id endDateMinute; + id endDateDay; + id endDateMonth; + id endDateYear; + NSArray *participants; /* array of iCalPerson's */ NSArray *resources; /* array of iCalPerson's */ id duration; @@ -42,11 +52,21 @@ @implementation UIxAppointmentProposal - (void)dealloc { - [self->duration release]; - [self->startDate release]; - [self->endDate release]; - [self->participants release]; - [self->resources release]; + [self->startDateHour release]; + [self->startDateMinute release]; + [self->startDateDay release]; + [self->startDateMonth release]; + [self->startDateYear release]; + + [self->endDateHour release]; + [self->endDateMinute release]; + [self->endDateDay release]; + [self->endDateMonth release]; + [self->endDateYear release]; + [self->duration release]; + + [self->participants release]; + [self->resources release]; [super dealloc]; } @@ -67,17 +87,98 @@ return self->item; } +- (void)setStartDateHour:(id)_startDateHour { + ASSIGN(self->startDateHour, _startDateHour); +} +- (id)startDateHour { + return self->startDateHour; +} +- (void)setStartDateMinute:(id)_startDateMinute { + ASSIGN(self->startDateMinute, _startDateMinute); +} +- (id)startDateMinute { + return self->startDateMinute; +} +- (void)setStartDateDay:(id)_startDateDay { + ASSIGN(self->startDateDay, _startDateDay); +} +- (id)startDateDay { + return self->startDateDay; +} +- (void)setStartDateMonth:(id)_startDateMonth { + ASSIGN(self->startDateMonth, _startDateMonth); +} +- (id)startDateMonth { + return self->startDateMonth; +} +- (void)setStartDateYear:(id)_startDateYear { + ASSIGN(self->startDateYear, _startDateYear); +} +- (id)startDateYear { + return self->startDateYear; +} +- (void)setEndDateHour:(id)_endDateHour { + ASSIGN(self->endDateHour, _endDateHour); +} +- (id)endDateHour { + return self->endDateHour; +} +- (void)setEndDateMinute:(id)_endDateMinute { + ASSIGN(self->endDateMinute, _endDateMinute); +} +- (id)endDateMinute { + return self->endDateMinute; +} +- (void)setEndDateDay:(id)_endDateDay { + ASSIGN(self->endDateDay, _endDateDay); +} +- (id)endDateDay { + return self->endDateDay; +} +- (void)setEndDateMonth:(id)_endDateMonth { + ASSIGN(self->endDateMonth, _endDateMonth); +} +- (id)endDateMonth { + return self->endDateMonth; +} +- (void)setEndDateYear:(id)_endDateYear { + ASSIGN(self->endDateYear, _endDateYear); +} +- (id)endDateYear { + return self->endDateYear; +} + - (void)setStartDate:(NSCalendarDate *)_date { - ASSIGN(self->startDate, _date); + [self setStartDateHour:[NSNumber numberWithInt:[_date hourOfDay]]]; + [self setStartDateMinute:[NSNumber numberWithInt:[_date minuteOfHour]]]; + [self setStartDateDay:[NSNumber numberWithInt:[_date dayOfMonth]]]; + [self setStartDateMonth:[NSNumber numberWithInt:[_date monthOfYear]]]; + [self setStartDateYear:[NSNumber numberWithInt:[_date yearOfCommonEra]]]; } - (NSCalendarDate *)startDate { - return self->startDate; + return [NSCalendarDate dateWithYear:[[self startDateYear] intValue] + month:[[self startDateMonth] intValue] + day:[[self startDateDay] intValue] + hour:[[self startDateHour] intValue] + minute:[[self startDateMinute] intValue] + second:0 + timeZone:[self viewTimeZone]]; } - (void)setEndDate:(NSCalendarDate *)_date { - ASSIGN(self->endDate, _date); + [self setEndDateHour:[NSNumber numberWithInt:[_date hourOfDay]]]; + [self setEndDateMinute:[NSNumber numberWithInt:[_date minuteOfHour]]]; + [self setEndDateDay:[NSNumber numberWithInt:[_date dayOfMonth]]]; + [self setEndDateMonth:[NSNumber numberWithInt:[_date monthOfYear]]]; + [self setEndDateYear:[NSNumber numberWithInt:[_date yearOfCommonEra]]]; } - (NSCalendarDate *)endDate { - return self->endDate; + return [NSCalendarDate dateWithYear:[[self endDateYear] intValue] + month:[[self endDateMonth] intValue] + day:[[self endDateDay] intValue] + hour:[[self endDateHour] intValue] + minute:[[self endDateMinute] intValue] + second:59 + timeZone:[self viewTimeZone]]; } - (void)setDuration:(id)_duration { diff --git a/SOGo/UI/Scheduler/UIxAppointmentProposal.wox b/SOGo/UI/Scheduler/UIxAppointmentProposal.wox index b7ef0b5e..d392e9d9 100644 --- a/SOGo/UI/Scheduler/UIxAppointmentProposal.wox +++ b/SOGo/UI/Scheduler/UIxAppointmentProposal.wox @@ -51,7 +51,9 @@ @@ -65,7 +67,9 @@ @@ -81,8 +85,8 @@ @@ -94,8 +98,8 @@ diff --git a/SOGo/UI/Scheduler/Version b/SOGo/UI/Scheduler/Version index 5d43ba69..b6179f4b 100644 --- a/SOGo/UI/Scheduler/Version +++ b/SOGo/UI/Scheduler/Version @@ -1,6 +1,6 @@ # $Id$ -SUBMINOR_VERSION:=57 +SUBMINOR_VERSION:=58 # v0.9.41 requires libNGObjWeb v4.2.431 # v0.9.31 requires libWEExtensions v4.2.52