From 689b9df4ff5d9608ff6474208aa488b54b04c903 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 21 May 2010 21:21:19 +0000 Subject: [PATCH 1/4] Monotone-Parent: 28ba6a8fb0de57f2cd4f4b6c185e5b0303c886ec Monotone-Revision: 1f7df7709595f90e31a77eb48e262817f79b279f Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-05-21T21:21:19 Monotone-Branch: ca.inverse.sogo --- SoObjects/SOGo/SOGoDefaults.plist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ); From c528cefea8a4d0ce868e26af7d342577124de9c4 Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 21 May 2010 21:22:25 +0000 Subject: [PATCH 2/4] Monotone-Parent: 1f7df7709595f90e31a77eb48e262817f79b279f Monotone-Revision: 6b80a82a1c8467dead7e9167694acac4cd8cae38 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-05-21T21:22:25 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 6 +++++ UI/WebServerResources/SchedulerUI.js | 34 +++++++++++++++------------- 2 files changed, 24 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4cd994e8f..7ed35e0ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-05-21 Wolfgang Sourdeau + + * UI/WebServerResources/SchedulerUI.js: (resetCategoriesStyles): + fixed an exception occurring when + UserDefaults['SOGoCalendarCategoriesColors'] is undefined. + 2010-05-21 Francis Lachapelle * UI/WebServerResources/UIxPreferences.js (endEditable, diff --git a/UI/WebServerResources/SchedulerUI.js b/UI/WebServerResources/SchedulerUI.js index a44eabc7c..531ac4ecc 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])); + } } } } From f087d8e4f702dd46475e81505ba1acc2643b9b4f Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 21 May 2010 21:25:14 +0000 Subject: [PATCH 3/4] Monotone-Parent: 6b80a82a1c8467dead7e9167694acac4cd8cae38 Monotone-Revision: 164d0ac238e069b138546ff280879bd831709536 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-05-21T21:25:14 Monotone-Branch: ca.inverse.sogo --- UI/WebServerResources/UIxComponentEditor.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } From d2ca80f4b4fc8e1608def67babf41058a73efabf Mon Sep 17 00:00:00 2001 From: Wolfgang Sourdeau Date: Fri, 21 May 2010 21:30:33 +0000 Subject: [PATCH 4/4] Monotone-Parent: 164d0ac238e069b138546ff280879bd831709536 Monotone-Revision: 7bb42646015cb99b0c6dfe942e088aba59cc5991 Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-05-21T21:30:33 Monotone-Branch: ca.inverse.sogo --- ChangeLog | 3 +++ SoObjects/Appointments/SOGoAptMailUpdate.m | 14 ++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7ed35e0ba..3a349ebdd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 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. 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