Commit graph

118 commits

Author SHA1 Message Date
Jan Holesovsky
ceec4f0505 android: Actually override window.open to always send the HYPERLINK on mobile.
To cover potential future developers adding window.open without knowing
it might break mobile...

Change-Id: Iadad985ac6fad9b9f068f224fd8fb21f073bead6
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88732
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-02-14 18:27:51 +01:00
Michael Meeks
875b4c37d3 Framed sample - add frame_ancestors instructions.
Change-Id: I2b503be31268616c39485cb102dc90a3427a1e45
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88417
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-02-10 23:23:31 +01:00
Andras Timar
2185595629 make iframe load in http:// case, too
Change-Id: I22d8cfde29bac3db24dc3906c69fe119e5d40464
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/88409
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-02-10 21:32:27 +01:00
Michael Meeks
1c754d5b11 Revert "Serve a decidedly unpretty clipboard download page"
This reverts parts of commit da455c486a.

Unfinished; also stream size calculation cannot have worked.

Change-Id: I39635fe5165b82dd36095d58cfefff4920ce3a35
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86845
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2020-01-16 17:21:38 +01:00
Michael Meeks
e18fe5e5ef postMessage harness - extend to catch CSS issues.
Change-Id: I0731ae72ba1937916b055882171785ee268e16c4
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86795
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-01-15 11:03:24 +01:00
Michael Meeks
6305cc70fa postMessage tests - advertise them, and do some cleaning.
Set the iframe's src in a script so we can pass on a filename cleanly.
add a postMessage: sample URI at the end of 'make run'
Move some of the more obvious pieces into framed.doc.html.

Change-Id: I2bd8215f083bcb16369421ed88acb198808c1fdb
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86787
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-01-15 11:01:41 +01:00
Michael Meeks
b5f58fbe8c postMessage CSS checking improvements.
Ironically our attempts to double-check message origin against our
parent was blowing a security exception.

Instead send the list of origins we will accept from WSD, and
check them ourselves (as well as the browser check).

Why make it so hard to check that a postMessage comes from an
ancestor frame ?

Change-Id: I1311be3e1d68a31cfdc96b45a5eb5dd7f26e7ea9
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86788
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Alexandru Vlăduţu <alexandru.vladutu@1and1.ro>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
2020-01-15 10:56:27 +01:00
Tor Lillqvist
8c4bff2b22 tdf#129327: Ignore all keydown events at the outermost level for iOS
Possibly a good idea for Android, too? See bug report for description
of what this fixes.

Change-Id: I6b70f431ced09044756c2edc3fcc2542428b62e1
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/86484
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-01-09 13:56:19 +01:00
Pranam Lashkari
57257c868e resolved: HELP > Online Help clicking internal links closes the Help
Change-Id: If64f397680ed5977e025e398a8efd044566f278b
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/85773
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2020-01-03 14:18:20 +01:00
Andras Timar
5eb462078b Fixed a typo in Online Help
Change-Id: Ibd88edd48db16e4bd96ec60d545f50905ea06d25
2019-12-15 17:51:57 +01:00
Andras Timar
21102496b7 remove screenshot dimensions from help in order to avoid distorsions with updated/translated images
Change-Id: I9aae794531b6e89ef463723c5c1b3202b37678d4
2019-12-13 13:19:36 +01:00
Pedro Pinto Silva
bbc6b44dd3 Fix help text and add updated screenshots
Change-Id: Ie7fe56ae1a9db2de04706712a3a16a70bcf394f0
Reviewed-on: https://gerrit.libreoffice.org/85103
Reviewed-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
Tested-by: Pedro Pinto da Silva <pedro.silva@collabora.com>
2019-12-13 12:56:49 +01:00
Marco Cecchetti
f4dd7ef0dc fixing 2 minor console errors
Change-Id: Ie2449e33dd47511b2d8a65e1f929e69fece8a567
Reviewed-on: https://gerrit.libreoffice.org/84901
Reviewed-by: Marco Cecchetti <marco.cecchetti@collabora.com>
Tested-by: Marco Cecchetti <marco.cecchetti@collabora.com>
2019-12-10 22:08:01 +01:00
Ashod Nakashian
7c4ba459ff Encode the ExtendedData to make it safer while embedding in messages
Change-Id: I1d4bdb2775d89e9a52a96d833228ca8577ee3561
Reviewed-on: https://gerrit.libreoffice.org/83044
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-11-22 01:51:11 +01:00
Michael Meeks
98617e40e2 Enable protocol debugging by default in debug mode.
Also add a config option for logging.protocol - to help catch early
protocol issues during startup.

