New button to reset Calendar categories

Also added default colors to categories.
This commit is contained in:
Francis Lachapelle
2018-09-07 21:38:31 -04:00
parent 2be5edde94
commit 9ddb65a07a
6 changed files with 61 additions and 26 deletions
@@ -3,7 +3,7 @@
(function() {
'use strict';
/**
* @ngInject
*/
@@ -62,6 +62,12 @@
});
};
this.resetCalendarCategories = function(form) {
this.preferences.defaults.SOGoCalendarCategories = _.keys($window.defaultCalendarCategories);
this.preferences.defaults.SOGoCalendarCategoriesColors = angular.copy($window.defaultCalendarCategories);
form.$setDirty();
};
this.addCalendarCategory = function(form) {
this.preferences.defaults.SOGoCalendarCategoriesColors[l('New category')] = "#aaa";
this.preferences.defaults.SOGoCalendarCategories.push(l('New category'));
@@ -202,10 +208,10 @@
form.$setDirty();
});
};
this.editMailFilter = function(ev, index, form) {
var filter = angular.copy(this.preferences.defaults.SOGoSieveFilters[index]);
$mdDialog.show({
templateUrl: 'editFilter?filter=' + index,
controller: 'FiltersDialogController',
@@ -388,7 +394,7 @@
return false;
};
this.changePassword = function() {
Authentication.changePassword(this.passwords.newPassword).then(function() {
var alert = $mdDialog.alert({