diff --git a/ChangeLog b/ChangeLog index 18a80e335..3cd5f5ca1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2007-06-11 Wolfgang Sourdeau + + * UI/Scheduler/UIxAppointmentEditor.m ([UIxAppointmentEditor + -isAllDay]): returns YES if the "hm" url parameter is set to + "allday". + ([UIxAppointmentEditor -defaultAction]): if isAllDay, the enddate + is displayed one day earlier. + 2007-06-07 Wolfgang Sourdeau * UI/Scheduler/UIxCalListingActions.m ([UIxCalListingActions diff --git a/UI/Scheduler/UIxAppointmentEditor.m b/UI/Scheduler/UIxAppointmentEditor.m index 1725abe45..365cab4e3 100644 --- a/UI/Scheduler/UIxAppointmentEditor.m +++ b/UI/Scheduler/UIxAppointmentEditor.m @@ -69,7 +69,12 @@ /* icalendar values */ - (BOOL) isAllDay { - return isAllDay; + NSString *hm; + + hm = [self queryParameterForKey: @"hm"]; + + return (isAllDay + || (hm && [hm isEqualToString: @"allday"])); } - (void) setIsAllDay: (BOOL) newIsAllDay @@ -249,7 +254,11 @@ if (event) { startDate = [event startDate]; - endDate = [event endDate]; + isAllDay = [event isAllDay]; + if (isAllDay) + endDate = [[event endDate] dateByAddingYears: 0 months: 0 days: -1]; + else + endDate = [event endDate]; } else { @@ -304,7 +313,7 @@ iCalString = [[clientObject calendar: NO] versitString]; [clientObject saveContentString: iCalString]; - return [self jsCloseWithRefreshMethod: @"refreshAppointmentsAndDisplay()"]; + return [self jsCloseWithRefreshMethod: @"refreshEventsAndDisplay()"]; } - (BOOL) shouldTakeValuesFromRequest: (WORequest *) request