We now have two places, the handler for the 'closemobile' button and
the handler for the 'closedocument' menu entry, where we have an if
statement that checks window.ThisIsAMobileApp and if so posts the "BYE"
message to the webkit message handler in the app. Possibly we could
move that conditional code into just one place, down into the 'close'
function in L.Socket instead?
Change-Id: Ib8c6adf621945b266fa4ea5f6d66b0022c2ca373
Add two settings: One setting "Template list URL" is a string that
should either be empty (the typical case for a random user of the
app), or contain a https: URL. If this setting is empty, only the
templates bundled in the app are provided.
If the "Template list URL" is non-empty, it should be a https: URL
pointing to a text file (or dynamically generated text resource). That
file is downloaded and read when the app starts. Each line in the file
should either be a comment (starting with a hash '#'), or a https: URL
pointing to a template document, that is of type .ott, .ots, or .otp.
That document is downloaded if it hasn't been downloaded already, or
if its time stamp is newer than that of the already downloaded copy.
Also a thumbnail image for the template, formed by appending ".png" to
its URL, is downloaded, if available.
Any previously downloaded templates that aren't mentioned in the list
file are removed.
The intent is that in some managed mass deployment environment, the
mobile device management software would set up this setting, so that
the end-user devices would see the same templates.
Obviously, this URL does not have to point to a static file on a web
server, but could point to some dynamically generated resource on a
web server, that enumerates the templates available on the server and
returns their URLs as a text document.
Another setting is "Empty tile cache next time". This is a toggle. If
toggled on, the next time a document is opened in the app, the tile
cache is emptied (and the toggle is reset off). This is mostly for
potential problem solving, and might be removd later.
Various refactoring to support the new functionality.
Change-Id: Ie2ebf032acb9e43bb1c6f7ae4d0c449ae66eaa05
hasTemplateSaveAs is not supported yet.
Change-Id: Ic4af44a38ce6a36fd0bbd63f5d94a860280283cd
Reviewed-on: https://gerrit.libreoffice.org/65260
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
Revert "loleaflet: remove user list" and several other bits that are
needed for the users list functionality.
Change-Id: Iee294630c2af5240394a848bbce0156d691ef7a0
This is a somewhat temporary quick solution. It bluntly uses the same
code here that I had added for a while as the implementation of
translateGet() for LibreOfficeKitClass in LO core.
Ideally we should have a script here in online to pick the needed
translation from the translations submodule of core and keep them
around even if a translation happens to evaporate from
core/translations. The same idea as in the scripts/unocommands.py, but
I did not yet start modifying or copying that.
Change-Id: I455ad6044e321ef59873d60f8e5f3e7032f2447e
So copy it from the lotemplate.
Change-Id: I84d1514e5e06ec194e549b36f8db2dc6fdd04f38
(cherry picked from commit 66dcff38a7248fb7facc6d459ac8788882262bb1)
Reviewed-on: https://gerrit.libreoffice.org/65018
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>