Change-Id: I6f0cc6dcf14b2797bc6b2bd36c44750d74eb0608
2019-11-15 18:01:02 +00:00
Michael Meeks
946cc5d8e6 Rename misleading ClipboardContainer -> TextInput
Change-Id: Idb5ccb9959e0c77dfcdbb2793330bb048db0f0f8
2019-11-15 16:28:34 +00:00
Henry Castro
504f6c17ef loleaflet: mobile: block the user from zooming on a page by setting
user-scalable=no in the viewport

Change-Id: Ibbe07d088800e65e649e549625441d114511e45e
2019-11-12 08:51:44 +00:00
Andras Timar
d86626c926 Online Help: update Copy & Paste section
Change-Id: I96b7171b1b144093ea1762b3c96a6b2a2ec22bc0
2019-11-07 13:03:07 +01:00
Ashod Nakashian
887ecdb8d3 wsd: leaflet: Insert background
This adds support for .uno:SelectBackground
which inserts slide background image.

(cherry picked from commit 30a77e7e490e4e83bb6423f41388ee9adbccfae3)

Change-Id: I587b31f67d518aba348ae7e8d058ada23a61e858
Reviewed-on: https://gerrit.libreoffice.org/67500
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
Tested-by: Ashod Nakashian <ashnakash@gmail.com>
2019-11-06 03:43:02 +01:00
Andras Timar
d8992b8056 Online Help: more formatting and grammar fixes
Change-Id: Iff9dd62ef907d89392134558c864ed5e51f9010b
2019-11-04 21:53:40 +01:00
Andras Timar
e1413be3b3 Online Help: clarification
Change-Id: I883c87ba5bacb79b67dcf07c419dcc3cc7ddf1f7
2019-11-04 13:18:17 +01:00
Andras Timar
cd2a4cdc99 Add some more formatting to Online Help
Change-Id: I59f4840d2bd274c42c9c0ddd5a1a59def5adcb28
2019-11-04 12:37:24 +01:00
Andras Timar
1049b769ff loleaflet: Help -> Online Help
Change-Id: I673faae329013f0292afb9f517608a4eb90860d8
Reviewed-on: https://gerrit.libreoffice.org/81954
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-11-04 10:42:59 +01:00
Jan Holesovsky
2ddd8d7c81 android: Fix 'Uncaught ReferenceError: reuseCookies is not defined' on mobile
Change-Id: I9b1f0be023d41c4f3a63373d2fe892c800e5e466
Reviewed-on: https://gerrit.libreoffice.org/81784
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-10-30 15:57:39 +01:00
Andras Timar
b813ed61b6 add copyright notice to About Box
Change-Id: I51c2c5e7c2b0cf232b8a2f2dbcb3b9f3f04737ea
Reviewed-on: https://gerrit.libreoffice.org/70205
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-10-29 13:24:33 +01:00
Ashod Nakashian
8c4edb5087 Reuse cookies from the browser
Reviewed-on: https://gerrit.libreoffice.org/78195
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit 8deecf4ea6966c059458bdc71e365be426238e09)

Change-Id: I96bbdd3e71bc9d0ecfddea7debc0ebcc303a49ae
Reviewed-on: https://gerrit.libreoffice.org/81558
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2019-10-28 10:45:14 +01:00
Marco Cecchetti
1309cdea7d loleaflet: search-bar for mobile device
Change-Id: I5acb79d5bb81470aa76ce51b3e81c44909ae80e5
2019-10-21 12:41:05 +02:00
Tamás Zolnai
a4fb071ecf menu-to-mobile-wizard: Show a blue overlay on "active" main menu button
Change-Id: Ief09e5352a404ad8da486198c3f03b4e4cfce92f
2019-10-14 20:22:25 +02:00
Szymon Kłos
5036ddd66d jsdialogs: move tabs into titlebar
Change-Id: I56ebec8c12164771c4da85954d43c600030e65dc
2019-10-09 14:06:20 +02:00
Szymon Kłos
5fba4dc231 jsdialogs: move tabs to a separate container
Change-Id: I08723d02f47553644c29780f41a0a74470995d8c
2019-10-08 16:42:45 +02:00
Ashod Nakashian
a93d8f1e1c leaflet: check that we are ready to render
On some mobile devices we can start rendering
when we don't fully have all our variables
initialized. The result is that we send to WSD
'NaN' and 'Infinity' coordinates and other
values.

