From 000bba8c712ad07582c5b8b75368c3be3cc8735d Mon Sep 17 00:00:00 2001 From: Geoffrey Frogeye Date: Fri, 3 Apr 2015 17:34:56 +0200 Subject: [PATCH] Animation de connection --- bower.json | 3 ++- public/js/app.js | 2 +- public/js/controllers/ConnectCtrl.js | 6 +++++- public/views/connect.html | 2 +- public/views/index.html | 4 ++++ 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/bower.json b/bower.json index efa5419..6da89eb 100644 --- a/bower.json +++ b/bower.json @@ -8,6 +8,7 @@ "bootswatch-dist": "3.3.2-cerulean", "jsencrypt": "~2.1.0", "animate.css": "~3.2.6", - "remarkable-bootstrap-notify": "~3.0.0" + "remarkable-bootstrap-notify": "~3.0.0", + "angular-ladda": "~0.2.2" } } diff --git a/public/js/app.js b/public/js/app.js index 626c986..9a0fe5b 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -1 +1 @@ -angular.module('ciApp', ['ngRoute', 'appRoutes', 'NotifyServ', 'EncryptServ', 'SessionsServ', 'SessionsCtrl', 'ConnectCtrl', 'MembreCtrl']); +angular.module('ciApp', ['ngRoute', 'appRoutes', 'angular-ladda', 'NotifyServ', 'EncryptServ', 'SessionsServ', 'SessionsCtrl', 'ConnectCtrl', 'MembreCtrl']); diff --git a/public/js/controllers/ConnectCtrl.js b/public/js/controllers/ConnectCtrl.js index 547e33a..c723b63 100644 --- a/public/js/controllers/ConnectCtrl.js +++ b/public/js/controllers/ConnectCtrl.js @@ -3,9 +3,13 @@ angular.module('ConnectCtrl', []).controller('ConnectCtrl', ['$scope', 'SessionS EncryptServ.preload(function () { return undefined; }); + $scope.connecting = false; $scope.connect = { connect: function () { - SessionServ.connect($scope.connect.login, $scope.connect.pass); + $scope.connecting = true; + SessionServ.connect($scope.connect.login, $scope.connect.pass, function() { + $scope.connecting = false; + }); } }; } diff --git a/public/views/connect.html b/public/views/connect.html index 9ec25e6..8b26efe 100644 --- a/public/views/connect.html +++ b/public/views/connect.html @@ -9,6 +9,6 @@ - + diff --git a/public/views/index.html b/public/views/index.html index 56b30dc..6b4dd9b 100644 --- a/public/views/index.html +++ b/public/views/index.html @@ -9,12 +9,16 @@ + + + + -- libgit2 0.21.2