From 14f101603ca0cce449cdf9f33500c2bf672123fb Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Mon, 11 Jun 2007 21:25:43 +0000 Subject: [PATCH] Monotone-Parent: ec34f69c125d8e9916f15c19dd058a1d131e2017 Monotone-Revision: 5a5a4085f8187ce57fba2427fcda4c0671ade644 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2007-06-11T21:25:43 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 8 ++++++++ UI/Scheduler/UIxAppointmentEditor.m | 15 ++++++++++++--- 2 files changed, 20 insertions(+), 3 deletions(-) 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