diff --git a/NEWS b/NEWS index ac41cad17..e154b3c2d 100644 --- a/NEWS +++ b/NEWS @@ -13,6 +13,7 @@ Bug fixes - [web] fixed Sieve folder encoding support (#3904) - [web] fixed ordering of calendars when renaming or adding a calendar (#3931) - [web] use the organizer's alarm by default when accepting IMIP messages (#3934) + - [web] switch on "Remember username" when cookie username is set - [eas] properly skip folders we don't want to synchronize (#3943) 3.2.4 (2016-12-01) diff --git a/UI/WebServerResources/js/Main/Main.app.js b/UI/WebServerResources/js/Main/Main.app.js index 1f37a6405..d1d83c1ac 100644 --- a/UI/WebServerResources/js/Main/Main.app.js +++ b/UI/WebServerResources/js/Main/Main.app.js @@ -9,11 +9,15 @@ /** * @ngInject */ - LoginController.$inject = ['$scope', '$timeout', 'Dialog', '$mdDialog', 'Authentication']; - function LoginController($scope, $timeout, Dialog, $mdDialog, Authentication) { + LoginController.$inject = ['$scope', '$window', '$timeout', 'Dialog', '$mdDialog', 'Authentication']; + function LoginController($scope, $window, $timeout, Dialog, $mdDialog, Authentication) { var vm = this; - vm.creds = { username: cookieUsername, password: null }; + vm.creds = { + username: $window.cookieUsername, + password: null, + rememberLogin: angular.isDefined($window.cookieUsername) && $window.cookieUsername.length > 0 + }; vm.login = login; vm.loginState = false; vm.showAbout = showAbout; @@ -31,10 +35,10 @@ // Let the user see the succesfull message before reloading the page $timeout(function() { - if (window.location.href === data.url) - window.location.reload(true); + if ($window.location.href === data.url) + $window.location.reload(true); else - window.location.href = data.url; + $window.location.href = data.url; }, 1000); }, function(msg) { vm.loginState = 'error';