diff --git a/ChangeLog b/ChangeLog index 2267a2cb5..9fc547898 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2009-10-14 Francis Lachapelle + * UI/PreferencesUI/UIxPreferences.m (-defaultEmailAddresses): new + method that returns a string representation of all the user's + email addresses. + + * UI/WebServerResources/UIxPreferences.js + (addDefaultEmailAddresses): new function that make sure all of the + user's default email addresses appear in the addresses textarea of + the vacation tab. + * UI/WebServerResources/SchedulerUI.js (changeCalendarDisplay): don't highlight the day selection when in the day view. (eventsListCallback): don't popup event window when diff --git a/UI/PreferencesUI/English.lproj/Localizable.strings b/UI/PreferencesUI/English.lproj/Localizable.strings index 9d0a91a69..d9929a7db 100644 --- a/UI/PreferencesUI/English.lproj/Localizable.strings +++ b/UI/PreferencesUI/English.lproj/Localizable.strings @@ -21,6 +21,7 @@ "Enable vacation auto reply" = "Enable vacation auto reply"; "Auto reply message :" = "Auto reply message :"; "Email addresses (separated by commas) :" = "Email addresses (separated by commas) :"; +"Add default email addresses" = "Add default email addresses"; "Days between responses :" = "Days between responses :"; "Do not send responses to mailing lists" = "Do not send responses to mailing lists"; "Please specify your message and your email addresses for which you want to enable auto reply." diff --git a/UI/PreferencesUI/French.lproj/Localizable.strings b/UI/PreferencesUI/French.lproj/Localizable.strings index d4a24d5df..3d6f841e7 100644 --- a/UI/PreferencesUI/French.lproj/Localizable.strings +++ b/UI/PreferencesUI/French.lproj/Localizable.strings @@ -20,6 +20,7 @@ "Enable vacation auto reply" = "Enable vacation auto reply"; "Auto reply message :" = "Auto reply message :"; "Email addresses (separated by commas) :" = "Email addresses (separated by commas) :"; +"Add default email addresses" = "Ajouter les adresses par défaut"; "Days between responses :" = "Days between responses :"; "Do not send responses to mailing lists" = "Do not send responses to mailing lists"; "Please specify your message and your email addresses for which you want to enable auto reply." diff --git a/UI/PreferencesUI/UIxPreferences.m b/UI/PreferencesUI/UIxPreferences.m index 608407715..1cf274af4 100644 --- a/UI/PreferencesUI/UIxPreferences.m +++ b/UI/PreferencesUI/UIxPreferences.m @@ -742,28 +742,33 @@ static BOOL forwardEnabled = NO; forKey: @"autoReplyEmailAddresses"]; } -- (NSString *) autoReplyEmailAddresses +- (NSString *) defaultEmailAddresses { NSArray *addressesList; - NSMutableArray *newAddressesList; + NSMutableArray *uniqueAddressesList; NSString *address; unsigned int i; - addressesList = [vacationOptions objectForKey: @"autoReplyEmailAddresses"]; - if (!addressesList) + uniqueAddressesList = [NSMutableArray array]; + addressesList = [NSMutableArray arrayWithArray: [user allEmails]]; + for (i = 0; i < [addressesList count]; i++) { - newAddressesList = [NSMutableArray array]; - addressesList = [NSMutableArray arrayWithArray: [user allEmails]]; - for (i = 0; i < [addressesList count]; i++) - { - address = [addressesList objectAtIndex: i]; - if (![newAddressesList containsObject: address]) - [newAddressesList addObject: address]; - } - addressesList = newAddressesList; + address = [addressesList objectAtIndex: i]; + if (![uniqueAddressesList containsObject: address]) + [uniqueAddressesList addObject: address]; } - return [addressesList componentsJoinedByString: @", "]; + return [uniqueAddressesList componentsJoinedByString: @", "]; +} + +- (NSString *) autoReplyEmailAddresses +{ + NSArray *addressesList; + + addressesList = [vacationOptions objectForKey: @"autoReplyEmailAddresses"]; + + return (addressesList? + [addressesList componentsJoinedByString: @", "] : [self defaultEmailAddresses]); } - (NSArray *) daysBetweenResponsesList diff --git a/UI/Templates/PreferencesUI/UIxPreferences.wox b/UI/Templates/PreferencesUI/UIxPreferences.wox index d4592a75d..a60f74d46 100644 --- a/UI/Templates/PreferencesUI/UIxPreferences.wox +++ b/UI/Templates/PreferencesUI/UIxPreferences.wox @@ -187,7 +187,6 @@ var:checked="enableVacation" />
-