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