loleaflet/src/control/Toolbar.js              |    4 ++++
 loleaflet/src/layer/tile/TileLayer.js         |    4 ++++
 loleaflet/src/map/handler/Map.FileInserter.js |    3 +++
 3 files changed, 11 insertions(+)

New commits:
commit cec63101c5f5f14ce1bce449a3ba08fcfe4c88ea
Author: Henry Castro <hcas...@collabora.com>
Date:   Wed Apr 6 20:48:12 2016 -0400

    loleaflet: progress bar for document loading, saving, etc.

diff --git a/loleaflet/src/control/Toolbar.js b/loleaflet/src/control/Toolbar.js
index 1488b7d..9ebdd4e 100644
--- a/loleaflet/src/control/Toolbar.js
+++ b/loleaflet/src/control/Toolbar.js
@@ -39,6 +39,8 @@ L.Map.include({
                        options = '';
                }
                id = id || -1; // not a special download
+
+               this.showBusy('Downloading...', false);
                this._socket.sendMessage('downloadas ' +
                        'name=' + name + ' ' +
                        'id=' + id + ' ' +
@@ -47,6 +49,7 @@ L.Map.include({
        },
 
        print: function () {
+               this.showBusy('Downloading...', false);
                this.downloadAs('print.pdf', 'pdf', null, 'print');
        },
 
@@ -58,6 +61,7 @@ L.Map.include({
                        options = '';
                }
 
+               this.showBusy('Saving...', false);
                // TakeOwnership: we are performing a 'real' save-as, the 
document
                // is just getting a new place, ie. it will get the
                // '.uno:ModifiedStatus' upon completion.
diff --git a/loleaflet/src/layer/tile/TileLayer.js 
b/loleaflet/src/layer/tile/TileLayer.js
index 1da6533..980f688 100644
--- a/loleaflet/src/layer/tile/TileLayer.js
+++ b/loleaflet/src/layer/tile/TileLayer.js
@@ -369,6 +369,7 @@ L.TileLayer = L.GridLayer.extend({
                var url = this._map.options.webserver + '/' +
                        command.jail + '/' + command.dir + '/' + command.name;
 
+               this._map.hideBusy();
                if (command.id === 'print') {
                        var isFirefox = typeof InstallTrigger !== 'undefined' 
|| navigator.userAgent.search('Firefox') >= 0;
                        if (isFirefox || this._map.options.print === false) {
@@ -624,8 +625,11 @@ L.TileLayer = L.GridLayer.extend({
                else if (obj.success === 'false') {
                        success = false;
                }
+
+               this._map.hideBusy();
                // TODO when implemented in the LOK, add also obj.result
                this._map.fire('commandresult', {commandName: commandName, 
success: success});
+
        },
 
        _onTextSelectionMsg: function (textMsg) {
diff --git a/loleaflet/src/map/handler/Map.FileInserter.js 
b/loleaflet/src/map/handler/Map.FileInserter.js
index 4484e45..3d76d78 100644
--- a/loleaflet/src/map/handler/Map.FileInserter.js
+++ b/loleaflet/src/map/handler/Map.FileInserter.js
@@ -49,8 +49,11 @@ L.Map.FileInserter = L.Handler.extend({
                var url = this._url;
                var xmlHttp = new XMLHttpRequest();
                var socket = this._map._socket;
+               var map = this._map;
+               this._map.showBusy('Uploading...', false);
                xmlHttp.onreadystatechange = function () {
                        if (xmlHttp.readyState === 4 && xmlHttp.status === 200) 
{
+                               map.hideBusy();
                                socket.sendMessage('insertfile name=' + name + 
' type=graphic');
                        }
                };
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to