libreoffice-online/loleaflet/html
Tor Lillqvist 97c77a25c2 Make the help file work properly in the mobile apps
We cannot use jQuery.get (a.k.a. $.get) in the mobile apps as that
uses some XMLHttpRequest thing that obviously won't work when there is
no web server involved, but loleaflet.html has been loaded from a
file: URL. Simply store the help file into a global variable and use
that instead.

A small refactoring of the showHelp function was needed to factor out
the call of vex.open into a separate function. That is called directly
from showHelp in the mobile app case. Otherwise, it is called from a
short function passed to $.get, as before.

Note that in the mobile apps we cannot use window.open (which in the
mobile apps has been redefined to send a "HYPERLINK <url>" message to
the native app code) to open the help file, because the HYPERLINK
message is for opening a web page in a browser, completely separately
from the app. It is used to display the commit log for the Help>About
functionality.

And anyway, the old idea (that didn't work) to take a shortcut in the
mobile app case and just display the help file in showHelp will not
work anyway as we need the code that edits the contents before it is
displayed, and handles the close button in the help file.

This fixes https://github.com/CollaboraOnline/online/issues/400
This fixes https://github.com/CollaboraOnline/online/issues/401

Change-Id: I16dc960f26af7e6e89663c3ac0523ce5c3d41c34
Signed-off-by: Tor Lillqvist <tml@collabora.com>
2021-03-18 19:37:34 +02:00
..
framed.doc.html Add Action_ChangeUIMode to PostMessage test harness 2021-03-01 08:48:52 +01:00
framed.html
load.doc.html sample: new form page to load documents via post requests 2020-11-15 11:10:20 -05:00
loleaflet-help.html Separate shortcuts online help for presentations and drawings 2021-01-21 10:22:58 +01:00
loleaflet.html.m4 Make the help file work properly in the mobile apps 2021-03-18 19:37:34 +02:00
signing-identities.html typo fixes in comments and code 2020-04-26 23:19:52 +02:00