From 750dcc61ceff516a9233cc10dc138a9c898a61f6 Mon Sep 17 00:00:00 2001 From: root Date: Wed, 30 Mar 2016 12:40:16 +0200 Subject: mettre les private pour la classe network coté serveur et mes premières essaie pour angularjs notamement extraction des donnée MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/Test/index.html | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 client/Test/index.html (limited to 'client/Test/index.html') diff --git a/client/Test/index.html b/client/Test/index.html new file mode 100644 index 0000000..147745c --- /dev/null +++ b/client/Test/index.html @@ -0,0 +1,19 @@ + + + + + + + + + + + +
+ +
+ -- cgit v1.2.3 From 21b68f1da1ad5bc6520778c795fa6fe901d849c4 Mon Sep 17 00:00:00 2001 From: Loic GUEGAN Date: Sat, 16 Apr 2016 22:06:18 +0200 Subject: Test --- client/Test/index.html | 18 ++++---- client/index.html | 44 ++++++++++---------- client/js/controllers/login.js | 93 +++++++++++++++++++++--------------------- 3 files changed, 77 insertions(+), 78 deletions(-) (limited to 'client/Test/index.html') diff --git a/client/Test/index.html b/client/Test/index.html index 147745c..bff3ee1 100644 --- a/client/Test/index.html +++ b/client/Test/index.html @@ -1,19 +1,19 @@ - + - + -
-
    -
  • - {{person.Name + ' : ' + person.Age}} -
  • -
-
+
+
    +
  • + {{person.Name + ' : ' + person.Age}} +
  • +
+
diff --git a/client/index.html b/client/index.html index 97e0734..45bee7f 100644 --- a/client/index.html +++ b/client/index.html @@ -11,27 +11,27 @@ - + - - + + - +
-
-
+
+
+ -
- +
@@ -57,45 +57,45 @@
- + - - + + - + - + - + - + - + - - + + + + - - diff --git a/client/js/controllers/login.js b/client/js/controllers/login.js index fed358d..93a373e 100644 --- a/client/js/controllers/login.js +++ b/client/js/controllers/login.js @@ -5,62 +5,61 @@ * @param {$sce} $sce The $sce angular service * @param {$http} $http The $http angular service * @param {Identity} The Identity service - + */ -mainApp.controller('loginCtrl', ['$scope','$sce','Identity', function ($scope,$sce, Identity) -{ - // Check for login and define default states - if(!Identity.isAlreadyLogin()){ - $('#loginModal').modal({backdrop: 'static', keyboard: false}); - } +mainApp.controller('loginCtrl', ['$scope', '$sce', 'Identity', function ($scope, $sce, Identity) + { + // Check for login and define default states + if (!Identity.isAlreadyLogin()) { + $('#loginModal').modal({backdrop: 'static', keyboard: false}); + } - // Manager logout event - $scope.$on('logoutEvent', function(){ - $('#loginModal').modal({backdrop: 'static', keyboard: false}); - }); + // Manager logout event + $scope.$on('logoutEvent', function () { + $('#loginModal').modal({backdrop: 'static', keyboard: false}); + }); - - // Hide loading button and message alert - $('#loadingLoginButton').hide(); - $('#failedToLoginAlert').hide(); - - // Defined function for login - $scope.loginAction=function(){ - - // Begin login state for template - $('#loginButton').hide(); - $('#loadingLoginButton').show(); + // Hide loading button and message alert + $('#loadingLoginButton').hide(); $('#failedToLoginAlert').hide(); - // Get data from templates - var username=$("#loginFormUsername").val(); - var password=$("#loginFormPassword").val(); - var projectname=$("#loginFormProjectname").val(); - // Function to call to handle result - var responseCallback=function(response){ + // Defined function for login + $scope.loginAction = function () { - if(response.status!==0){ - // Set reason of fail - $scope.failReason=response.failReason; + // Begin login state for template + $('#loginButton').hide(); + $('#loadingLoginButton').show(); + $('#failedToLoginAlert').hide(); - // Display the error - $('#failedToLoginAlert').show(); - } - else { - // Else the user is online ! - $('#loginModal').modal('hide'); + // Get data from templates + var username = $("#loginFormUsername").val(); + var password = $("#loginFormPassword").val(); + var projectname = $("#loginFormProjectname").val(); + + // Function to call to handle result + var responseCallback = function (response) { + + if (response.status !== 0) { + // Set reason of fail + $scope.failReason = response.failReason; + + // Display the error + $('#failedToLoginAlert').show(); + } else { + // Else the user is online ! + $('#loginModal').modal('hide'); + } + + // Reset button state + $('#loginButton').show(); + $('#loadingLoginButton').hide(); } - // Reset button state - $('#loginButton').show(); - $('#loadingLoginButton').hide(); - } - - // Try to login - Identity.login(username, password, projectname, responseCallback); - }; - -}]); + // Try to login + Identity.login(username, password, projectname, responseCallback); + }; + + }]); -- cgit v1.2.3