summaryrefslogtreecommitdiffstats
path: root/help3xsl/help.js
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@libreoffice.org>2017-08-02 00:49:11 -0300
committerOlivier Hallot <olivier.hallot@edx.srv.br>2017-08-02 06:01:42 +0200
commit9f9cebab254146cbae0a093626ed78801e85b98f (patch)
tree2a6e56904450fe3d88ad2d21e561a5c83d7c9dd8 /help3xsl/help.js
parenttdf#97745 housekeeping (diff)
downloadhelp-9f9cebab254146cbae0a093626ed78801e85b98f.tar.gz
help-9f9cebab254146cbae0a093626ed78801e85b98f.zip
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.js16
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;