summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authormanzerbredes <loic.guegan_secondary@yahoo.fr>2016-03-30 14:14:10 +0200
committermanzerbredes <loic.guegan_secondary@yahoo.fr>2016-03-30 14:14:10 +0200
commit237b627bf6cdf31e8923fc67653a73b6b9978540 (patch)
tree20449eb6aee87f582639ad6e3bd5dcf3dc06ecfa /client
parentf4da4f285a4689e1d4eb8bb7d800d6570dfba6d0 (diff)
parentb6ffc16d78e3fd22f9d728d45cef1c78c182cc1f (diff)
Merge branch 'develop' into loic
Diffstat (limited to 'client')
-rw-r--r--client/Test/index.html19
-rw-r--r--client/js/services/Network.js27
-rw-r--r--client/js/services/Test.js8
3 files changed, 54 insertions, 0 deletions
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 @@
+<head>
+
+<script src="../vendors/angularjs/angular.min.js"></script>
+ <script src="../vendors/angularjs/angular-route.min.js"></script>
+ <script src="../vendors/angularjs/angular-sanitize.min.js"></script>
+ <script src="../vendors/angularjs/angular-cookies.min.js"></script>
+ <script src="../js/services/Test.js"></script>
+ <script src="../js/app.js"></script>
+</head>
+
+<body ng-app="mainApp">
+ <div ng-controller="hassan">
+ <ul>
+ <li ng-repeat="person in persons">
+ {{person.Name + ' : ' + person.Age}}
+ </li>
+ </ul>
+ </div>
+</body>
diff --git a/client/js/services/Network.js b/client/js/services/Network.js
new file mode 100644
index 0000000..bd2a24f
--- /dev/null
+++ b/client/js/services/Network.js
@@ -0,0 +1,27 @@
+
+mainApp.factory('Network',[ '$http', 'Identity', function($http, Identity){
+
+ var data={};
+ data.networks=null;
+
+var ListId=function(fileToUpload, callback) {
+
+
+ var result=$http.post('../server/index.php',
+ $.param({"token" : Identity.getToken(), "task" : "network", 'action':'list_network_ids'}));
+
+ // Wait and handle the response
+ result.then(function (response){
+ callback(parseUploadImageAnswer(response, false));
+ },function(response){
+ callback(parseUploadImageAnswer(response, true));
+ });
+
+ console.log(result)
+
+ }
+
+
+}]);
+
+
diff --git a/client/js/services/Test.js b/client/js/services/Test.js
new file mode 100644
index 0000000..f12c6b9
--- /dev/null
+++ b/client/js/services/Test.js
@@ -0,0 +1,8 @@
+var app = angular.module('mainApp',[]);
+app.controller('hassan', function($scope,$http){
+ $http.get('http://127.0.0.1/database.json').success(function(response){
+ $scope.persons = response.records;
+});
+
+
+});