From 7d402cf9c8a767243b01fac545200436c37d8e61 Mon Sep 17 00:00:00 2001 From: Brian French Date: Fri, 6 Mar 2020 11:02:22 -0500 Subject: [PATCH] Update nav-links.ctp --- src/Template/Element/nav-links.ctp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Template/Element/nav-links.ctp b/src/Template/Element/nav-links.ctp index 92b276c..e11451a 100644 --- a/src/Template/Element/nav-links.ctp +++ b/src/Template/Element/nav-links.ctp @@ -49,7 +49,17 @@ use Cake\Routing\Router; $(document).ready(function() { /** - * This updates the urls for the jira links so the + * Initially update the referer. + */ + $('.jira-menu .jira-body a.jira-link').each(function(e) + { + var $href = $(this).attr('href'); + console.log($href); + $href = $href.replace(/\?referer\=.*/, '?referer=' + encodeURI(window.location.href)); + $(this).attr('href', $href); + }); + /** + * This updates the urls for the jira links when the url changes so the * submitted issue has an accurate url being reported. */ $(window).bind('locationchange', function()