From 078ba95f8efd1a119b6d33b489b14e4e4fea3076 Mon Sep 17 00:00:00 2001 From: Ludovic Marcotte Date: Thu, 20 Aug 2015 14:53:43 -0400 Subject: [PATCH] (feat) show small toast when preferences are saved to give user's feedback --- .../js/Preferences/PreferencesController.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/UI/WebServerResources/js/Preferences/PreferencesController.js b/UI/WebServerResources/js/Preferences/PreferencesController.js index 0fbece5fa..d7081a669 100644 --- a/UI/WebServerResources/js/Preferences/PreferencesController.js +++ b/UI/WebServerResources/js/Preferences/PreferencesController.js @@ -7,8 +7,8 @@ /** * @ngInject */ - PreferencesController.$inject = ['$state', '$mdDialog', 'Dialog', 'User', 'Mailbox', 'statePreferences', 'Authentication']; - function PreferencesController($state, $mdDialog, Dialog, User, Mailbox, statePreferences, Authentication) { + PreferencesController.$inject = ['$state', '$mdDialog', '$mdToast', 'Dialog', 'User', 'Mailbox', 'statePreferences', 'Authentication']; + function PreferencesController($state, $mdDialog, $mdToast, Dialog, User, Mailbox, statePreferences, Authentication) { var vm = this; vm.preferences = statePreferences; @@ -212,7 +212,14 @@ } if (sendForm) - vm.preferences.$save(); + vm.preferences.$save().then(function(data) { + $mdToast.show( + $mdToast.simple() + .content('Preferences saved!') + .position('top right') + .hideDelay(3000) + ); + }); } function canChangePassword() {