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>
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>
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>
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>
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>
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>
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>