(js) Switch on "remember username" when necessary
parent
ef96c21334
commit
5591b9d423
1
NEWS
1
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)
|
||||
|
|
|
@ -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';
|
||||
|
|
Loading…
Reference in New Issue