summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@libreoffice.org>2018-09-20 17:13:12 -0300
committerOlivier Hallot <olivier.hallot@libreoffice.org>2018-09-26 08:32:34 +0200
commita8306cd14aa3c94db34799abe7c3a322a6fb03c5 (patch)
treea99b20ae672babf5e094842d8ab7bbc3af74670e
parent62663ccf7345309232e37fdb6d08f0f0b6f595c4 (diff)
Add debug info for HID in new help
To enable Help page debug, add '&Debug=1' to the page URL. This patch pass the HID in the URL of the help page and displays it in the debug div in the bottom of the page. It should help to locate missing pages for a given HID. Change-Id: I671feb2dc34baaef5230028ba918a407d4cfea76 Reviewed-on: https://gerrit.libreoffice.org/60843 Tested-by: Jenkins Reviewed-by: Olivier Hallot <olivier.hallot@libreoffice.org>
-rw-r--r--help3xsl/index2.html2
-rw-r--r--help3xsl/online_transform.xsl5
2 files changed, 6 insertions, 1 deletions
diff --git a/help3xsl/index2.html b/help3xsl/index2.html
index 2de168ba13..01bfb442f4 100644
--- a/help3xsl/index2.html
+++ b/help3xsl/index2.html
@@ -51,7 +51,7 @@
var indx = file.indexOf('#');
var bm = file.substr(indx,file.length);
file = file.substr(0,indx);
- var newURL = lang + '/' + file + '?System=' + system + '&DbPAR=' + module + bm;
+ var newURL = lang + '/' + file + '?System=' + system + '&DbPAR=' + module + '&HID=' + bookmark + bm;
}
window.location.href = newURL;
} else {
diff --git a/help3xsl/online_transform.xsl b/help3xsl/online_transform.xsl
index 90b8a44a25..a7c3fd1e4a 100644
--- a/help3xsl/online_transform.xsl
+++ b/help3xsl/online_transform.xsl
@@ -236,6 +236,7 @@
<p>Title is: <xsl:value-of select="$title"/></p>
<p id="bm_module"></p>
<p id="bm_system"></p>
+ <p id="bm_HID"></p>
</div>
</footer>
</div>
@@ -248,12 +249,14 @@
<![CDATA[
var module = getParameterByName("DbPAR");
var system = getParameterByName("System");
+ var helpID = getParameterByName("HID");
fixURL(module,system);
var dbg = getParameterByName("Debug");
if (dbg == null){dbg=0}
document.getElementById("DEBUG").style.display = (dbg == 0) ? "none":"block";
document.getElementById("bm_module").innerHTML ="Module is: "+module;
document.getElementById("bm_system").innerHTML ="System is: "+system;
+ document.getElementById("bm_HID").innerHTML ="HID is: "+helpID;
]]>
</script>
</xsl:when>
@@ -261,6 +264,7 @@
<script type="text/javascript">
<![CDATA[
var module = getParameterByName("DbPAR");
+ var helpID = getParameterByName("HID");
var system = getSystem();
fixURL(module,system);
var dbg = getParameterByName("Debug");
@@ -268,6 +272,7 @@
document.getElementById("DEBUG").style.display = (dbg == 0) ? "none":"block";
document.getElementById("bm_module").innerHTML ="Module is: "+module;
document.getElementById("bm_system").innerHTML ="System is: "+system;
+ document.getElementById("bm_HID").innerHTML ="HID is: "+helpID;
]]>
</script>
</xsl:otherwise>