[Libreoffice-commits] online.git: Branch 'distro/collabora/collabora-online-2-1' - loleaflet/reference.html loleaflet/src
Pranav Kant
pranavk at collabora.co.uk
Thu Jun 8 10:44:07 UTC 2017
loleaflet/reference.html | 16 ++++++++++++++++
loleaflet/src/map/handler/Map.WOPI.js | 8 ++++++++
2 files changed, 24 insertions(+)
New commits:
commit 64724489172f09a3e1867e54fcc8cac1cd4f7980
Author: Pranav Kant <pranavk at collabora.co.uk>
Date: Wed Jun 7 13:22:46 2017 +0530
PostMessage API - allow showing/hiding custom progress bar
Change-Id: Ide9c83018938d1195b87153fe78e3924c2d49d4a
(cherry picked from commit 05c12733a6a3b0ea6ed2a53c15f4786340456d15)
Reviewed-on: https://gerrit.libreoffice.org/38492
Reviewed-by: Jan Holesovsky <kendy at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/loleaflet/reference.html b/loleaflet/reference.html
index 8276ab70..fa08a3d6 100644
--- a/loleaflet/reference.html
+++ b/loleaflet/reference.html
@@ -2929,6 +2929,22 @@ WOPI host to editor
in <code>Get_Export_Formats</code>
</td>
</tr>
+ <tr>
+ <td><code><b>Action_ShowBusy</b></code></td>
+ <td><code>
+ <nobr>Label: <String></nobr>
+ </code></td>
+ <td>
+ Shows an in-progress overlay, just like what appears when saving
+ the doument, with the given Label.
+ </td>
+ </tr>
+ <tr>
+ <td><code><b>Action_HideBusy</b></code></td>
+ <td>
+ Hides any in-progress overlay, if present.
+ </td>
+ </tr>
</table>
Actions response
diff --git a/loleaflet/src/map/handler/Map.WOPI.js b/loleaflet/src/map/handler/Map.WOPI.js
index d187e2a6..6ff295d2 100644
--- a/loleaflet/src/map/handler/Map.WOPI.js
+++ b/loleaflet/src/map/handler/Map.WOPI.js
@@ -170,6 +170,14 @@ L.Map.WOPI = L.Handler.extend({
this._map.downloadAs(filename + '.' + format, format);
}
}
+ else if (msg.MessageId === 'Action_ShowBusy') {
+ if (msg.Values && msg.Values.Label) {
+ this._map.fire('showbusy', {label: msg.Values.Label});
+ }
+ }
+ else if (msg.MessageId === 'Action_HideBusy') {
+ this._map.fire('hidebusy');
+ }
else if (msg.MessageId === 'Get_Export_Formats') {
var exportFormatsResp = [];
for (var idx in this._map._docLayer._exportFormats) {
More information about the Libreoffice-commits
mailing list