diff options
author | Olivier Hallot <olivier.hallot@libreoffice.org> | 2017-06-20 00:04:54 -0300 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@edx.srv.br> | 2017-06-25 01:55:11 +0200 |
commit | 181b72469b27cc2f711525838463e98a0920161c (patch) | |
tree | 671e2cc4f601c6237fb00a95944a0b062ac5b2b2 /help3xsl/index.html | |
parent | bd033eb897b7c43f1f6e8c35cc50d4a73ace84af (diff) |
Help-in-browser: several improvements
* tabs for Contents/Index/Search
* product version (6.0, 5.3, 5.2, etc...)
* capable to receive URL from LibreOffice help call
(need to change help url in sfx2/:
protocol://<host>/index.html?<params>
Change-Id: I2244336ea47cdb923884ae97b9f4a586d85ec706
Reviewed-on: https://gerrit.libreoffice.org/39227
Reviewed-by: Olivier Hallot <olivier.hallot@edx.srv.br>
Tested-by: Olivier Hallot <olivier.hallot@edx.srv.br>
Diffstat (limited to 'help3xsl/index.html')
-rw-r--r-- | help3xsl/index.html | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/help3xsl/index.html b/help3xsl/index.html new file mode 100644 index 0000000000..932c4d944c --- /dev/null +++ b/help3xsl/index.html @@ -0,0 +1,45 @@ +<!DOCTYPE html> +<html> + <head> + <script type="text/javascript" src="latest/help.js"></script> + <script type="text/javascript" src="bookmark2file.js"></script> + </head> + <body> + <script type="text/javascript"> + var url = window.location.href; + var n = url.indexOf('index.html?'); + if (n != -1){ + // the URL came from LibreOffice help (F1) + var version = getParameterByName("Version",url); + var lang = getParameterByName("Language",url); + var system = getParameterByName("System",url); + var rest= url.substr(n+11,url.lenght); + var module; + var defaultFile; + var smodule = rest.substr(0, rest.indexOf('/')); + switch (smodule) { + case "swriter": {defaultFile='text/swriter/main0000.html';module="WRITER";break;} + case "scalc": {defaultFile='text/scalc/main0000.html';module="CALC";break;} + case "simpress": {defaultFile='text/simpress/main0000.html';module="IMPRESS";break;} + case "sdraw": {defaultFile='text/sdraw/main0000.html';module="DRAW";break;} + case "smath": {defaultFile='text/smath/main0000.html';module="MATH";break;} + case "sdatabase": {defaultFile='text/shared/explorer/database/main.html';module="BASE";break;} + case "sbasic": {defaultFile='text/sbasic/shared/main0601.html';module="BASIC";break;} + default: {defaultFile='text/shared/main0000.html';module="WRITER";break;} + } + var bookmark = rest.slice(rest.indexOf('/')+1, rest.indexOf('?')); + var file = map[bookmark]; + // rebuild URL + if (file=='undefined'){ + file = defaultFile; + } + var newURL = '/'+version+'/'+lang+'/'+file+'?System='+system+'&DbPAR='+module; + window.open(newURL,'_self'); + }else{ + // URL came from elsewhere, direct access to webroot, we redirect to main Help page + window.open('latest/en-US/text/shared/main0108.html?&DbPAR=WRITER&System=WIN','_self'); + } + </script> + </body> +</html> + |