(js) Switch on "remember username" when necessary
This commit is contained in:
parent
ef96c21334
commit
5591b9d423
1
NEWS
1
NEWS
|
@ -13,6 +13,7 @@ Bug fixes
|
||||||
- [web] fixed Sieve folder encoding support (#3904)
|
- [web] fixed Sieve folder encoding support (#3904)
|
||||||
- [web] fixed ordering of calendars when renaming or adding a calendar (#3931)
|
- [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] 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)
|
- [eas] properly skip folders we don't want to synchronize (#3943)
|
||||||
|
|
||||||
3.2.4 (2016-12-01)
|
3.2.4 (2016-12-01)
|
||||||
|
|
|
@ -9,11 +9,15 @@
|
||||||
/**
|
/**
|
||||||
* @ngInject
|
* @ngInject
|
||||||
*/
|
*/
|
||||||
LoginController.$inject = ['$scope', '$timeout', 'Dialog', '$mdDialog', 'Authentication'];
|
LoginController.$inject = ['$scope', '$window', '$timeout', 'Dialog', '$mdDialog', 'Authentication'];
|
||||||
function LoginController($scope, $timeout, Dialog, $mdDialog, Authentication) {
|
function LoginController($scope, $window, $timeout, Dialog, $mdDialog, Authentication) {
|
||||||
var vm = this;
|
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.login = login;
|
||||||
vm.loginState = false;
|
vm.loginState = false;
|
||||||
vm.showAbout = showAbout;
|
vm.showAbout = showAbout;
|
||||||
|
@ -31,10 +35,10 @@
|
||||||
|
|
||||||
// Let the user see the succesfull message before reloading the page
|
// Let the user see the succesfull message before reloading the page
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
if (window.location.href === data.url)
|
if ($window.location.href === data.url)
|
||||||
window.location.reload(true);
|
$window.location.reload(true);
|
||||||
else
|
else
|
||||||
window.location.href = data.url;
|
$window.location.href = data.url;
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}, function(msg) {
|
}, function(msg) {
|
||||||
vm.loginState = 'error';
|
vm.loginState = 'error';
|
||||||
|
|
Loading…
Reference in a new issue