(fix) Sidenav list items display of Preferences

This commit is contained in:
Francis Lachapelle
2015-07-27 20:11:57 -04:00
parent 86a0032cc1
commit c700608f0f
2 changed files with 24 additions and 16 deletions
@@ -7,13 +7,14 @@
/**
* @ngInject
*/
PreferencesController.$inject = ['$scope', '$timeout', '$q', '$mdDialog', 'User', 'Mailbox', 'statePreferences', 'Authentication'];
function PreferencesController($scope, $timeout, $q, $mdDialog, User, Mailbox, statePreferences, Authentication) {
PreferencesController.$inject = ['$state', '$mdDialog', 'User', 'Mailbox', 'statePreferences', 'Authentication'];
function PreferencesController($state, $mdDialog, User, Mailbox, statePreferences, Authentication) {
var vm = this;
vm.preferences = statePreferences;
vm.passwords = { newPassword: null, newPasswordConfirmation: null };
vm.go = go;
vm.addCalendarCategory = addCalendarCategory;
vm.removeCalendarCategory = removeCalendarCategory;
vm.addContactCategory = addContactCategory;
@@ -34,7 +35,11 @@
vm.timeZonesListFilter = timeZonesListFilter;
vm.timeZonesSearchText = '';
vm.mailboxes = Mailbox.$find({ id: 0 });
function go(module) {
$state.go('preferences.' + module);
}
function addCalendarCategory() {
vm.preferences.defaults.SOGoCalendarCategoriesColors["New category"] = "#aaa";
vm.preferences.defaults.SOGoCalendarCategories.push("New category");