diff --git a/SoObjects/Appointments/iCalRepeatableEntityObject+SOGo.m b/SoObjects/Appointments/iCalRepeatableEntityObject+SOGo.m index 7548471d7..4cd59a0b0 100644 --- a/SoObjects/Appointments/iCalRepeatableEntityObject+SOGo.m +++ b/SoObjects/Appointments/iCalRepeatableEntityObject+SOGo.m @@ -21,8 +21,10 @@ */ #import +#import #import #import +#import #import #import @@ -107,11 +109,19 @@ NSArray *ranges; NGCalendarDateRange *checkRange; NSCalendarDate *endDate; + NSTimeZone *tz; BOOL doesOccur; + signed daylightOffset; doesOccur = [self isRecurrent]; if (doesOccur) { + tz = [occurenceDate timeZone]; + if ([tz isDaylightSavingTimeForDate: occurenceDate] != [tz isDaylightSavingTimeForDate: [self startDate]]) { + daylightOffset = [tz secondsFromGMTForDate: occurenceDate] - [tz secondsFromGMTForDate: [self startDate]]; + occurenceDate = [occurenceDate dateByAddingYears: 0 months: 0 days: 0 hours: 0 minutes: 0 seconds: daylightOffset]; + } + endDate = [occurenceDate addTimeInterval: [self occurenceInterval]]; checkRange = [NGCalendarDateRange calendarDateRangeWithStartDate: occurenceDate endDate: endDate]; diff --git a/UI/Scheduler/UIxAppointmentEditor.m b/UI/Scheduler/UIxAppointmentEditor.m index 4e3311336..f782d193e 100644 --- a/UI/Scheduler/UIxAppointmentEditor.m +++ b/UI/Scheduler/UIxAppointmentEditor.m @@ -43,6 +43,7 @@ #import #import #import +#import #import @@ -270,6 +271,8 @@ { sm = [SoSecurityManager sharedSecurityManager]; + if ([co isKindOfClass: [SOGoAppointmentOccurence class]]) + co = [co container]; thisFolder = [co container]; if (componentCalendar != thisFolder) if (![sm validatePermission: SoPerm_DeleteObjects diff --git a/UI/WebServerResources/SchedulerUI.js b/UI/WebServerResources/SchedulerUI.js index 2863183af..17e35b46a 100644 --- a/UI/WebServerResources/SchedulerUI.js +++ b/UI/WebServerResources/SchedulerUI.js @@ -313,7 +313,10 @@ function _editRecurrenceDialog(eventDiv, method) { function onViewEvent(event) { if (event.detail == 2) return; - var url = ApplicationBaseURL + this.calendar + "/" + this.cname + "/view"; + var url = ApplicationBaseURL + this.calendar + "/" + this.cname; + if (typeof this.recurrenceTime != "undefined") + url += "/occurence" + this.recurrenceTime; + url += "/view"; if (document.viewEventAjaxRequest) { document.viewEventAjaxRequest.aborted = true; document.viewEventAjaxRequest.abort();