diff --git a/ChangeLog b/ChangeLog index 975dfb045..07adfa85e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2010-05-21 Wolfgang Sourdeau + + * SoObjects/Appointments/SOGoAptMailUpdate.m (-valueForProperty:): + set the timezone of date objects to the active user's timezone. + + * UI/WebServerResources/SchedulerUI.js: (resetCategoriesStyles): + fixed an exception occurring when + UserDefaults['SOGoCalendarCategoriesColors'] is undefined. + 2010-05-21 Francis Lachapelle * UI/WebServerResources/SchedulerUI.js (onMenuCurrentView): diff --git a/SoObjects/Appointments/SOGoAptMailUpdate.m b/SoObjects/Appointments/SOGoAptMailUpdate.m index 4fa3eb5d5..90ed63705 100644 --- a/SoObjects/Appointments/SOGoAptMailUpdate.m +++ b/SoObjects/Appointments/SOGoAptMailUpdate.m @@ -19,6 +19,8 @@ 02111-1307, USA. */ +#import + #import #import #import @@ -27,6 +29,7 @@ #import #import #import +#import #import "SOGoAptMailNotification.h" @@ -38,9 +41,10 @@ - (NSString *) valueForProperty: (NSString *) property { static NSDictionary *valueTypes = nil; - SOGoDateFormatter *dateFormatter; NSString *valueType; id value; + SOGoUser *user; + NSTimeZone *userTZ; if (!valueTypes) { @@ -61,9 +65,11 @@ value = [(iCalEvent *) apt propertyValue: property]; if ([valueType isEqualToString: @"date"]) { - dateFormatter = [[context activeUser] - dateFormatterInContext: context]; - value = [dateFormatter formattedDateAndTime: value]; + user = [context activeUser]; + userTZ = [[user userDefaults] timeZone]; + [value setTimeZone: userTZ]; + value = [[user dateFormatterInContext: context] + formattedDateAndTime: value]; } } else diff --git a/SoObjects/SOGo/SOGoDefaults.plist b/SoObjects/SOGo/SOGoDefaults.plist index a056b493f..862400881 100644 --- a/SoObjects/SOGo/SOGoDefaults.plist +++ b/SoObjects/SOGo/SOGoDefaults.plist @@ -61,7 +61,7 @@ SOGoDraftsFolderName = "Drafts"; SOGoTrashFolderName = "Trash"; - SOGoCalendarDefaultCategoryColor = "#F0F0F0"; + SOGoCalendarDefaultCategoryColor = "#aaa"; SOGoCalendarShouldDisplayWeekend = YES; SOGoFreeBusyDefaultInterval = ( 7, 7 ); diff --git a/UI/WebServerResources/SchedulerUI.js b/UI/WebServerResources/SchedulerUI.js index 3640574b6..bf2f3a70e 100644 --- a/UI/WebServerResources/SchedulerUI.js +++ b/UI/WebServerResources/SchedulerUI.js @@ -1252,10 +1252,11 @@ function resetCategoriesStyles() { categoriesStyleSheet.removeChild(categoriesStyleSheet.firstChild); } - // Update stylesheet with new categories colors - var selectors = []; - var rules = []; - categoriesStyles.keys().each(function(category) { + if (UserDefaults['SOGoCalendarCategoriesColors']) { + // Update stylesheet with new categories colors + var selectors = []; + var rules = []; + categoriesStyles.keys().each(function(category) { var color = UserDefaults['SOGoCalendarCategoriesColors'][category]; if (color) { rules[rules.length] = '{ border-right: 8px solid ' + color + '; }'; @@ -1263,18 +1264,19 @@ function resetCategoriesStyles() { } }); - if (selectors.length > 0) { - if (categoriesStyleSheet.styleSheet && categoriesStyleSheet.styleSheet.addRule) { - // IE - for (var i = 0; i < selectors.length; i++) - categoriesStyleSheet.styleSheet.addRule(selectors[i], - rules[i]); - } - else { - // Mozilla + Safari - for (var i = 0; i < selectors.length; i++) - categoriesStyleSheet.appendChild(document.createTextNode(selectors[i] + - ' ' + rules[i])); + if (selectors.length > 0) { + if (categoriesStyleSheet.styleSheet && categoriesStyleSheet.styleSheet.addRule) { + // IE + for (var i = 0; i < selectors.length; i++) + categoriesStyleSheet.styleSheet.addRule(selectors[i], + rules[i]); + } + else { + // Mozilla + Safari + for (var i = 0; i < selectors.length; i++) + categoriesStyleSheet.appendChild(document.createTextNode(selectors[i] + + ' ' + rules[i])); + } } } } diff --git a/UI/WebServerResources/UIxComponentEditor.js b/UI/WebServerResources/UIxComponentEditor.js index dae4172e4..0b715dd08 100644 --- a/UI/WebServerResources/UIxComponentEditor.js +++ b/UI/WebServerResources/UIxComponentEditor.js @@ -18,7 +18,7 @@ function onPopupAttendeesWindow(event) { else ComponentEditor.attendeesWindow = window.open(ApplicationBaseURL + "/editAttendees", sanitizeWindowName(activeCalendar + activeComponent + "Attendees"), - "width=803,height=573"); + "width=900,height=573"); return false; }