From fa7277f86acdf13dcb6060751dd8a15540b1c2a4 Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Wed, 22 Oct 2014 16:57:54 -0400 Subject: [PATCH] removed the link on the tower logo in portal mode while in portal mode the tower logo should not take you to the tower dashboard. I removed the href while in portal mode. I also added a function for leaving portal mode which takes the user back to tower dashboardremoved the link on the tower logo in portal mode --- awx/ui/static/js/app.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/awx/ui/static/js/app.js b/awx/ui/static/js/app.js index b3dd266a63..1d6390c11b 100644 --- a/awx/ui/static/js/app.js +++ b/awx/ui/static/js/app.js @@ -470,10 +470,13 @@ angular.module('Tower', [ //base.replace(/\_/g, ' '); base = (base === 'job_events' || base === 'job_host_summaries') ? 'jobs' : base; } - + //make sure that the tower icon works when not in portal mode + $('.navbar-brand').attr('href', '/#/home'); $rootScope.portalMode=false; if(base==='portal'){ $rootScope.portalMode= true; + //in portal mode we don't want the tower icon to lead anywhere + $('.navbar-brand').removeAttr('href'); } $('#ansible-list-title').html('' + base.replace(/\_/,' ') + ''); @@ -579,6 +582,10 @@ angular.module('Tower', [ ShowSocketHelp(); }; + $rootScope.leavePortal = function() { + $location.path('/home/'); + }; + html = ""; e = angular.element(document.getElementById('socket-beacon-div'));