diff --git a/openslides/users/static/js/users/site.js b/openslides/users/static/js/users/site.js index f9e87c139..3ca7b5a63 100644 --- a/openslides/users/static/js/users/site.js +++ b/openslides/users/static/js/users/site.js @@ -132,10 +132,6 @@ angular.module('OpenSlidesApp.users.site', ['OpenSlidesApp.users']) showClose: $stateParams.guest_enabled, closeByEscape: $stateParams.guest_enabled, closeByDocument: $stateParams.guest_enabled, - preCloseCallback: function() { - $state.go('home'); - return true; - } }); }] }); @@ -884,8 +880,7 @@ angular.module('OpenSlidesApp.users.site', ['OpenSlidesApp.users']) $scope.logout = function () { $http.post('/users/logout/').then(function (response) { operator.setUser(null); - // TODO: remove all data from cache and reload page - // DS.flush(); + window.location.reload(); }); }; } @@ -926,6 +921,9 @@ angular.module('OpenSlidesApp.users.site', ['OpenSlidesApp.users']) // Success: User logged in. operator.setUser(response.data.user_id); $scope.closeThisDialog(); + setTimeout(function(){ + window.location.replace('/'); + }, 1000); }, function (response) { // Error: Username or password is not correct.