From b9f2cef1adcce8b3991b0eff73b1eb8f11fce3cb Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 2 Jun 2015 19:59:35 +0200 Subject: [PATCH] LogABug: Publish URL of current page Add the URL of the current page to the comment section when reporting a bug. The clouddocs-maven-plugin did this and it is helpful to quickly locate the page where the error was reported against. Change-Id: Ia104739b7f4140c35d23c80c57ec52261268a1bf --- openstackdocstheme/theme/openstackdocs/static/js/docs.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/openstackdocstheme/theme/openstackdocs/static/js/docs.js b/openstackdocstheme/theme/openstackdocs/static/js/docs.js index 6f82ffac..c020a761 100644 --- a/openstackdocstheme/theme/openstackdocs/static/js/docs.js +++ b/openstackdocstheme/theme/openstackdocs/static/js/docs.js @@ -129,8 +129,10 @@ $('div.warning > p.admonition-title').text(function(ignored_para,original) { function logABug(bugTitle, fieldComment, fieldTags) { var lineFeed = "%0A"; var urlBase = "https://bugs.launchpad.net/openstack-manuals/+filebug?field.title=" + var currentURL = "URL: " + window.location.href; var bugLink = urlBase + encodeURIComponent(bugTitle) + "&field.comment=" + lineFeed + lineFeed + "-----------------------------------" + lineFeed + fieldComment + + lineFeed + currentURL + "&field.tags=" + fieldTags; document.getElementById("logABugLink1").href=bugLink; document.getElementById("logABugLink2").href=bugLink;