[Libreoffice-commits] help.git: help3xsl/index2.html help3xsl/online_transform.xsl

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Sep 26 06:32:56 UTC 2018


 help3xsl/index2.html          |    2 +-
 help3xsl/online_transform.xsl |    5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

New commits:
commit a8306cd14aa3c94db34799abe7c3a322a6fb03c5
Author:     Olivier Hallot <olivier.hallot at libreoffice.org>
AuthorDate: Thu Sep 20 17:13:12 2018 -0300
Commit:     Olivier Hallot <olivier.hallot at libreoffice.org>
CommitDate: Wed Sep 26 08:32:34 2018 +0200

    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 at libreoffice.org>

diff --git a/help3xsl/index2.html b/help3xsl/index2.html
index 2de168ba1..01bfb442f 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 90b8a44a2..a7c3fd1e4 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>


More information about the Libreoffice-commits mailing list