summaryrefslogtreecommitdiffstats
path: root/ecomp-portal-FE-common/client/app/views/tabs/tabs.controller.js
diff options
context:
space:
mode:
authorChristopher Lott (Christopher) (cl778h) <clott@vm-ep-dev2.client.research.att.com>2017-06-12 09:49:00 -0400
committerChristopher Lott (cl778h) <clott@research.att.com>2017-06-12 13:42:43 -0400
commit627badaf69987c01811c477219fd943757a635f5 (patch)
tree97df9449a411d1ecf830cc76d8afd6f9b5677bda /ecomp-portal-FE-common/client/app/views/tabs/tabs.controller.js
parentba838f2e13f1e8050c75e68bd3733d56d8f416d5 (diff)
[PORTAL-16 PORTAL-18] Widget ms; staging
Remove staging repositories from poms. Add widget microservice code base. Add portal unit tests. Repair defects. Normalize line endings. Change-Id: Ia5e48da2a3141b352439ecd548cddf918f4df585 Signed-off-by: Christopher Lott (cl778h) <clott@research.att.com>
Diffstat (limited to 'ecomp-portal-FE-common/client/app/views/tabs/tabs.controller.js')
-rw-r--r--ecomp-portal-FE-common/client/app/views/tabs/tabs.controller.js17
1 files changed, 12 insertions, 5 deletions
diff --git a/ecomp-portal-FE-common/client/app/views/tabs/tabs.controller.js b/ecomp-portal-FE-common/client/app/views/tabs/tabs.controller.js
index 5a5b7e49..bab9ba5c 100644
--- a/ecomp-portal-FE-common/client/app/views/tabs/tabs.controller.js
+++ b/ecomp-portal-FE-common/client/app/views/tabs/tabs.controller.js
@@ -33,6 +33,12 @@
$rootScope.showFooter = "";
$cookies.putObject('show_app_header', false,{domain: cookieDomain, path : '/'});
+ let getCookieDomain = function() {
+ return window.location.hostname;
+ }
+ let getContextPath=function() {
+ return window.location.pathname.substring( 0, window.location.pathname.lastIndexOf( '/' ) + 1 );
+ }
let noRefresh = function () {
window.onbeforeunload = function(e) {
@@ -72,8 +78,9 @@
if ($scope.tabs.length > 1) {
noRefresh();
}
- $cookies.putObject('cookieTabs', $scope.tabs,{domain: cookieDomain, path : '/'});
- $cookies.putObject('visInVisCookieTabs', $scope.tabs,{domain: cookieDomain, path : '/'});
+ $cookies.putObject('cookieTabs', $scope.tabs,{domain: getCookieDomain(), path : getContextPath()});
+ $cookies.putObject('visInVisCookieTabs', $scope.tabs,{domain: getCookieDomain(), path : getContextPath()});
+
}
};
@@ -92,8 +99,8 @@
if ($scope.tabs.length > 1) {
noRefresh();
}
- $cookies.putObject('cookieTabs', $scope.tabs,{domain: cookieDomain, path : '/'});
- $cookies.putObject('visInVisCookieTabs', $scope.tabs,{domain: cookieDomain, path : '/'});
+ $cookies.putObject('cookieTabs', $scope.tabs,{domain: getCookieDomain(), path : getContextPath()});
+ $cookies.putObject('visInVisCookieTabs', $scope.tabs,{domain: getCookieDomain(), path : getContextPath()});
}
};
@@ -124,7 +131,7 @@
event.preventDefault();
event.stopPropagation();
$scope.tabs.splice(index, 1);
- $cookies.putObject('cookieTabs', $scope.tabs,{domain: cookieDomain, path : '/'});
+ $cookies.putObject('cookieTabs', $scope.tabs,{domain: getCookieDomain(), path : getContextPath()});
};
//adjust height of the tab due to the search popup being hidden