Commit 350551183c61aa595ad84e3ca0e983057ec48678
1 parent
fa42131e
Retour à la page précédente quand connecté
Showing
1 changed file
with
4 additions
and
1 deletions
Show diff stats
public/js/controllers/ConnectCtrl.js
@@ -7,8 +7,11 @@ angular.module('ConnectCtrl', ['SessionsServ', 'EncryptServ', 'angular-ladda']). | @@ -7,8 +7,11 @@ angular.module('ConnectCtrl', ['SessionsServ', 'EncryptServ', 'angular-ladda']). | ||
7 | $scope.connect = { | 7 | $scope.connect = { |
8 | connect: function () { | 8 | connect: function () { |
9 | $scope.connecting = true; | 9 | $scope.connecting = true; |
10 | - SessionServ.connect($scope.connect.login, $scope.connect.pass, function() { | 10 | + SessionServ.connect($scope.connect.login, $scope.connect.pass, function(err) { |
11 | $scope.connecting = false; | 11 | $scope.connecting = false; |
12 | + if (!err) { | ||
13 | + window.history.back(); | ||
14 | + } | ||
12 | }); | 15 | }); |
13 | } | 16 | } |
14 | }; | 17 | }; |