To avoid this, we try to check that we have downloaded
and loaded all the JS files and that we have the bare
minimal map members in valid state before we proceed
with rendering. If not, we retry with a small delay.

Change-Id: I0c57da8829a830acf4e06ff6206c73debb54bfe6
Reviewed-on: https://gerrit.libreoffice.org/79920
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2019-10-01 10:13:05 +02:00
Szymon Kłos
e3a01b7561 jsdialogs: Mobile Wizard
Change-Id: Ida2dc48d86ea4f28b08ec24a7638f27ad8633dbf
Reviewed-on: https://gerrit.libreoffice.org/79723
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2019-09-27 17:03:06 +02:00
Ashod Nakashian
8f312862ca leaflet: fire Doc_ModifiedStatus with modified state of the document
When .uno:ModifiedStatus is received, now Doc_ModifiedStatus
is fired to inform the client of the modified state of the document.

This is useful in case the integration needs to prompt the user to save
before closing the document (which they can catch with the onunload or
onbeforeunload events in the browser, as well as with our
UI_Close when the default handler is disabled).

Includes working sample and documentation.

Change-Id: Ief30483e2f078b0aa9f3c006a1ecb4093375174c
Reviewed-on: https://gerrit.libreoffice.org/74891
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2019-09-03 01:53:12 -04:00
Ashod Nakashian
3dcc68e6f1 Pass Extended Data in Action_Save from the client to the WOPI host
Clients often need to communicate with their wopi hosts when
invoking Action_Save to provide more context when storing the
document in question. Action_Save now support passing arbitrary
string as ExtendedData entry that can be used by client to
pass any context or otherwise flags to the WOPI host, which
will receive it via the X-LOOL-WOPI-ExtendedData custom header.

See reference.html for more details.

Change-Id: I1814d1f3d984a553ffa60cec13d23b014ba59eb3
Reviewed-on: https://gerrit.libreoffice.org/74135
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-09-03 01:53:12 -04:00
Ashod Nakashian
4dc312f549 Cleanup framed.doc.html sample
Now Host_PostmessageReady is automatically issued
upon loading and the postMessage calls are more modular,
allowing for expansion with more functionality.

Change-Id: I22b50f7228e0fd32c4cb880f4981c1a455038d48
Reviewed-on: https://gerrit.libreoffice.org/74129
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-09-03 01:53:12 -04:00
Ashod Nakashian
df6cc01c32 leaflet: support disabling default action
Clients often need to handle certain commands themselves.
This is especially true for Action_Save and Action_Close.

A new postMessage command, Disable_Default_UIAction, is
now available to support disabling/enabling the default
action for certain commands (as of this patch, only
Action_Save and Action_Close are supported).

The actions in question issue a notification and,
when the default handler is disabled, the client
is expected to handle the notification for which
they disabled the default handler and act as necessary.

See reference.html for more details.

Change-Id: Ia6ce4e2d7578f79cc2069097e0b968e6c4aeabd1
Reviewed-on: https://gerrit.libreoffice.org/74136
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-09-03 01:53:12 -04:00
Ashod Nakashian
0852f62f56 leaflet: support Action_Close
This allows for clients to issue a document
close programmatically, which is useful when they
have custom buttons or commands, or external
events/triggers, that might result in cleanly
closing the document.

A demo of how to use it is included in framed.doc.html.

Change-Id: Ib889bb01bbcaaa91fd0f341c989aeb1a6fceec28
Reviewed-on: https://gerrit.libreoffice.org/74131
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-09-03 01:53:12 -04:00
Ashod Nakashian
89ae4278e8 leaflet: show/hide commands demo
This demonstrates the use of show and hide
functionality via Show/Hide_Button and
Show/Hide_Menu_Item postMessage events.

Save and Print buttons and menu items are
controlled in the demo.

Change-Id: I81dfea816765da50a1c20699b460765ae35f60a6
Reviewed-on: https://gerrit.libreoffice.org/74130
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2019-09-03 01:53:12 -04:00
Jan Holesovsky
a02cd4a3d7 sibebar: Various smaller visual cleanups.
* Make it work with the menu fold / unfold button
* White background + a grey line separating the document area + the
  sidebar
