diff --git a/UI/Scheduler/UIxAppointmentEditor.m b/UI/Scheduler/UIxAppointmentEditor.m index fc9c7e39e..d32d35ffa 100644 --- a/UI/Scheduler/UIxAppointmentEditor.m +++ b/UI/Scheduler/UIxAppointmentEditor.m @@ -430,6 +430,7 @@ * * Save in [UIxComponentEditor setAttributes:] * + * @apiParam {String} [destinationCalendar] ID of destination calendar * @apiParam {Object} [organizer] Appointment organizer * @apiParam {String} organizer.name Organizer's name * @apiParam {String} organizer.email Organizer's email address diff --git a/UI/Scheduler/UIxComponentEditor.m b/UI/Scheduler/UIxComponentEditor.m index 9de1eb26f..f0cb47377 100644 --- a/UI/Scheduler/UIxComponentEditor.m +++ b/UI/Scheduler/UIxComponentEditor.m @@ -617,6 +617,8 @@ static NSArray *reminderValues = nil; NSCalendarDate *now; NSMutableDictionary *dataWithOwner; NSString *owner; + SOGoAppointmentFolders *folders; + id destinationCalendar; now = [NSCalendarDate calendarDate]; owner = [componentCalendar ownerInContext: context]; @@ -626,6 +628,17 @@ static NSArray *reminderValues = nil; [dataWithOwner setObject: owner forKey: @"owner"]; [component setAttributes: dataWithOwner inContext: context]; + destinationCalendar = [data objectForKey: @"destinationCalendar"]; + if ([destinationCalendar isKindOfClass: [NSString class]]) + { + folders = [[context activeUser] calendarsFolderInContext: context]; + componentCalendar = [folders lookupName: [destinationCalendar stringValue] + inContext: context + acquire: 0]; + [componentCalendar retain]; + + } + [self _handleOrganizer]; if ([[self clientObject] isNew]) diff --git a/UI/Templates/SchedulerUI/UIxAppointmentEditorTemplate.wox b/UI/Templates/SchedulerUI/UIxAppointmentEditorTemplate.wox index 88e2a7b91..adad9ff80 100644 --- a/UI/Templates/SchedulerUI/UIxAppointmentEditorTemplate.wox +++ b/UI/Templates/SchedulerUI/UIxAppointmentEditorTemplate.wox @@ -39,7 +39,7 @@