From 3830a112b81948b7fa46a85ddc259496ab80f75d Mon Sep 17 00:00:00 2001 From: wolfgang Date: Thu, 4 Jan 2007 22:35:40 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1009 d1b88da0-ebda-0310-925b-ed51d893ca5b --- ChangeLog | 8 ++++++++ .../Appointments/SOGoAptMailNotification.m | 2 +- SoObjects/SOGo/SOGoObject.m | 1 + SoObjects/SOGo/SOGoUserFolder.m | 5 +++++ UI/Scheduler/English.lproj/Localizable.strings | 2 ++ UI/Scheduler/French.lproj/Localizable.strings | 2 ++ UI/Scheduler/UIxComponentEditor.m | 4 +++- UI/Templates/UIxPageFrame.wox | 4 ++-- UI/WebServerResources/SchedulerUI.js | 18 +++++++++++++++++- UI/WebServerResources/generic.css | 13 +++++++------ 10 files changed, 48 insertions(+), 11 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8763230a..342b26bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2007-01-04 Wolfgang Sourdeau + * UI/Scheduler/UIxComponentEditor.m ([UIxComponentEditor + -newStartDate]): fix the handling of the component start date + depending on the "hm" and the "day" parameters. + + * SoObjects/SOGo/SOGoUserFolder.m ([SOGoUserFolder + -roleOfUser:uidinContext:context]): set role of current user to + "Assistant" if the object that is accessed is "freebusy.ifb". + * SoObjects/Appointments/SOGoAppointmentFolder.m ([SOGoAppointmentFolder -lookupCalendarFolderForUID:uid]): method moved from UI/Scheduler/UIxCalView:calendarFolderForUID:. diff --git a/SoObjects/Appointments/SOGoAptMailNotification.m b/SoObjects/Appointments/SOGoAptMailNotification.m index bba1ef46..98a9d74b 100644 --- a/SoObjects/Appointments/SOGoAptMailNotification.m +++ b/SoObjects/Appointments/SOGoAptMailNotification.m @@ -82,7 +82,7 @@ static NSTimeZone *EST = nil; NSString *aptUID; aptUID = [[self newApt] uid]; - return [NSString stringWithFormat:@"%@/Calendar/%@/view?tab=participants", + return [NSString stringWithFormat:@"%@/Calendar/%@/edit?mail-invitation=yes", [self homePageURL], aptUID]; } diff --git a/SoObjects/SOGo/SOGoObject.m b/SoObjects/SOGo/SOGoObject.m index ca66dff6..cf8f8843 100644 --- a/SoObjects/SOGo/SOGoObject.m +++ b/SoObjects/SOGo/SOGoObject.m @@ -97,6 +97,7 @@ return davPermissions; } + - (NSArray *) DAVPermissionsForRole: (NSString *) role { return [self DAVPermissionsForRoles: [NSArray arrayWithObject: role]]; diff --git a/SoObjects/SOGo/SOGoUserFolder.m b/SoObjects/SOGo/SOGoUserFolder.m index 85b08492..5f4cb3a3 100644 --- a/SoObjects/SOGo/SOGoUserFolder.m +++ b/SoObjects/SOGo/SOGoUserFolder.m @@ -181,6 +181,9 @@ return obj; } +/* FIXME: here is a vault of hackish ways to gain access to subobjects by + granting ro access to the homepage depending on the subobject in question. + This is wrong and dangerous. */ - (NSString *) roleOfUser: (NSString *) uid inContext: (WOContext *) context { @@ -204,6 +207,8 @@ || [roles containsObject: SOGoRole_Delegate]) role = SOGoRole_Assistant; } + else if ([objectName isEqualToString: @"freebusy.ifb"]) + role = SOGoRole_Assistant; } return role; diff --git a/UI/Scheduler/English.lproj/Localizable.strings b/UI/Scheduler/English.lproj/Localizable.strings index 73a973c3..b0a25c0f 100644 --- a/UI/Scheduler/English.lproj/Localizable.strings +++ b/UI/Scheduler/English.lproj/Localizable.strings @@ -301,3 +301,5 @@ validate_endbeforestart = "Enddate is before startdate!"; "Next slot" = "Next slot"; "Previous hour" = "Previous hour"; "Next hour" = "Next hour"; + +"closeThisWindowMessage" = "Thank you! You may now close this window."; diff --git a/UI/Scheduler/French.lproj/Localizable.strings b/UI/Scheduler/French.lproj/Localizable.strings index a3da6c64..6f24256c 100644 --- a/UI/Scheduler/French.lproj/Localizable.strings +++ b/UI/Scheduler/French.lproj/Localizable.strings @@ -317,3 +317,5 @@ validate_endbeforestart = "La date de fin est avant la date de début !"; "Next slot" = "Période suivante"; "Previous hour" = "Heure précédente"; "Next hour" = "Heure suivante"; + +"closeThisWindowMessage" = "Merci! Vous pouvez maintenant fermer cette fenêtre."; diff --git a/UI/Scheduler/UIxComponentEditor.m b/UI/Scheduler/UIxComponentEditor.m index 689053f6..2b958f1a 100644 --- a/UI/Scheduler/UIxComponentEditor.m +++ b/UI/Scheduler/UIxComponentEditor.m @@ -604,7 +604,7 @@ { now = [NSCalendarDate calendarDate]; [now setTimeZone: [[self clientObject] userTimeZone]]; - if (!([[now hour: 8 minute: 0] earlierDate: newStartDate] == newStartDate)) + if ([now isDateOnSameDay: newStartDate]) { hour = [now hourOfDay]; if (hour < 8) @@ -614,6 +614,8 @@ else newStartDate = now; } + else + newStartDate = [newStartDate hour: 8 minute: 0]; } return newStartDate; diff --git a/UI/Templates/UIxPageFrame.wox b/UI/Templates/UIxPageFrame.wox index ed9460fe..ecb53313 100644 --- a/UI/Templates/UIxPageFrame.wox +++ b/UI/Templates/UIxPageFrame.wox @@ -84,9 +84,9 @@ >