diff --git a/NEWS b/NEWS
index 739f10c8b..5fba47add 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@
Enhancements
- [web] prohibit subscribing a user with no rights
- [web] new button to mark a task as completed (#4531)
+ - [web] new button to reset Calendar categories to defaults
Bug fixes
- [web] include mail account name in form validation (#4532)
diff --git a/SoObjects/SOGo/SOGoDefaults.plist b/SoObjects/SOGo/SOGoDefaults.plist
index 605d0f554..980000489 100644
--- a/SoObjects/SOGo/SOGoDefaults.plist
+++ b/SoObjects/SOGo/SOGoDefaults.plist
@@ -159,28 +159,28 @@
);
SOGoCalendarCategoriesColors = {
- "Customer" = "#CCCCCC";
- "Calls" = "#FFCC33";
- "Favorites" = "#CCCCCC";
- "Meeting" = "#CCCCCC";
- "Ideas" = "#CCCCCC";
- "Miscellaneous" = "#CCCCCC";
- "Birthday" = "#CCCCCC";
- "Anniversary" = "#CCCCCC";
- "Vacation" = "#CCCCCC";
- "Travel" = "#CCCCCC";
- "Projects" = "#CCCCCC";
- "Suppliers" = "#CCCCCC";
- "Gifts" = "#CCCCCC";
- "Clients" = "#CCCCCC";
- "Issues" = "#CCCCCC";
- "Business" = "#CCCCCC";
- "Holidays" = "#CCCCCC";
- "Personal" = "#CCCCCC";
- "Status" = "#CCCCCC";
- "Competition" = "#CCCCCC";
- "Follow up" = "#CCCCCC";
- "Public Holiday" = "#CCCCCC";
+ "Customer" = "#F8D800";
+ "Calls" = "#0396FF";
+ "Favorites" = "#EA5455";
+ "Meeting" = "#7367F0";
+ "Ideas" = "#32CCBC";
+ "Miscellaneous" = "#F6416C";
+ "Birthday" = "#28C76F";
+ "Anniversary" = "#9F44D3";
+ "Vacation" = "#623AA2";
+ "Travel" = "#F55555";
+ "Projects" = "#8C1BAB";
+ "Suppliers" = "#9708CC";
+ "Gifts" = "#736EFE";
+ "Clients" = "#E96D71";
+ "Issues" = "#3677FF";
+ "Business" = "#FA016D";
+ "Holidays" = "#0E197D";
+ "Personal" = "#DE4313";
+ "Status" = "#002661";
+ "Competition" = "#6018DC";
+ "Follow up" = "#D939CD";
+ "Public Holiday" = "#E80505";
};
SOGoSubscriptionFolderFormat = "%{FolderName} (%{UserName} <%{Email}>)";
diff --git a/UI/PreferencesUI/English.lproj/Localizable.strings b/UI/PreferencesUI/English.lproj/Localizable.strings
index 68d2a7004..ffee2363f 100644
--- a/UI/PreferencesUI/English.lproj/Localizable.strings
+++ b/UI/PreferencesUI/English.lproj/Localizable.strings
@@ -237,6 +237,7 @@
"Calendar Category" = "Calendar Category";
"Add Calendar Category" = "Add Calendar Category";
"New category" = "New category";
+"Reset to defaults" = "Reset to defaults";
"Remove Calendar Category" = "Remove Calendar Category";
"Contact Category" = "Contact Category";
"Add Contact Category" = "Add Contact Category";
diff --git a/UI/PreferencesUI/UIxPreferences.m b/UI/PreferencesUI/UIxPreferences.m
index 8937f76df..639b78432 100644
--- a/UI/PreferencesUI/UIxPreferences.m
+++ b/UI/PreferencesUI/UIxPreferences.m
@@ -1212,6 +1212,27 @@ static NSArray *reminderValues = nil;
return [uniqueAddressesList componentsJoinedByString: @", "];
}
+//
+// Used by templates
+//
+- (NSString *) defaultCalendarCategoriesColors
+{
+ NSArray *labels, *colors;
+ NSMutableDictionary *defaultCategoriesColors;
+ unsigned int i;
+
+ labels = [[self labelForKey: @"calendar_category_labels"] componentsSeparatedByString: @","];
+ colors = [[[SOGoSystemDefaults sharedSystemDefaults] calendarCategoriesColors] allValues];
+ defaultCategoriesColors = [NSMutableDictionary dictionary];
+ for (i = 0; i < [colors count]; i++)
+ {
+ [defaultCategoriesColors setObject: [colors objectAtIndex: i]
+ forKey: [labels objectAtIndex: i]];
+ }
+
+ return [defaultCategoriesColors jsonRepresentation];
+}
+
//
// Used by templates
//
diff --git a/UI/Templates/PreferencesUI/UIxPreferences.wox b/UI/Templates/PreferencesUI/UIxPreferences.wox
index a4fb6d58c..b5b67043b 100644
--- a/UI/Templates/PreferencesUI/UIxPreferences.wox
+++ b/UI/Templates/PreferencesUI/UIxPreferences.wox
@@ -19,6 +19,7 @@
var vacationEnabled =