Commit graph

15 commits

Author SHA1 Message Date
Andras Timar
e2ed44b8ab Add Action_ChangeUIMode to PostMessage test harness
Signed-off-by: Andras Timar <andras.timar@collabora.com>
Change-Id: I06c5e7fab8fff763e59f2a4fdf85c7f47dec51bb
2021-03-01 08:48:52 +01:00
Ashod Nakashian
ebcdaa9e87 sample: added usage and improved url construction in framed.doc.html
This should make this sample much more useful by documenting
the proper usage and helping the user avoid common pitfalls.

Change-Id: I965bed0e4ab685dd2a68f7b246dd9a409d296337
Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk>
2020-11-15 11:10:20 -05:00
Samuel Mehrbrodt
665b1629de tdf#131123 Report back save result
Change-Id: Ie3dee5d344bc65c325b95f2746c9734bdd9e2f9d
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/94490
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2020-05-29 08:39:46 +02: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
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
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
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
Tor Lillqvist
61e0d72982 Move framed.doc.html so that it doesn't get removed by 'make clean' 2018-10-17 23:44:59 +03:00
Renamed from loleaflet/dist/framed.doc.html (Browse further)