loleaflet/reference.html              |   16 ++++++++++++++++
 loleaflet/src/map/handler/Map.WOPI.js |    8 ++++++++
 2 files changed, 24 insertions(+)

New commits:
commit 05c12733a6a3b0ea6ed2a53c15f4786340456d15
Author: Pranav Kant <[email protected]>
Date:   Wed Jun 7 13:22:46 2017 +0530

    PostMessage API - allow showing/hiding custom progress bar
    
    Change-Id: Ide9c83018938d1195b87153fe78e3924c2d49d4a

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: &lt;String&gt;</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) {
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to