From 4d18a46ee3ada751517f9bf767d5057a3bf5eb9e Mon Sep 17 00:00:00 2001
From: rsanchez <rsanchez@curisit.net>
Date: Thu, 16 Oct 2014 18:16:33 +0000
Subject: [PATCH] #2021 feature - Added Pack management (in Beta) 

---
 securis/src/main/resources/static/js/main.js |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/securis/src/main/resources/static/js/main.js b/securis/src/main/resources/static/js/main.js
index 1406d54..1c7c442 100644
--- a/securis/src/main/resources/static/js/main.js
+++ b/securis/src/main/resources/static/js/main.js
@@ -78,10 +78,14 @@
 		    // configure html5 to get links working on jsfiddle
 		    $locationProvider.html5Mode(true);
 		    $httpProvider.interceptors.push('securisHttpInterceptor');
-		});	
+		});
+	
 	m.controller('MainCtrl', ['$scope', '$http', '$location', '$L', '$store',
 	                             function($scope, $http, $location, $L, $store) {
 		
+		$scope.currentRoute = null;
+		console.log('Current location: ' + $location);
+		console.log($location);
 		$location.path('/login');
 		if ($store.get('token') != null) {
 			
@@ -91,8 +95,10 @@
 				}
 			}).success(function(data) {
 				if (data.valid) {
-					$http.defaults.headers.common['X-SECURIS-TOKEN'] = $store.get('token'); 
-					$location.path('/licenses');
+					$http.defaults.headers.common['X-SECURIS-TOKEN'] = $store.get('token');
+					var location = $store.get('location') || '/licenses';
+
+				    $location.path(location);
 					$store.set('user', data.user);
 				}
 			});

--
Gitblit v1.3.2