summaryrefslogtreecommitdiff
path: root/help3xsl
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@libreoffice.org>2018-02-06 14:45:29 +0100
committerOlivier Hallot <olivier.hallot@libreoffice.org>2018-02-07 16:18:09 +0100
commitfd1e80bca4d05e1dac45fb226dff318e87b81ead (patch)
tree2800747abce0ef4df7619cde9c84643d651b479a /help3xsl
parent0f7a354db93f0affe218cae7e0ea294a4efe5891 (diff)
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@libreoffice.org> Tested-by: Olivier Hallot <olivier.hallot@libreoffice.org>
Diffstat (limited to 'help3xsl')
-rw-r--r--help3xsl/get_url.xsl2
-rw-r--r--help3xsl/index2.html5
2 files changed, 5 insertions, 2 deletions
diff --git a/help3xsl/get_url.xsl b/help3xsl/get_url.xsl
index f7a032749a..0f9a3f1a5d 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,'#',@id)"/><xsl:text>',&#xA;</xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
diff --git a/help3xsl/index2.html b/help3xsl/index2.html
index f30348b98b..578acbbd22 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