From 756e74f7cc027d67e90c9e7554f52ce0de754726 Mon Sep 17 00:00:00 2001 From: Lim Han Date: Tue, 3 Feb 2015 21:11:09 +0800 Subject: [PATCH] LH :: Updated the structure so that it's more in line with wireframe - Added logic to display login/logout and navbar menu --- src/main/webapp/WEB-INF/jsp/index.jsp | 3 +++ src/main/webapp/components/header.html | 20 +++++++-------- .../{main => landing}/_add_owner.html | 0 .../{main => landing}/_appointment.html | 0 .../{main => landing}/_client_profiles.html | 0 .../{main => landing}/_companies.html | 0 .../{main => landing}/_services.html | 0 .../{main => landing}/_testimonials.html | 0 .../{main/main.html => landing/landing.html} | 13 ++++------ .../webapp/components/main/MainController.js | 12 +++++++++ src/main/webapp/components/owners/owners.html | 2 +- src/main/webapp/js/app.js | 25 ++++++------------- 12 files changed, 38 insertions(+), 37 deletions(-) rename src/main/webapp/components/{main => landing}/_add_owner.html (100%) rename src/main/webapp/components/{main => landing}/_appointment.html (100%) rename src/main/webapp/components/{main => landing}/_client_profiles.html (100%) rename src/main/webapp/components/{main => landing}/_companies.html (100%) rename src/main/webapp/components/{main => landing}/_services.html (100%) rename src/main/webapp/components/{main => landing}/_testimonials.html (100%) rename src/main/webapp/components/{main/main.html => landing/landing.html} (62%) diff --git a/src/main/webapp/WEB-INF/jsp/index.jsp b/src/main/webapp/WEB-INF/jsp/index.jsp index f5eb87bc2..5ee07724e 100644 --- a/src/main/webapp/WEB-INF/jsp/index.jsp +++ b/src/main/webapp/WEB-INF/jsp/index.jsp @@ -33,6 +33,9 @@ + + + diff --git a/src/main/webapp/components/header.html b/src/main/webapp/components/header.html index fec7efac5..40a8e9065 100644 --- a/src/main/webapp/components/header.html +++ b/src/main/webapp/components/header.html @@ -2,7 +2,7 @@
- - - + - + - + - + - - + \ No newline at end of file diff --git a/src/main/webapp/components/main/MainController.js b/src/main/webapp/components/main/MainController.js index 1f9641e0d..f89a37040 100644 --- a/src/main/webapp/components/main/MainController.js +++ b/src/main/webapp/components/main/MainController.js @@ -1,5 +1,17 @@ var MainController = function($scope, $rootScope, $state) { + $scope.getSession = function() { + return $scope.session; + }; + + $scope.login = function() { + $scope.session = { 'username' : 'test' }; + }; + + $scope.logout = function() { + $scope.session = null; + }; + $scope.menuTabs = [ { 'name' : 'Main Page', 'url' : '#', diff --git a/src/main/webapp/components/owners/owners.html b/src/main/webapp/components/owners/owners.html index 104b6d311..5b017ad73 100644 --- a/src/main/webapp/components/owners/owners.html +++ b/src/main/webapp/components/owners/owners.html @@ -19,7 +19,7 @@ -
+