From 96094547dd793868092dda4c2699a839287fa175 Mon Sep 17 00:00:00 2001 From: manzerbredes Date: Sun, 6 Mar 2016 14:51:50 +0100 Subject: Add image view, controller. --- client/index.html | 1 + client/js/app.js | 8 ++++++-- client/js/controllers/image/image.js | 9 +++++++++ client/partials/home/home.html | 12 ++++++++++++ client/partials/home/main.html | 12 ------------ client/partials/image/image.html | 8 ++++++++ client/partials/menu.html | 3 ++- client/partials/network/main.html | 8 -------- client/partials/network/network.html | 8 ++++++++ 9 files changed, 46 insertions(+), 23 deletions(-) create mode 100644 client/js/controllers/image/image.js create mode 100644 client/partials/home/home.html delete mode 100644 client/partials/home/main.html create mode 100644 client/partials/image/image.html delete mode 100644 client/partials/network/main.html create mode 100644 client/partials/network/network.html diff --git a/client/index.html b/client/index.html index 48ea4a0..a06994c 100644 --- a/client/index.html +++ b/client/index.html @@ -89,6 +89,7 @@ + diff --git a/client/js/app.js b/client/js/app.js index e2d5b9b..1602e65 100644 --- a/client/js/app.js +++ b/client/js/app.js @@ -13,12 +13,16 @@ mainApp.config(['$routeProvider', function($routeProvider){ $routeProvider. when('/home',{ - templateUrl: 'partials/home/main.html', + templateUrl: 'partials/home/home.html', controller: 'homeCtrl' }). when('/network',{ - templateUrl: 'partials/network/main.html', + templateUrl: 'partials/network/network.html', controller: 'networkCtrl' + }). + when('/image',{ + templateUrl: 'partials/image/image.html', + controller: 'imageCtrl' }).otherwise({ redirectTo: '/home' }); diff --git a/client/js/controllers/image/image.js b/client/js/controllers/image/image.js new file mode 100644 index 0000000..036dec3 --- /dev/null +++ b/client/js/controllers/image/image.js @@ -0,0 +1,9 @@ +/** + * The image controller + * + * @param {$scope} $scope The $scope service from angular + */ +mainApp.controller('imageCtrl', function ($scope) +{ + $scope.title="Test"; +}); diff --git a/client/partials/home/home.html b/client/partials/home/home.html new file mode 100644 index 0000000..f9f8878 --- /dev/null +++ b/client/partials/home/home.html @@ -0,0 +1,12 @@ +
+
+ Home +
+
+ + Pour charger les machines, recharger la page (temporaire)
+ Selectionner une machine: +
{{ machine.name }}
+ +
+
diff --git a/client/partials/home/main.html b/client/partials/home/main.html deleted file mode 100644 index f9f8878..0000000 --- a/client/partials/home/main.html +++ /dev/null @@ -1,12 +0,0 @@ -
-
- Home -
-
- - Pour charger les machines, recharger la page (temporaire)
- Selectionner une machine: -
{{ machine.name }}
- -
-
diff --git a/client/partials/image/image.html b/client/partials/image/image.html new file mode 100644 index 0000000..586f003 --- /dev/null +++ b/client/partials/image/image.html @@ -0,0 +1,8 @@ +
+
+ Image +
+
+ Main Content +
+
diff --git a/client/partials/menu.html b/client/partials/menu.html index dfd5842..a473fd8 100644 --- a/client/partials/menu.html +++ b/client/partials/menu.html @@ -1,4 +1,5 @@
Home Network -
\ No newline at end of file + Images + diff --git a/client/partials/network/main.html b/client/partials/network/main.html deleted file mode 100644 index 8b779be..0000000 --- a/client/partials/network/main.html +++ /dev/null @@ -1,8 +0,0 @@ -
-
- Network -
-
- Main Content -
-
diff --git a/client/partials/network/network.html b/client/partials/network/network.html new file mode 100644 index 0000000..8b779be --- /dev/null +++ b/client/partials/network/network.html @@ -0,0 +1,8 @@ +
+
+ Network +
+
+ Main Content +
+
-- cgit v1.2.3