* Use CSS instead of manually setting the properties in some cases

(cherry picked from commit d1ba38386c2c8367213afd47d66f992870fa7207)

Change-Id: I2ba7201075637ebdcc2b9f7319aa59317631aba2
2019-09-03 01:53:12 -04:00
Ashod Nakashian
27d780747b loleaflet: add sidebar
(cherry picked from commit 01c828c911fa70b263fee699efbc656fde54d03f)

Change-Id: Idc215e67b21b1f0ba48b3d391041278dd6526cfe
2019-09-03 01:00:05 -04:00
Ashod Nakashian
da455c486a Serve a decidedly unpretty clipboard download page
The initial bits to serving some page with provision
to ingest the different formats into a table.

Doesn't yet link with the actual document, but it's
a start.

The link will have some unique id(s) in it to
reference the document in question, which will
be some hash (possibly changing with some logic for
security reasons). This hash will have to be
something valid that WSD will use to locate
the DocBroker in question, connect to it and
fetch the formats supported and generate unique
links for each. When the user clicks on a link,
the contents will be downloaded in the given
format and copied to the user's clipboard.

The clipboard.html template is based on loleaflet.html
as we're very likely to use the same customization,
branding, localization, and javascript bits.

We would probably want to add a brandable title
with logo etc. and possibly some more reasable
background (ideally, an image enlarged and blured
to give the page some semblance of having content).

Change-Id: If0550184d4423bef1e98fecbb072bdf8df07701b
2019-08-05 20:26:13 -04:00
Jan Holesovsky
6f5290da0e android: Actually use the branding if it exists.
Change-Id: Idd7136f0657452c5fb88f2a84b5c647ab8c2935b
2019-07-11 08:33:43 +02:00
Michael Meeks
d8bcc1cf9c debug: cleanup ID display as a simple link.
And cleanup debug printout in 'make run' too.

Change-Id: I7a399eb00f15e43ceb230f66a2b17d437c5c79b0
2019-05-17 13:24:32 +01:00
Michael Meeks
289894c66c debug: show WebSocketURI & a unique host id in help -> about.
Rather useful for debugging clustering issues.

Change-Id: I6d5f224bf8a3e4034c419137c8ad2b17fdf265ed
2019-05-17 13:24:32 +01:00
Samuel Mehrbrodt
6cd248a29c Remove obsolete comment
Change-Id: Ie2034737461d4dd9c42f31a9968e8109bfd87488
Reviewed-on: https://gerrit.libreoffice.org/72445
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2019-05-17 12:24:40 +02:00
Samuel Mehrbrodt
9e529e84bf Add UI customizing example to framed.html
Change-Id: I137edcaf9b46f4bff4c30204174215d170abc1eb
Reviewed-on: https://gerrit.libreoffice.org/72241
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-05-14 08:19:41 +02:00
Tor Lillqvist
0ae32391d0 There is no l10n directory with localisation JSON files in the iOS app
The localisation is handled differently on iOS, see the
L10N_IOS_ALL_JS stuff in loleaflet/Makefile.am and the script
loleaflet/util/create-l10n-all-js.pl.

That part of loleaflet.html is not needed in the iOS app. Whether it
will be needed in the Android app remains to be seen. Possibly we will
want to handle localisation in that the same way as in the iOS app. Or
not. So for now, do this change only for iOS.
2019-04-22 17:33:25 +03:00
Tor Lillqvist
60581962af Add branding to the iOS app
A configure argument, --with-iosapp-branding, should point to a
directory containing a branding.css file and possibly other files that
branding.css references, to be bundled and used by the iOS app. The
directory structure ends upp in the app bundle as Branding. The
generated loleaflet.html for the iOS app references
Branding/branding.css unconditionally.
2019-04-22 17:23:20 +03:00
Samuel Mehrbrodt
184654581c Branding: Add container for custom logo in about dialog
Change-Id: Ib6b65f1cd1990de821743cf1ac9b464add4d17e7
Reviewed-on: https://gerrit.libreoffice.org/70667
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2019-04-15 09:11:26 +02:00
Alexandru Vlăduţu
afcfd7a616 loleaflet: remove loading html page leftover
loading.html resource made obsolete by commit 51e849bf5d

Change-Id: I2308e4c121520f6ed293d5e86805c4daeec3fca6
Reviewed-on: https://gerrit.libreoffice.org/70257
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
2019-04-04 14:55:23 +02:00