[Libreoffice-commits] help.git: source/default.css source/get_bookmark.sh source/get_bookmark.xsl source/HELP-IN-BROWSER-README.txt source/help.js source/help-to-html.sh source/online_transform.xsl
Olivier Hallot
olivier.hallot at libreoffice.org
Wed Jun 14 11:03:52 UTC 2017
source/HELP-IN-BROWSER-README.txt | 3
source/default.css | 133 +++++++++++++++++++++++++++++---------
source/get_bookmark.sh | 25 +++++--
source/get_bookmark.xsl | 79 ++++++++++++++++------
source/help-to-html.sh | 87 ++++++++++++++++++++----
source/help.js | 102 ++++++++++++++++-------------
source/online_transform.xsl | 120 +++++++++++++++++++++++++---------
7 files changed, 396 insertions(+), 153 deletions(-)
New commits:
commit 344d2132259ef22202a197f6cab66101fb0fd167
Author: Olivier Hallot <olivier.hallot at libreoffice.org>
Date: Wed Jun 7 10:20:44 2017 -0300
Help contents -in-browser (III)
Added language selector
Added system selector
CSS improvements in browser help page
remove bullets from bookmark list
see http://vm173.documentfoundation.org
Change-Id: I6b65e7e3c5a503855a8e92f2a745ba6001d64b8e
Reviewed-on: https://gerrit.libreoffice.org/38712
Reviewed-by: Olivier Hallot <olivier.hallot at edx.srv.br>
Tested-by: Olivier Hallot <olivier.hallot at edx.srv.br>
diff --git a/source/HELP-IN-BROWSER-README.txt b/source/HELP-IN-BROWSER-README.txt
index 159c13482..680f433c7 100644
--- a/source/HELP-IN-BROWSER-README.txt
+++ b/source/HELP-IN-BROWSER-README.txt
@@ -65,7 +65,8 @@ Maps to HTML5 <object> tag:
How to build the LibreOffice Browser help
-----------------------------------------------------------------
-1) run help-to-html.sh
+1) run help-to-html.sh in helpcontent2/source/ folder. A previous language build must exist in workdir/HelpTranslatePartHelp/ .
+The script will build all existing languages available in this folder. See help-to-html.sh script and adjust path.
2) copy folder html/ to your root web server.
diff --git a/source/default.css b/source/default.css
index f13f61f75..be9a1af27 100644
--- a/source/default.css
+++ b/source/default.css
@@ -173,18 +173,12 @@ h4, h5, h6 {
border: solid 1px #18A303;
}
-.indexlink {
- font-size: 10pt;
- margin-top: 2px;
- margin-bottom: 2px;
-}
-
#DisplayArea {
position: fixed;
- bottom: 5px;
- right: 5px;
+ bottom: 1px;
+ right: 1px;
left: 30%;
- top: 10%;
+ top: 79px;
overflow: auto;
border: solid 1px;
padding: 10px;
@@ -192,40 +186,42 @@ h4, h5, h6 {
#BottomLeft {
position: fixed;
- bottom: 5px;
- left: 5px;
+ bottom: 1px;
+ left: 1px;
overflow: auto;
right: 70%;
- top: 10%;
+ top: 79px;
border-top: solid 1px;
border-left: solid 1px;
border-bottom: solid 1px;
padding: 10px;
+ list-style-type: none;
}
#TopRight {
position: fixed;
- right: 0px;
- top: 0px;
+ right: 1px;
+ top: 1px;
left: 70%;
- bottom: 90%;
}
#TopLeft {
- left: 0px;
+ left: 1px;
+ position: fixed;
+ top: 35px;
+}
+
+#TopLang {
+ left: 1px;
position: fixed;
- top: 0px;
- bottom: 90%;
+ top: 1px;
+ right:30%
}
-#NavigationHistory {
- top: 5px;
- float: right;
- text-align: right;
- color: #18A303;
- font-weight: 700;
- font-size: 0.625rem;
- cursor: pointer;
+#TopSystem {
+top: 35px;
+left: 600px;
+position: fixed;
}
.mediabutton {
@@ -246,29 +242,104 @@ h4, h5, h6 {
.embedded {
}
// Top menu navidation
-nav {
+#TopLeft nav {
background-color: #333;
margin: 0;
overflow: hidden;
}
-nav ul{
+#TopLeft nav ul{
margin: 0;
padding: 0;
}
-nav ul li {
+#TopLeft nav ul li {
/* This allow us to arrange list items in a row, without using float */
display: inline-block;
list-style-type: none;
}
/* Create a style for the first level items */
-nav > ul > li > a {
+#TopLeft nav > ul > li > a {
color: #FFFFFF;
background-color:#18A303;
display: block;
- line-height: 2em;
+ line-height: 1.5em;
padding: 0.5em 0.5em;
text-decoration: none;
+ font-weight: bold;
+ border:1px solid;
+ border-color:#333333;
+ font-size: 11pt;
+}
+
+// Top menu languages
+#TopLang nav {
+ background-color: #333;
+ margin: 0;
+ overflow: hidden;
+}
+#TopLang nav ul{
+ margin: 0;
+ padding: 0;
+}
+#TopLang nav ul li {
+ /* This allow us to arrange list items in a row, without using float */
+ display: inline-block;
+ list-style-type: none;
+}
+
+/* Create a style for the first level items */
+#TopLang nav > ul > li > a {
+ color: #333333;
+ background-color:#EEEEEE;
+ display: block;
+ line-height: 1.5em;
+ padding: 0.2em 0.4em;
+ text-decoration: none;
+ font-weight: bold;
+ border:1px solid;
+ border-color:#333333;
+ font-size: 10pt;
+}
+
+#BottomLeft ul > li{
+ list-style-type: none;
+ font-size:11pt;
}
+#SearchBox p {
+ background-color: #c2f6ba;
+ font-size: 16pt;
+ font-weight: bold;
+ line-height:2em;
+ border: 1px solid #18A303;
+}
+// Top menu System
+#TopSystem nav {
+ background-color: #333;
+ margin: 0;
+ overflow: hidden;
+}
+#TopSystem nav ul{
+ margin: 0;
+ padding: 0;
+}
+#TopSystem nav ul li {
+ /* This allow us to arrange list items in a row, without using float */
+ display: inline-block;
+ list-style-type: none;
+}
+
+/* Create a style for the first level items */
+#TopSystem nav > ul > li > a {
+ color: #FFFFFF;
+ background-color:blue;
+ display: block;
+ line-height: 1.5em;
+ padding: 0.5em 0.5em;
+ text-decoration: none;
+ font-weight: bold;
+ border:1px solid;
+ border-color:#333333;
+ font-size: 11pt;
+}
diff --git a/source/get_bookmark.sh b/source/get_bookmark.sh
index 8c8849269..c83da41bc 100755
--- a/source/get_bookmark.sh
+++ b/source/get_bookmark.sh
@@ -6,39 +6,50 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-outdir=$1
-
-ffile=$outdir'bookmarks.js'
+outdir=$1$2
+mkdir -p $outdir
+sourcedir=`pwd`/
+ffile=$outdir'/bookmarks.js'
rm -f $ffile
ffile2=temp.html
stub2=\'
+xslfile=$outdir/../../get_bookmark.xsl
+
+# bookmarks for modules
for i in CALC CHART WRITER DRAW IMPRESS MATH BASIC
do
stub1='document.getElementById("bookmark'$i'").innerHTML='\'\\
-sfind=`echo 'text/s'$i | tr '[:upper:]' '[:lower:]'`
+sfind=$sourcedir`echo 'text/s'$i | tr '[:upper:]' '[:lower:]'`
param='--stringparam app '$i
+param=$param' --stringparam Language '$2
rm -f $ffile2
-find $sfind -type f -name "*.xhp" -exec xsltproc $param get_bookmark.xsl {} + >> $ffile2
+find $sfind -type f -name "*.xhp" -exec xsltproc $param $xslfile {} + >> $ffile2
echo $stub1 >> $ffile
sort -k3b -t\> -s -o $ffile2 $ffile2
awk 'NF' $ffile2 >> $ffile
echo $stub2 >> $ffile
done
+# Case of SHARED
+
stub1='document.getElementById("bookmarkSHARED").innerHTML='\'\\
rm -f $ffile2
param='--stringparam app SHARED'
-find text/shared -type f -name "*.xhp" -exec xsltproc $param get_bookmark.xsl {} + >> $ffile2
+param=$param' --stringparam Language '$2
+find $sourcedir'text/shared' -type f -name "*.xhp" -exec xsltproc $param $xslfile {} + >> $ffile2
echo $stub1 >> $ffile
sort -k3b -t\> -s -o $ffile2 $ffile2
awk 'NF' $ffile2 >> $ffile
echo $stub2 >> $ffile
+# Case of Explorer (BASE)
+
stub1='document.getElementById("bookmarkBASE").innerHTML='\'\\
rm -f $ffile2
param='--stringparam app BASE'
-find text/shared/explorer/database -type f -name "*.xhp" -exec xsltproc $param get_bookmark.xsl {} + >> $ffile2
+param=$param' --stringparam Language '$2
+find $sourcedir'text/shared/explorer/database' -type f -name "*.xhp" -exec xsltproc $param $xslfile {} + >> $ffile2
echo $stub1 >> $ffile
sort -k3b -t\> -s -o $ffile2 $ffile2
awk 'NF' $ffile2 >> $ffile
diff --git a/source/get_bookmark.xsl b/source/get_bookmark.xsl
index b09b038cd..47441f406 100644
--- a/source/get_bookmark.xsl
+++ b/source/get_bookmark.xsl
@@ -11,13 +11,16 @@
Stylesheet to extract index bookmarks from xhp files and output a link to
the xhp file.
Usage:
-xsltproc get_bookmark.xsl file.xhp
+xsltproc get_bookmark.xsl <file.xhp>
-->
-<xsl:stylesheet version="1.0"
-xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
<xsl:param name="app"/>
+<xsl:param name="Language"/>
+<xsl:param name="productname" select="'LibreOffice'"/>
+<xsl:param name="productversion" select="'5.2'"/>
-<xsl:output indent="yes" method="html"/>
+<xsl:output indent="yes" method="text"/>
<!--
############################
@@ -40,8 +43,6 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:variable name="brand2" select="'$[officeversion]'"/>
<xsl:variable name="brand3" select="'%PRODUCTNAME'"/>
<xsl:variable name="brand4" select="'%PRODUCTVERSION'"/>
-<xsl:param name="productname" select="'LibreOffice'"/>
-<xsl:param name="productversion" select="'5.2'"/>
<!--
#############
# Templates #
@@ -51,23 +52,59 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- Extract the bookmarks-->
<xsl:template match="/">
<xsl:for-each select="//bookmark[@branch='index']">
- <xsl:variable name="hrefhtml" select="substring-before($filename,'xhp')"/>
- <xsl:variable name="href" select="concat($hrefhtml,'html?DbPAR=',$app,'#', at id)"/>
+ <xsl:variable name="hrefhtml" select="substring-before($filename,'xhp')"/>
+ <xsl:variable name="href" select="concat($Language,'/',$hrefhtml,'html?DbPAR=',$app,'#', at id)"/>
<xsl:for-each select="bookmark_value">
- <li><a href="{$href}" target="_top">
- <xsl:call-template name="brand"><xsl:with-param name="string">
+ <xsl:variable name="here1">
+
+ <xsl:text disable-output-escaping="yes"><![CDATA[<li><a target="_top" href="]]></xsl:text>
+ <xsl:value-of select="$href"/>
+ <xsl:text disable-output-escaping="yes"><![CDATA["</a>]]></xsl:text>
+
+ <xsl:call-template name="apostrophe"><xsl:with-param name="string">
<xsl:value-of select="."/>
</xsl:with-param></xsl:call-template>
- </a></li><xsl:text>\
</xsl:text>
+
+ </xsl:variable>
+
+ <xsl:call-template name="brand"><xsl:with-param name="string">
+ <xsl:value-of select="$here1"/>
+ </xsl:with-param></xsl:call-template>
+
+ <xsl:text disable-output-escaping="yes"><![CDATA[</li>\]]>
</xsl:text>
</xsl:for-each>
</xsl:for-each>
</xsl:template>
+<!-- weird characters inside bookmarks, replace by HTML entities-->
+<xsl:template name="apostrophe">
+ <xsl:param name="string"/>
+ <xsl:variable name="apost">'</xsl:variable><!-- apostrophe -->
+ <xsl:choose>
+ <xsl:when test="contains($string,$apost)">
+ <xsl:variable name="newstr">
+ <xsl:value-of select="substring-before($string,$apost)"/>
+ <xsl:text disable-output-escaping="yes"><![CDATA[&]]>#39;</xsl:text>
+ <xsl:value-of select="substring-after($string,$apost)"/>
+ </xsl:variable>
+ <xsl:call-template name="apostrophe">
+ <xsl:with-param name="string" select="$newstr"/>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="$string"/>
+ </xsl:otherwise>
+ </xsl:choose>
+</xsl:template>
+
<!-- Branding -->
<xsl:template match="text()">
<xsl:call-template name="brand">
<xsl:with-param name="string"><xsl:value-of select="."/></xsl:with-param>
</xsl:call-template>
+ <xsl:call-template name="apostrophe">
+ <xsl:with-param name="string"><xsl:value-of select="."/></xsl:with-param>
+ </xsl:call-template>
</xsl:template>
@@ -82,21 +119,21 @@ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:value-of select="$productname"/>
<xsl:value-of select="substring-after($string,$brand1)"/>
</xsl:variable>
- <xsl:call-template name="brand">
- <xsl:with-param name="string" select="$newstr"/>
- </xsl:call-template>
- </xsl:when>
+ <xsl:call-template name="brand">
+ <xsl:with-param name="string" select="$newstr"/>
+ </xsl:call-template>
+ </xsl:when>
- <xsl:when test="contains($string,$brand2)">
- <xsl:variable name="newstr">
+ <xsl:when test="contains($string,$brand2)">
+ <xsl:variable name="newstr">
<xsl:value-of select="substring-before($string,$brand2)"/>
<xsl:value-of select="$pversion"/>
<xsl:value-of select="substring-after($string,$brand2)"/>
</xsl:variable>
- <xsl:call-template name="brand">
- <xsl:with-param name="string" select="$newstr"/>
- </xsl:call-template>
- </xsl:when>
+ <xsl:call-template name="brand">
+ <xsl:with-param name="string" select="$newstr"/>
+ </xsl:call-template>
+ </xsl:when>
<xsl:when test="contains($string,$brand3)">
<xsl:variable name="newstr">
diff --git a/source/help-to-html.sh b/source/help-to-html.sh
index 4dbfeeed6..f17b439c0 100755
--- a/source/help-to-html.sh
+++ b/source/help-to-html.sh
@@ -6,22 +6,75 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-outdir=html/
-filter=online_transform.xsl
-rm -rf $outdir
-mkdir $outdir
-cp default.css help.js jquery-3.1.1.min.js $outdir
-cp -rap media $outdir'media'
-./get_bookmark.sh $outdir
-for filep in `find text/ -name *.xhp`
+#
+#Languages are merged in XHP files in
+# workdir/HelpTranslatePartTarget/
+#
+
+#
+# location of the script is in core/helpcontent2/source/ = sourceDir
+#
+sourceDir=`pwd`
+#
+# Location of the merged l10n help files from sourceDir
+#
+langDirSource=../../workdir/HelpTranslatePartTarget/
+
+# Uggly hack: copy en-US from sourcedir to HelpTranslatePartTarget...
+rm -rf $langDirSource/en-US
+mkdir -p $langDirSource/en-US/helpcontent2/source
+cp -r $sourceDir/text/ $langDirSource/en-US/helpcontent2/source/
+
+
+#
+# Location of the resulting html
+#
+outDir=$sourceDir/html/
+
+filter=$sourceDir/online_transform.xsl
+
+#clean and recreate the resulting html
+rm -rf $outDir
+mkdir $outDir
+
+#copy some service files
+cp default.css help.js jquery-3.1.1.min.js $outDir
+cp -rap media $outDir
+
+# Change to the merged l10 root folder
+cd $langDirSource
+
+# get absolute path of merged l10n files
+langDirSource=`pwd`
+
+# iterate existing languages
+for lang in `ls $langDirSource`
do
-DIR=${filep%/*}
-FILEN=${filep##*/}
-name=${FILEN:0:-3}
-outfile=$outdir$DIR/$name'html'
-xsltproc -o $outfile $filter $filep
-done
-ln -s text/shared/main0108.html $outdir'index.html'
-mkdir $outdir'media/icon-theme'
-# cp -rap ../../../../../icon-themes/galaxy/* $outdir/media/icon-theme/
+ echo $lang
+ cd $langDirSource/$lang/helpcontent2/source
+ ln -sf $filter .
+ ln -sf $sourceDir/get_bookmark.sh .
+ mkdir -p $outDir/$lang
+ ./get_bookmark.sh $outDir $lang
+ xsltparm='--stringparam Language '$lang
+
+ # iterate all xhp files
+ for filep in `find text/ -name *.xhp`
+ do
+ DIR=${filep##*text/}
+ name=${DIR:0:-3}
+ outFile=$outDir$lang'/text/'$name'html'
+ xsltproc $xsltparm -o $outFile online_transform.xsl $filep
+ done
+ # some service links
+ ln -s text/shared/main0108.html $outDir/$lang/index.html
+ ln -s ../media $outDir/$lang/media
+ # back to l10n root folder
+ cd $langDirSource
+
+done
+# Should copy core/icon-themes/galaxy/ to the media folder as icon-theme/
+ #mkdir $outDir'media/icon-theme'
+ # cp -rap ../../../../../icon-themes/galaxy/* $outDir/media/icon-theme/
+exit
diff --git a/source/help.js b/source/help.js
index b138839e5..982f4bc8e 100644
--- a/source/help.js
+++ b/source/help.js
@@ -7,71 +7,85 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+// Used to set Apllication in caseinlie=APP
function setModule(module){
-if (module == null){module="SHARED"}
-
-document.getElementById("bookmark"+module).hidden=false;
-var itemspan = document.getElementsByTagName("span");
-var n = itemspan.length;
-for (var i = 0; i < n; i++){
- if (itemspan[i].getAttribute("value") == module){
- itemspan[i].removeAttribute("hidden");
- }
-}
+ if (module == null){module="SHARED"}
+ document.getElementById("bookmark"+module).hidden=false;
+ var itemspan = document.getElementsByTagName("span");
+ var n = itemspan.length;
+ for (var i = 0; i < n; i++){
+ if (itemspan[i].getAttribute("value") == module){
+ itemspan[i].removeAttribute("hidden");
+ }
+ }
}
+
+// Used to set system in caseinline=SYSTEM
function setSystem(system){
-var itemspan = document.getElementsByTagName("span");
-if (system == null){system="DEFSYS"}
-var n = itemspan.length;
-for (var i = 0; i < n; i++){
- if (itemspan[i].getAttribute("value") == system){
- itemspan[i].removeAttribute("hidden");
- }
-}
+ var itemspan = document.getElementsByTagName("span");
+ if (system == null){system="WIN"}
+ var n = itemspan.length;
+ for (var i = 0; i < n; i++){
+ if (itemspan[i].getAttribute("value") == system){
+ itemspan[i].removeAttribute("hidden");
+ }
+ }
}
/* add &DbPAR= and &System= to the links in DisplayArea div */
function fixURL(module, system){
- var itemlink = document.getElementById("DisplayArea").getElementsByTagName("a");
- var n = itemlink.length;
- var pSystem = (system == null) ? "":"&System="+system;
- var pAppl = (module == null) ? "":"&DbPAR="+module;
- for (var i = 0; i<n; i++) {
- if(true){
- var href = itemlink[i].getAttribute("href");
- if (href != null){
- if (!href.startsWith("http")) {
- var pre = href.substring(0,href.indexOf('?'));
- if (href.lastIndexOf('#') > 0){
- var post = href.substring(href.lastIndexOf('#'),href.length);
- }
- else{
- post='';
- }
- var url = pre+'?'+pAppl+pSystem+post;
- itemlink[i].setAttribute("href",url);
- }
- }
- }
- }
+ var itemlink = document.getElementById("DisplayArea").getElementsByTagName("a");
+ var pSystem = (system == null) ? "WIN" : system;
+ var pAppl = (module == null) ? "SHARED" : module;
+ var n = itemlink.length;
+ var item;
+ for (var i = 0; i<n; i++) {setURLParam(itemlink[i], pSystem, pAppl)
+ }
+}
+//Set the params inside URL
+function setURLParam (itemlink, pSystem, pAppl) {
+ var href = itemlink.getAttribute("href");
+ if (href != null){
+ // skip external links
+ if (!href.startsWith("http")) {
+ // handle bookmark.
+ if (href.lastIndexOf('#') != -1) {
+ var postf = href.substring(href.lastIndexOf('#'),href.length);
+ var pref = href.substring(0, href.lastIndexOf('#'));
+ itemlink.setAttribute("href", pref + "?" + '&DbPAR=' + pAppl + '&System=' + pSystem + postf);
+ }else{
+ itemlink.setAttribute("href", href + "?"+ '&DbPAR=' + pAppl + '&System=' + pSystem);
+ }
+ }
+ }
+}
+// Set System change buttons
+function setSystemURLButton (module) {
+ if (module == null){module="SHARED"}
+ var button = document.getElementById("lin").getElementsByTagName("a");
+ setURLParam(button[0],'UNIX', module);
+ button = document.getElementById("win").getElementsByTagName("a");
+ setURLParam(button[0],'WIN', module);
+ button = document.getElementById("mac").getElementsByTagName("a");
+ setURLParam(button[0],'MAC', module);
}
function getParameterByName(name, url) {
if (!url) {
url = window.location.href;
}
-
+
name = name.replace(/[\[\]]/g, "\\$&");
var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)");
var results = regex.exec(url);
-
+
if (!results) {
return null;
}
-
+
if (!results[2]) {
return '';
}
-
+
return decodeURIComponent(results[2].replace(/\+/g, " "));
}
diff --git a/source/online_transform.xsl b/source/online_transform.xsl
index 007e9591c..f4f9246e1 100644
--- a/source/online_transform.xsl
+++ b/source/online_transform.xsl
@@ -76,7 +76,7 @@
<xsl:param name="imgtheme" select="''"/>
<xsl:param name="Id" />
-<xsl:param name="Language" select="'en-US'"/>
+<xsl:param name="Language"/>
<xsl:variable name="lang" select="$Language"/>
<xsl:param name="ExtensionId" select="''"/>
@@ -92,9 +92,9 @@
<!--<xsl:variable name="urlpost" select=""/>-->
<xsl:variable name="urlpost" select="concat('?Language=',$lang,$am,'System=',$System,$am,'UseDB=no')"/>
<xsl:variable name="urlpre" select="$help_url_prefix" />
-<xsl:variable name="linkprefix" select="$urlpre"/>
+<xsl:variable name="linkprefix" select="concat('/',$lang,'/')"/>
<!--<xsl:variable name="linkpostfix" select="$urlpost"/>-->
-<xsl:variable name="linkpostfix" select="'?'"/>
+<xsl:variable name="linkpostfix" select="''"/>
<xsl:variable name="css" select="'default.css'"/>
@@ -114,11 +114,13 @@
<!-- Create the document skeleton -->
<xsl:template match="/">
<xsl:variable name="csslink" select="concat($urlpre,'default.css')"/>
- <xsl:variable name="bookmarkref" select="concat('bookmark_',$appl,'.html')"/>
+ <xsl:variable name="bookmarkref" select="concat($lang,'/bookmarks.js')"/>
+ <xsl:variable name="htmlpage"><xsl:call-template name="filehtml"><xsl:with-param name="file" select="$filename"/></xsl:call-template></xsl:variable>
<html>
<head>
<!-- <base href="file:///home/tdf/git/core/helpcontent2/source/html/"/> -->
- <base href="/"/>
+ <!--<base href="/{$lang}"/>-->
+ <base href="/"/>
<title><xsl:call-template name="brand"><xsl:with-param name="string">
<xsl:value-of select="$title"/>
</xsl:with-param></xsl:call-template></title>
@@ -130,16 +132,18 @@
</head>
<body lang="{$lang}">
<div id="BottomLeft">
- <p>Search: <input type="text" id="search-bar"/></p>
- <ul id="bookmarkCALC" hidden="true" class="indexlink"></ul>
- <ul id="bookmarkCHART" hidden="true" class="indexlink"></ul>
- <ul id="bookmarkWRITER" hidden="true" class="indexlink"></ul>
- <ul id="bookmarkDRAW" hidden="true" class="indexlink"></ul>
- <ul id="bookmarkIMPRESS" hidden="true" class="indexlink"></ul>
- <ul id="bookmarkMATH" hidden="true" class="indexlink"></ul>
- <ul id="bookmarkBASE" hidden="true" class="indexlink"></ul>
- <ul id="bookmarkSHARED" hidden="true" class="indexlink"></ul>
- <ul id="bookmarkBASIC" hidden="true" class="indexlink"></ul>
+ <div id="SearchBox">
+ <p><xsl:text disable-output-escaping="yes"> 🔎 </xsl:text><input type="text" id="search-bar"/></p>
+ </div>
+ <ul id="bookmarkCALC" hidden="true"></ul>
+ <ul id="bookmarkCHART" hidden="true"></ul>
+ <ul id="bookmarkWRITER" hidden="true"></ul>
+ <ul id="bookmarkDRAW" hidden="true"></ul>
+ <ul id="bookmarkIMPRESS" hidden="true"></ul>
+ <ul id="bookmarkMATH" hidden="true"></ul>
+ <ul id="bookmarkBASE" hidden="true"></ul>
+ <ul id="bookmarkSHARED" hidden="true"></ul>
+ <ul id="bookmarkBASIC" hidden="true"></ul>
</div>
<div id="DisplayArea">
<xsl:apply-templates select="/helpdocument/body"/>
@@ -151,7 +155,44 @@
<p id="bm_system"></p>
</div>
</div>
-
+ <div id="TopLang"><!--<p>a</p></div>-->
+ <nav>
+ <ul>
+ <li><a href="/en-US{$htmlpage}">EN</a></li>
+ <li><a href="/ast{$htmlpage}">AST</a></li>
+ <li><a href="/bg{$htmlpage}">BG</a></li>
+ <li><a href="/bn{$htmlpage}">BN</a></li>
+ <li><a href="/bn-IN{$htmlpage}">BN-IN</a></li>
+ <li><a href="/ca{$htmlpage}">CA</a></li>
+ <li><a href="/cs{$htmlpage}">CS</a></li>
+ <li><a href="/da{$htmlpage}">DA</a></li>
+ <li><a href="/de{$htmlpage}">DE</a></li>
+ <li><a href="/el{$htmlpage}">EL</a></li>
+ <li><a href="/es{$htmlpage}">ES</a></li>
+ <li><a href="/eu{$htmlpage}">EU</a></li>
+ <li><a href="/fi{$htmlpage}">FI</a></li>
+ <li><a href="/fr{$htmlpage}">FR</a></li>
+ <li><a href="/hu{$htmlpage}">HU</a></li>
+ <li><a href="/it{$htmlpage}">IT</a></li>
+ <li><a href="/ja{$htmlpage}">JA</a></li>
+ <li><a href="/km{$htmlpage}">KM</a></li>
+ <li><a href="/ko{$htmlpage}">KO</a></li>
+ <li><a href="/nb{$htmlpage}">NB</a></li>
+ <li><a href="/nl{$htmlpage}">NL</a></li>
+ <li><a href="/om{$htmlpage}">OM</a></li>
+ <li><a href="/pl{$htmlpage}">PL</a></li>
+ <li><a href="/pt{$htmlpage}">PT</a></li>
+ <li><a href="/pt-BR{$htmlpage}">PT-BR</a></li>
+ <li><a href="/ru{$htmlpage}">RU</a></li>
+ <li><a href="/sl{$htmlpage}">SL</a></li>
+ <li><a href="/sv{$htmlpage}">SV</a></li>
+ <li><a href="/tr{$htmlpage}">TR</a></li>
+ <li><a href="/vi{$htmlpage}">VI</a></li>
+ <li><a href="/zh-CN{$htmlpage}">ZH-CN</a></li>
+ <li><a href="/zh-TW{$htmlpage}">ZH-TW</a></li>
+ </ul>
+ </nav>
+ </div>
<div id="TopRight">
<script type="text/javascript">
<![CDATA[
@@ -169,35 +210,45 @@
<xsl:text disable-output-escaping="yes"><gcse:search></gcse:search></xsl:text>
</div>
<div id="TopLeft">
- <nav id="TopMenu">
+ <nav id="SelectModules">
<ul>
- <li><a href="text/scalc/main0000.html?DbPAR=CALC">Calc</a></li>
- <li><a href="text/swriter/main0000.html?DbPAR=WRITER">Writer</a></li>
- <li><a href="text/simpress/main0000.html?DbPAR=IMPRESS">Impress</a></li>
- <li><a href="text/sdraw/main0000.html?DbPAR=DRAW">Draw</a></li>
- <li><a href="text/schart/main0000.html?DbPAR=CHART">Chart</a></li>
- <li><a href="text/sbasic/shared/main0601.html?DbPAR=BASIC">Basic</a></li>
- <li><a href="text/smath/main0000.html?DbPAR=MATH">Math</a></li>
- <li><a href="text/shared/explorer/database/main.html?DbPAR=BASE">Base</a></li>
- <li><a href="text/shared/guide/main.html?DbPAR=SHARED">Guide</a></li>
+ <li><a href="/{$lang}/text/scalc/main0000.html?DbPAR=CALC">Calc</a></li>
+ <li><a href="/{$lang}/text/swriter/main0000.html?DbPAR=WRITER">Writer</a></li>
+ <li><a href="/{$lang}/text/simpress/main0000.html?DbPAR=IMPRESS">Impress</a></li>
+ <li><a href="/{$lang}/text/sdraw/main0000.html?DbPAR=DRAW">Draw</a></li>
+ <li><a href="/{$lang}/text/schart/main0000.html?DbPAR=CHART">Chart</a></li>
+ <li><a href="/{$lang}/text/sbasic/shared/main0601.html?DbPAR=BASIC">Basic</a></li>
+ <li><a href="/{$lang}/text/smath/main0000.html?DbPAR=MATH">Math</a></li>
+ <li><a href="/{$lang}/text/shared/explorer/database/main.html?DbPAR=BASE">Base</a></li>
+ <li><a href="/{$lang}/text/shared/guide/main.html?DbPAR=SHARED">Guide</a></li>
</ul>
</nav>
</div>
+ <div id="TopSystem">
+ <nav id="SelectSystem">
+ <ul>
+ <li id="win"><a href="{$lang}{$htmlpage}">Wndows</a></li>
+ <li id="lin"><a href="{$lang}{$htmlpage}">Linux</a></li>
+ <li id="mac"><a href="{$lang}{$htmlpage}">Mac</a></li>
+ </ul>
+ </nav>
+ </div>
<script type="text/javascript">
<![CDATA[
-if (window.location.href.indexOf('?') == -1) {
-window.open('text/shared/main0108.html?System=DEFSYS&DbPAR=WRITER&System=WIN','_self');
-}
+//if (window.location.href.indexOf('?') == -1) {
+//window.open('text/shared/main0108.html?System=DEFSYS&DbPAR=WRITER&System=WIN','_self');
+//}
var module = getParameterByName("DbPAR");
setModule(module);
var system = getParameterByName("System");
setSystem(system);
fixURL(module,system);
+setSystemURLButton(module);
document.getElementById("bm_module").innerHTML ="Module is: "+module;
document.getElementById("bm_system").innerHTML ="System is: "+system;
]]>
</script>
- <script type="text/javascript" src="bookmarks.js"/>
+ <script type="text/javascript" src="{$bookmarkref}"/>
</body>
</html>
</xsl:template>
@@ -792,10 +843,10 @@ document.getElementById("bm_system").innerHTML ="System is: "+system;
<xsl:if test="not(../child::case[@select=$System]) and not(../child::caseinline[@select=$System])">
<xsl:choose>
<xsl:when test="$embedded = 'yes'">
- <span hidden="true" itemprop="system" value="DEFSYS"><xsl:apply-templates mode="embedded"/></span>
+ <span hidden="true" itemprop="system" value="WIN"><xsl:apply-templates mode="embedded"/></span>
</xsl:when>
<xsl:otherwise>
- <span hidden="true" itemprop="system" value="DEFSYS"><xsl:apply-templates /></span>
+ <span hidden="true" itemprop="system" value="WIN"><xsl:apply-templates /></span>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
@@ -1041,4 +1092,9 @@ document.getElementById("bm_system").innerHTML ="System is: "+system;
<xsl:value-of select="concat($am,'DbPAR=',$newDB)"/>
</xsl:template>
+<xsl:template name="filehtml">
+ <xsl:param name="file"/>
+ <xsl:value-of select="concat(substring-before($file,'.xhp'),'.html')"/>
+</xsl:template>
+
</xsl:stylesheet>
More information about the Libreoffice-commits
mailing list