diff options
author | Olivier Hallot <olivier.hallot@libreoffice.org> | 2017-08-02 00:49:11 -0300 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@edx.srv.br> | 2017-08-02 06:01:42 +0200 |
commit | 9f9cebab254146cbae0a093626ed78801e85b98f (patch) | |
tree | 2a6e56904450fe3d88ad2d21e561a5c83d7c9dd8 /help3xsl/help.js | |
parent | 4d6f86d203814a211eae9dfacd4baf195ca4ff1d (diff) |
tdf#97745 Handle offline browser help
* Rename index.html to LOHelp.html. index.html is a bad name,
too generic. LOHelp.html is invoked by LibreOffice and is not a
popular file name.
* Clean the XSLT transform, add suport for local help.
* reposition bookmark2file.js in the target tree.
* remove obsolete files
* page tree now capable to be opened by file:// protocol, passing
'online' parameter and folder address to the bash script.
Change-Id: I2cf9f69de7896bd74074745993ef033bef5c3503
Reviewed-on: https://gerrit.libreoffice.org/40661
Reviewed-by: Olivier Hallot <olivier.hallot@edx.srv.br>
Tested-by: Olivier Hallot <olivier.hallot@edx.srv.br>
Diffstat (limited to 'help3xsl/help.js')
-rw-r--r-- | help3xsl/help.js | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/help3xsl/help.js b/help3xsl/help.js index 6028802be3..1901a96ad0 100644 --- a/help3xsl/help.js +++ b/help3xsl/help.js @@ -37,9 +37,11 @@ function fixURL(module, system){ var pSystem = (system == null) ? "WIN" : system; var pAppl = (module == null) ? "WRITER" : module; var n = itemlink.length; - var item; - for (var i = 0; i<n; i++) {setURLParam(itemlink[i], pSystem, pAppl) + + for (var i = 0; i<n; i++) { + setURLParam(itemlink[i], pSystem, pAppl) } + } //Set the params inside URL function setURLParam (itemlink, pSystem, pAppl) { @@ -59,6 +61,16 @@ function setURLParam (itemlink, pSystem, pAppl) { } } +function getSystem (){ + var system="Unknown OS"; + if (navigator.appVersion.indexOf("Win")!=-1) system="WIN"; + if (navigator.appVersion.indexOf("Mac")!=-1) system="MAC"; + if (navigator.appVersion.indexOf("X11")!=-1) system="UNIX"; + if (navigator.appVersion.indexOf("Linux")!=-1) system="UNIX"; + return system; +} + + function getParameterByName(name, url) { if (!url) { url = window.location.href; |