From b8cf0f6e5c0ea9b03815f8ac51b26ed1bd419263 Mon Sep 17 00:00:00 2001 From: manzerbredes Date: Sun, 31 Jan 2016 11:14:13 +0100 Subject: Change client folders --- client/js/requests/identity.js | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 client/js/requests/identity.js (limited to 'client/js/requests/identity.js') diff --git a/client/js/requests/identity.js b/client/js/requests/identity.js new file mode 100644 index 0000000..e69de29 -- cgit v1.2.3 From 58e5c44db2f3343c491495d7077f13450db4e324 Mon Sep 17 00:00:00 2001 From: manzerbredes Date: Sun, 31 Jan 2016 11:47:13 +0100 Subject: Make status bar dynamic ! --- client/index.html | 8 +++++++- client/js/controllers/status.js | 18 ++++++++++++++---- client/js/requests/identity.js | 15 +++++++++++++++ 3 files changed, 36 insertions(+), 5 deletions(-) (limited to 'client/js/requests/identity.js') diff --git a/client/index.html b/client/index.html index 0c02623..c2d1862 100644 --- a/client/index.html +++ b/client/index.html @@ -62,8 +62,14 @@ - + + + + + + + diff --git a/client/js/controllers/status.js b/client/js/controllers/status.js index 3534912..0767202 100644 --- a/client/js/controllers/status.js +++ b/client/js/controllers/status.js @@ -4,9 +4,19 @@ -mainApp.controller('statusCtrl', function ($scope) +mainApp.controller('statusCtrl', function ($scope,$interval) { - $scope.username="User 1"; - $scope.connection="Online"; - $scope.lastconnection="1 Septembre"; + + // Update status every 2 seconds + $interval(function(){ + var status=identity.fetchStatus(); + $scope.connection=status[0]; + $scope.username=status[1]; + $scope.lastconnection=status[2]; + }, 2000); + + + + + }); \ No newline at end of file diff --git a/client/js/requests/identity.js b/client/js/requests/identity.js index e69de29..369ce85 100644 --- a/client/js/requests/identity.js +++ b/client/js/requests/identity.js @@ -0,0 +1,15 @@ + + +// Make Namespace +var identity = {} ; + + + +// Fetch Status +identity.fetchStatus = function(){ + + // TODO + + return new Array("1", "user1", "25/02/2016"); + +} \ No newline at end of file -- cgit v1.2.3 From 6905bacd589950f2f84900fe7b501591bc8c4f68 Mon Sep 17 00:00:00 2001 From: manzerbredes Date: Sun, 31 Jan 2016 13:34:43 +0100 Subject: Change status controller and template --- client/js/controllers/status.js | 4 ++-- client/js/requests/identity.js | 2 +- client/partials/nav.html | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'client/js/requests/identity.js') diff --git a/client/js/controllers/status.js b/client/js/controllers/status.js index 01fdcc3..e4f119d 100644 --- a/client/js/controllers/status.js +++ b/client/js/controllers/status.js @@ -13,10 +13,10 @@ mainApp.controller('statusCtrl', function ($scope,$interval,$sce) $scope.username=status[1]; $scope.lastconnection=status[2]; if(status[0] == "1"){ - $scope.connection=$sce.trustAsHtml("Connection : Online"); + $scope.connection=$sce.trustAsHtml("Online"); } else{ - $scope.connection="Connection : Offline"; + $scope.connection=$sce.trustAsHtml("Offline"); } }, 2000); diff --git a/client/js/requests/identity.js b/client/js/requests/identity.js index 369ce85..d008abf 100644 --- a/client/js/requests/identity.js +++ b/client/js/requests/identity.js @@ -10,6 +10,6 @@ identity.fetchStatus = function(){ // TODO - return new Array("1", "user1", "25/02/2016"); + return new Array("0", "user1", "25/02/2016"); } \ No newline at end of file diff --git a/client/partials/nav.html b/client/partials/nav.html index b9e51df..0e26922 100644 --- a/client/partials/nav.html +++ b/client/partials/nav.html @@ -20,7 +20,7 @@
  • User : {{ username }}
  • Last Connection : {{ lastconnection }}
  • -
  • +
  • Connection :
  • -- cgit v1.2.3 From 0ea58c5684abc21c341b5a93befdd7cee4ac37e1 Mon Sep 17 00:00:00 2001 From: ArnaudVOTA Date: Wed, 3 Feb 2016 12:05:04 +0100 Subject: Ajout d'une requete pour l'identification. Non testé. Modification des champs de l'overlay. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/js/requests/identity.js | 37 +++++++++++++++++++++++++++++-------- client/partials/nav.html | 21 ++++++++++++++------- client/partials/overlays.html | 21 ++++++++++++++------- 3 files changed, 57 insertions(+), 22 deletions(-) (limited to 'client/js/requests/identity.js') diff --git a/client/js/requests/identity.js b/client/js/requests/identity.js index d008abf..aca435f 100644 --- a/client/js/requests/identity.js +++ b/client/js/requests/identity.js @@ -1,15 +1,36 @@ -// Make Namespace -var identity = {} ; +mainApp.controller('identityCtrl', function($scope, $http) { -// Fetch Status -identity.fetchStatus = function(){ - - // TODO + $scope.identityFormData = {}; + + $scope.processForm = function() { + + $http({ + method : 'POST', + url : 'http://148.60.11.31/', + data : $.param($scope.identityFormData), + headers : { 'Content-Type': 'application/x-www-form-urlencoded' } + }) + .success(function(data) { + console.log(data); + + if (!data.success) { + // if not successful, bind errors to error variables + //$scope.errorName = data.errors.name; + //$scope.errorSuperhero = data.errors.superheroAlias; + } else { + // if successful, bind success message to message + //$scope.message = data.message; + } + }); + }; + + + +}); - return new Array("0", "user1", "25/02/2016"); + -} \ No newline at end of file diff --git a/client/partials/nav.html b/client/partials/nav.html index 869d4e2..e785eeb 100644 --- a/client/partials/nav.html +++ b/client/partials/nav.html @@ -52,21 +52,28 @@ diff --git a/client/partials/overlays.html b/client/partials/overlays.html index b913f7a..8bbce52 100644 --- a/client/partials/overlays.html +++ b/client/partials/overlays.html @@ -10,21 +10,28 @@ -- cgit v1.2.3 From c81bfeb0e8ac50bc122f653fda1f51169a753354 Mon Sep 17 00:00:00 2001 From: manzerbredes Date: Wed, 3 Feb 2016 12:28:01 +0100 Subject: Wrong implementation of identity.js --- client/js/requests/identity.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'client/js/requests/identity.js') diff --git a/client/js/requests/identity.js b/client/js/requests/identity.js index aca435f..60c74ee 100644 --- a/client/js/requests/identity.js +++ b/client/js/requests/identity.js @@ -1,7 +1,7 @@ - +/* mainApp.controller('identityCtrl', function($scope, $http) { $scope.identityFormData = {}; @@ -30,7 +30,7 @@ mainApp.controller('identityCtrl', function($scope, $http) { -}); +});*/ -- cgit v1.2.3 From 13dbbd7b36e3f12c25c45c3debc704b6632c4b46 Mon Sep 17 00:00:00 2001 From: manzerbredes Date: Wed, 3 Feb 2016 12:30:12 +0100 Subject: Edit identity.js --- client/js/requests/identity.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'client/js/requests/identity.js') diff --git a/client/js/requests/identity.js b/client/js/requests/identity.js index 60c74ee..19971b8 100644 --- a/client/js/requests/identity.js +++ b/client/js/requests/identity.js @@ -1,4 +1,17 @@ +// Make Namespace +var identity = {} ; + + + +// Fetch Status +identity.fetchStatus = function(){ + + // TODO + + return new Array("0", "user1", "25/02/2016"); + +} /* -- cgit v1.2.3 From eb9f9c9a6e410b8feaf0f628dcbb35ceafea83e5 Mon Sep 17 00:00:00 2001 From: manzerbredes Date: Wed, 3 Feb 2016 16:40:02 +0100 Subject: Add logo, remove session checking every 2 seconds --- client/images/logo.png | Bin 0 -> 9946 bytes client/js/controllers/home.js | 1 - client/js/controllers/network.js | 1 - client/js/controllers/status.js | 4 ++-- client/js/requests/identity.js | 7 ------- client/partials/favicon.html | 2 +- client/partials/home.html | 2 +- client/partials/network.html | 2 +- 8 files changed, 5 insertions(+), 14 deletions(-) create mode 100644 client/images/logo.png (limited to 'client/js/requests/identity.js') diff --git a/client/images/logo.png b/client/images/logo.png new file mode 100644 index 0000000..82914f3 Binary files /dev/null and b/client/images/logo.png differ diff --git a/client/js/controllers/home.js b/client/js/controllers/home.js index d2dafff..4a9fb21 100644 --- a/client/js/controllers/home.js +++ b/client/js/controllers/home.js @@ -6,7 +6,6 @@ mainApp.controller('homeCtrl', function ($scope) { - $scope.test="Home view"; // Login before use App //$('#loginModal').modal({backdrop: 'static', keyboard: false}); diff --git a/client/js/controllers/network.js b/client/js/controllers/network.js index c2a9794..6c916ae 100644 --- a/client/js/controllers/network.js +++ b/client/js/controllers/network.js @@ -6,5 +6,4 @@ mainApp.controller('networkCtrl', function ($scope) { - $scope.test="Network View"; }); \ No newline at end of file diff --git a/client/js/controllers/status.js b/client/js/controllers/status.js index e4f119d..c24997e 100644 --- a/client/js/controllers/status.js +++ b/client/js/controllers/status.js @@ -8,7 +8,7 @@ mainApp.controller('statusCtrl', function ($scope,$interval,$sce) { // Update status every 2 seconds - $interval(function(){ + /*$interval(function(){ var status=identity.fetchStatus(); $scope.username=status[1]; $scope.lastconnection=status[2]; @@ -18,7 +18,7 @@ mainApp.controller('statusCtrl', function ($scope,$interval,$sce) else{ $scope.connection=$sce.trustAsHtml("Offline"); } - }, 2000); + }, 2000);*/ diff --git a/client/js/requests/identity.js b/client/js/requests/identity.js index 19971b8..cad1261 100644 --- a/client/js/requests/identity.js +++ b/client/js/requests/identity.js @@ -4,14 +4,7 @@ var identity = {} ; -// Fetch Status -identity.fetchStatus = function(){ - - // TODO - - return new Array("0", "user1", "25/02/2016"); -} /* diff --git a/client/partials/favicon.html b/client/partials/favicon.html index d49c651..b341f9b 100644 --- a/client/partials/favicon.html +++ b/client/partials/favicon.html @@ -1,3 +1,3 @@ - + diff --git a/client/partials/home.html b/client/partials/home.html index b00113a..3882ada 100644 --- a/client/partials/home.html +++ b/client/partials/home.html @@ -1,6 +1,6 @@
    - {{ test }} + Home
    Main Content diff --git a/client/partials/network.html b/client/partials/network.html index a520a88..341f1a0 100644 --- a/client/partials/network.html +++ b/client/partials/network.html @@ -1,6 +1,6 @@
    - {{ test }} + Network
    Main Content -- cgit v1.2.3