Commit 000bba8c712ad07582c5b8b75368c3be3cc8735d
1 parent
51adb054
Animation de connection
Showing
5 changed files
with
13 additions
and
4 deletions
Show diff stats
bower.json
public/js/app.js
1 | -angular.module('ciApp', ['ngRoute', 'appRoutes', 'NotifyServ', 'EncryptServ', 'SessionsServ', 'SessionsCtrl', 'ConnectCtrl', 'MembreCtrl']); | |
1 | +angular.module('ciApp', ['ngRoute', 'appRoutes', 'angular-ladda', 'NotifyServ', 'EncryptServ', 'SessionsServ', 'SessionsCtrl', 'ConnectCtrl', 'MembreCtrl']); | ... | ... |
public/js/controllers/ConnectCtrl.js
... | ... | @@ -3,9 +3,13 @@ angular.module('ConnectCtrl', []).controller('ConnectCtrl', ['$scope', 'SessionS |
3 | 3 | EncryptServ.preload(function () { |
4 | 4 | return undefined; |
5 | 5 | }); |
6 | + $scope.connecting = false; | |
6 | 7 | $scope.connect = { |
7 | 8 | connect: function () { |
8 | - SessionServ.connect($scope.connect.login, $scope.connect.pass); | |
9 | + $scope.connecting = true; | |
10 | + SessionServ.connect($scope.connect.login, $scope.connect.pass, function() { | |
11 | + $scope.connecting = false; | |
12 | + }); | |
9 | 13 | } |
10 | 14 | }; |
11 | 15 | } | ... | ... |
public/views/connect.html
... | ... | @@ -9,6 +9,6 @@ |
9 | 9 | <label for="pass">Mot de passe</label> |
10 | 10 | <input type="password" class="form-control" id="pass" ng-model="connect.pass" placeholder="Mot de passe Polytech"> |
11 | 11 | </div> |
12 | - <button type="submit" class="btn btn-default" ng-click="connect.connect()">Se connecter</button> | |
12 | + <button type="submit" ladda="connecting" class="btn btn-primary" ng-click="connect.connect()">Se connecter</button> | |
13 | 13 | </form> |
14 | 14 | </div> | ... | ... |
public/views/index.html
... | ... | @@ -9,12 +9,16 @@ |
9 | 9 | <link rel="stylesheet" href="libs/bootswatch-dist/css/bootstrap.min.css"> |
10 | 10 | <link rel="stylesheet" href="css/style.css"> |
11 | 11 | <link rel="stylesheet" href="libs/animate.css/animate.min.css"> |
12 | + <link rel="stylesheet" href="libs/ladda/dist/ladda-themeless.min.css"> | |
12 | 13 | <script src="libs/jquery/dist/jquery.min.js"></script> |
13 | 14 | <script src="libs/angular/angular.min.js"></script> |
14 | 15 | <script src="libs/angular-route/angular-route.min.js"></script> |
15 | 16 | <script src="libs/angular-bootstrap/ui-bootstrap.min.js"></script> |
16 | 17 | <script src="libs/jsencrypt/bin/jsencrypt.min.js"></script> |
17 | 18 | <script src="libs/remarkable-bootstrap-notify/bootstrap-notify.min.js"></script> |
19 | + <script src="libs/ladda/js/spin.js"></script> | |
20 | + <script src="libs/ladda/js/ladda.js"></script> | |
21 | + <script src="libs/angular-ladda/dist/angular-ladda.min.js"></script> | |
18 | 22 | <script src="js/services/NotifyServ.js"></script> |
19 | 23 | <script src="js/services/EncryptServ.js"></script> |
20 | 24 | <script src="js/services/SessionServ.js"></script> | ... | ... |