help3xsl/get_url.xsl | 2 +- help3xsl/index2.html | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-)
New commits: commit fd1e80bca4d05e1dac45fb226dff318e87b81ead Author: Olivier Hallot <olivier.hal...@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.hal...@libreoffice.org> Tested-by: Olivier Hallot <olivier.hal...@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>',
</xsl:text> + <xsl:value-of select="concat($href,'#',@id)"/><xsl:text>',
</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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits