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

Olivier Hallot olivier.hallot at libreoffice.org
Wed Feb 7 15:18:34 UTC 2018


 help3xsl/get_url.xsl |    2 +-
 help3xsl/index2.html |    5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

New commits:
commit fd1e80bca4d05e1dac45fb226dff318e87b81ead
Author: Olivier Hallot <olivier.hallot at libreoffice.org>
Date:   Tue Feb 6 14:45:29 2018 +0100

    Add anchor to branch bookmarks in hid-to-file
    
    Add the id="bm_nnnnnn" as anchor to get the html file
    displayed in the right position.
    
    Change-Id: Icf50119d7b4f7846abc2a128ccdf9d3ab77a50c2
    Reviewed-on: https://gerrit.libreoffice.org/49299
    Reviewed-by: Olivier Hallot <olivier.hallot at libreoffice.org>
    Tested-by: Olivier Hallot <olivier.hallot at libreoffice.org>

diff --git a/help3xsl/get_url.xsl b/help3xsl/get_url.xsl
index f7a032749..0f9a3f1a5 100644
--- a/help3xsl/get_url.xsl
+++ b/help3xsl/get_url.xsl
@@ -57,7 +57,7 @@ parameters in URLS-->
             <xsl:otherwise><xsl:value-of select="concat(substring-before($aux,'?'),'%3F',substring-after($aux,'?'))"/></xsl:otherwise>
         </xsl:choose>
         <xsl:text>':'</xsl:text>
-        <xsl:value-of select="$href"/><xsl:text>',&#xA;</xsl:text>
+	<xsl:value-of select="concat($href,'#', at id)"/><xsl:text>',&#xA;</xsl:text>
     </xsl:for-each>
 </xsl:template>
 </xsl:stylesheet>
diff --git a/help3xsl/index2.html b/help3xsl/index2.html
index f30348b98..578acbbd2 100644
--- a/help3xsl/index2.html
+++ b/help3xsl/index2.html
@@ -41,7 +41,10 @@
     if (file === undefined){
     file = defaultFile;
     }
-    var newURL = lang + '/' + file + '?System=' + system + '&DbPAR=' + module;
+    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;
     window.open(newURL,'_self');
     }else{
     // URL came from elsewhere, direct access to webroot, we redirect to main Help page


More information about the Libreoffice-commits mailing list