@@ -57,16 +60,26 @@
-
+
+
+
-
+
+
-
-
+
+
+
+
+
+
+
+
+
diff --git a/client/js/app.js b/client/js/app.js
index 7fedb32..0e9c423 100644
--- a/client/js/app.js
+++ b/client/js/app.js
@@ -1,16 +1,16 @@
// Declare main app
-var mainApp=angular.module("mainApp",['ngRoute']);
+var mainApp=angular.module("mainApp",['ngRoute', 'ngSanitize']);
mainApp.config(['$routeProvider', function($routeProvider){
$routeProvider.
when('/home',{
- templateUrl: 'partials/home.html',
+ templateUrl: 'partials/home/main.html',
controller: 'homeCtrl'
}).
when('/network',{
- templateUrl: 'partials/network.html',
+ templateUrl: 'partials/network/main.html',
controller: 'networkCtrl'
}).otherwise({
redirectTo: '/home'
diff --git a/client/js/controllers/home.js b/client/js/controllers/home/main.js
similarity index 73%
rename from client/js/controllers/home.js
rename to client/js/controllers/home/main.js
index d4e1b0e..2898de2 100644
--- a/client/js/controllers/home.js
+++ b/client/js/controllers/home/main.js
@@ -6,5 +6,6 @@
mainApp.controller('homeCtrl', function ($scope)
{
- $scope.test="Home view";
+
+
});
\ No newline at end of file
diff --git a/client/js/controllers/login.js b/client/js/controllers/login.js
new file mode 100644
index 0000000..2f74414
--- /dev/null
+++ b/client/js/controllers/login.js
@@ -0,0 +1,39 @@
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ * Represents a book.
+ * @constructor
+ */
+mainApp.controller('loginCtrl', function ($scope,$interval,$sce)
+{
+ // Define default states
+ $('#loginModal').modal({backdrop: 'static', keyboard: false});
+ $('#loadingLoginButton').hide();
+ $('#failedToLoginAlert').hide();
+
+
+ $('#loginButton').click(function(){
+ $('#loginButton').hide();
+ $('#loadingLoginButton').show();
+ $('#failedToLoginAlert').hide();
+
+
+
+ $interval(
+ function()
+ {
+ $('#failedToLoginAlert').show();
+
+ $('#loginButton').show();
+ $('#loadingLoginButton').hide();
+
+ }, 2000,1);
+
+
+
+ });
+})
diff --git a/client/js/controllers/network.js b/client/js/controllers/network/main.js
similarity index 72%
rename from client/js/controllers/network.js
rename to client/js/controllers/network/main.js
index c2a9794..6c916ae 100644
--- a/client/js/controllers/network.js
+++ b/client/js/controllers/network/main.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 3534912..42a54d4 100644
--- a/client/js/controllers/status.js
+++ b/client/js/controllers/status.js
@@ -4,9 +4,25 @@
-mainApp.controller('statusCtrl', function ($scope)
+mainApp.controller('statusCtrl', function ($scope,$interval,$sce)
{
- $scope.username="User 1";
- $scope.connection="Online";
- $scope.lastconnection="1 Septembre";
+ $scope.username="John Doe";
+ $scope.projectname="Web Server";
+ // Update status every 2 seconds
+ /*$interval(function(){
+ var status=identity.fetchStatus();
+ $scope.username=status[1];
+ $scope.lastconnection=status[2];
+ if(status[0] == "1"){
+ $scope.connection=$sce.trustAsHtml("
Online");
+ }
+ else{
+ $scope.connection=$sce.trustAsHtml("
Offline");
+ }
+ }, 2000);*/
+
+
+
+
+
});
\ No newline at end of file
diff --git a/client/js/directives/empty b/client/js/directives/empty
deleted file mode 100644
index e69de29..0000000
diff --git a/client/js/filters/empty b/client/js/filters/empty
deleted file mode 100644
index e69de29..0000000
diff --git a/client/js/requests/identity.js b/client/js/requests/identity.js
new file mode 100644
index 0000000..cad1261
--- /dev/null
+++ b/client/js/requests/identity.js
@@ -0,0 +1,42 @@
+
+// Make Namespace
+var identity = {} ;
+
+
+
+
+
+
+/*
+mainApp.controller('identityCtrl', function($scope, $http) {
+
+ $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;
+ }
+ });
+ };
+
+
+
+});*/
+
+
+
diff --git a/client/js/services/empty b/client/js/services/empty
deleted file mode 100644
index e69de29..0000000
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/network.html b/client/partials/home/main.html
similarity index 80%
rename from client/partials/network.html
rename to client/partials/home/main.html
index a520a88..7a5045a 100644
--- a/client/partials/network.html
+++ b/client/partials/home/main.html
@@ -1,9 +1,8 @@
- {{ test }}
+ Home
Main Content
-
-