dev/null                                      |binary
 loleaflet/debug/document/loleaflet.html       |    8 +++---
 loleaflet/dist/leaflet.css                    |   20 +++++----------
 loleaflet/dist/toolbar/toolbar.js             |   11 ++------
 loleaflet/src/control/Control.ContextMenu.js  |    2 +
 loleaflet/src/control/Control.Menubar.js      |    1 
 loleaflet/src/layer/marker/ProgressOverlay.js |   34 ++++++++++++++++++++++++++
 7 files changed, 52 insertions(+), 24 deletions(-)

New commits:
commit c03e9af2d22903970a6da26d0a7f6283cfd7d225
Author: Pranav Kant <pran...@collabora.com>
Date:   Wed May 25 17:20:50 2016 +0530

    loleaflet: Regain focus after menubar selection
    
    Change-Id: Ia0a5c81f5fe948a3552cfb36b82f9346f1b4969a
    (cherry picked from commit f8d36417d2da266f87e8cba48415f79275ffe5dd)

diff --git a/loleaflet/src/control/Control.Menubar.js 
b/loleaflet/src/control/Control.Menubar.js
index f592a60..3b3efd9 100644
--- a/loleaflet/src/control/Control.Menubar.js
+++ b/loleaflet/src/control/Control.Menubar.js
@@ -295,6 +295,7 @@ L.Control.Menubar = L.Control.extend({
                        var id = $(item).data('id');
                        self._executeAction(id);
                }
+               map.focus();
        },
 
        _createMenu: function(menu) {
commit 25040bcf1c5585eee4efa4ed69aa7d94f1691402
Author: Pranav Kant <pran...@collabora.com>
Date:   Wed May 25 16:47:32 2016 +0530

    bccu#1825: Make 'Editing'/'Viewing' text also sensitive
    
    Change-Id: Ice52dd5d7a459127df18307aad0b7d8f2ef5825e
    (cherry picked from commit 92aed1fffda2f7f50a78595022eec833855902b6)

diff --git a/loleaflet/dist/toolbar/toolbar.js 
b/loleaflet/dist/toolbar/toolbar.js
index 5d5cf7a..28176f4 100644
--- a/loleaflet/dist/toolbar/toolbar.js
+++ b/loleaflet/dist/toolbar/toolbar.js
@@ -130,8 +130,7 @@ $(function () {
                        { type: 'html',  id: 'right' },
                        { type: 'html',    id: 'modifiedstatuslabel', html: 
'<div id="modifiedstatuslabel" class="loleaflet-font"></div>' },
                        { type: 'break' },
-                       { type: 'button',  id: 'takeedit', img: 'edit', hint: 
_("Take edit lock (others can only view)")},
-                       { type: 'html',    id: 'takeeditlabel', html: '<div 
id="takeeditlabel" class="loleaflet-font">' + _("VIEWING") + '</div>' },
+                       { type: 'button',  id: 'takeedit', img: 'edit', hint: 
_("Take edit lock (others can only view)"), caption: _('VIEWING')},
                        { type: 'break' },
                        { type: 'button',  id: 'prev', img: 'prev', hint: 
_("Previous page") },
                        { type: 'button',  id: 'next', img: 'next', hint: 
_("Next page") },
@@ -840,14 +839,11 @@ map.on('editlock', function (e) {
        var toolbar = w2ui['toolbar-down'];
        if (e.value) {
                toolbar.disable('takeedit');
-               toolbar.set('takeedit', {hint: _('You are editing (others can 
only view)')});
-
-               $('#takeeditlabel').html(_('EDITING'));
+               toolbar.set('takeedit', {hint: _('You are editing (others can 
only view)'), caption: _('EDITING')});
        }
        else {
                toolbar.enable('takeedit');
-               toolbar.set('takeedit', {hint: _('Take edit lock (others can 
only view)')});
-               $('#takeeditlabel').html(_('VIEWING'));
+               toolbar.set('takeedit', {hint: _('Take edit lock (others can 
only view)'), caption: _('VIEWING')});
                $('#tb_toolbar-down_item_takeedit')
                        .w2overlay({
                                class: 'loleaflet-font',
@@ -940,7 +936,6 @@ map.on('editlock', function (e) {
 
 map.on('mouseup keypress', function(e) {
        if (!map._editlock) {
-               $('#takeeditlabel').html(_('VIEWING'));
                $('#tb_toolbar-down_item_takeedit')
                        .w2overlay({
                                html: takeEditPopupMessage,
commit 3d9193294e1cf8ac2e2771b7b841efe06a1fdb1b
Author: Pranav Kant <pran...@collabora.com>
Date:   Wed May 25 15:02:17 2016 +0530

    loleaflet: Sync debug/document/loleaflet.html with dist/loleaflet
    
    Useful for debugging.
    
    Change-Id: Ifeda2d061fcd8d98837da061c696e082a84c2850
    (cherry picked from commit 410cbf49f756418bf57ad2e71ed5f2a17d37f639)

diff --git a/loleaflet/debug/document/loleaflet.html 
b/loleaflet/debug/document/loleaflet.html
index fd87656..500aa9d 100644
--- a/loleaflet/debug/document/loleaflet.html
+++ b/loleaflet/debug/document/loleaflet.html
@@ -28,11 +28,13 @@
 <link rel="stylesheet" 
href="/loleaflet/%VERSION%/toolbar/evol.colorpicker.min.css">
 <link rel="localizations" href="/loleaflet/%VERSION%/l10n/localizations.json" 
type="application/vnd.oftn.l10n+json"/>
 <link rel="localizations" 
href="/loleaflet/%VERSION%/l10n/styles-localizations.json" 
type="application/vnd.oftn.l10n+json" />
+<link rel="localizations" 
href="/loleaflet/%VERSION%/l10n/uno-localizations.json" 
type="application/vnd.oftn.l10n+json" />
 <style type="text/css"></style></head>
 <body>
     <script src="/loleaflet/%VERSION%/jquery/2.1.0/jquery.min.js"></script>
     <script src="/loleaflet/%VERSION%/l10n/json2.min.js"></script>
     <script src="/loleaflet/%VERSION%/l10n/l10n.min.js"></script>
+    <script>var _ = function (string) {return 
string.toLocaleString();};</script>
     <script src="/loleaflet/%VERSION%/toolbar/w2ui.min.js"></script>
     <script src="/loleaflet/%VERSION%/toolbar/select2.min.js"></script>
     <script 
src="/loleaflet/%VERSION%/jqueryui/1.11.1/jquery-ui.min.js"></script>
@@ -47,7 +49,7 @@
     <script src="/loleaflet/%VERSION%/dialog/vex.combined.min.js"></script>
     <script src="/loleaflet/%VERSION%/branding.js"></script> <!-- logo onclick 
handler -->
     <script>vex.defaultOptions.className = 'vex-theme-plain';</script>
-    <script>var _ = function (string) {return 
string.toLocaleString();};</script>
+    <script src="/loleaflet/%VERSION%/errormessages.js"></script>
 
     <!--The "controls" div holds map controls such as the Zoom button and
         it's separated from the map in order to have the controls on the top
@@ -101,10 +103,10 @@
     var timestamp = getParameterByName('timestamp');
     var closebutton = getParameterByName('closebutton');
     if (wopiSrc === '' && filePath === '') {
-        vex.dialog.alert('Wrong WOPISrc, usage: WOPISrc=valid encoded URI, or 
file_path, usage: file_path=/path/to/doc/');
+        vex.dialog.alert(wrongwopisrc);
     }
     if (host === '') {
-        vex.dialog.alert('The host URL is empty. The loolwsd server is 
probably misconfigured, please contact the administrator.');
+        vex.dialog.alert(emptyhosturl);
     }
 
     var docURL = wopiSrc !== '' ? wopiSrc : filePath;
commit 5e47eefa6edc15212f3bebc1923f95a42ff5f014
Author: Pranav Kant <pran...@collabora.com>
Date:   Tue May 24 22:37:08 2016 +0530

    loleaflet: Replace gif spinner with html canvas
    
    The gif spinner had a white background flashes in its frames, so
    it always needed white background behind it. With this, we will
    have no such restriction, can can have transparent background.
    
    Change-Id: I1faffa326ae85114e52231cc4e33d84c7ac0675d
    (cherry picked from commit f6ca0b08cbb80697263f7204ce438b3deeedd741)

diff --git a/loleaflet/dist/images/spinner.gif 
b/loleaflet/dist/images/spinner.gif
deleted file mode 100644
index 3eb32ef..0000000
Binary files a/loleaflet/dist/images/spinner.gif and /dev/null differ
diff --git a/loleaflet/dist/leaflet.css b/loleaflet/dist/leaflet.css
index d986565..cdb3375 100644
--- a/loleaflet/dist/leaflet.css
+++ b/loleaflet/dist/leaflet.css
@@ -650,12 +650,6 @@ a.leaflet-control-buttons:hover:first-child {
        margin: 0 auto;
        }
 
-.leaflet-progress-layer {
-       background: #fff;
-       border: 2px solid #eee;
-       padding: 10px;
-}
-
 .leaflet-progress {
        background: #ebebeb;
        border-left: 1px solid transparent;
@@ -692,14 +686,14 @@ a.leaflet-control-buttons:hover:first-child {
        }
 
 .leaflet-progress-spinner {
-       background-image: url(images/spinner.gif);
-       background-color: white;
-       background-repeat: no-repeat;
-       background-position: center center;
-       width: 100%;
+        width: 100%;
        margin: 0 0 4px;
-       height: 34px;
-       }
+       text-align: center;
+        }
+
+.leaflet-progress-spinner-canvas {
+        position: static !important;
+        }
 
 .leaflet-progress-label {
        text-align: center;
diff --git a/loleaflet/src/layer/marker/ProgressOverlay.js 
b/loleaflet/src/layer/marker/ProgressOverlay.js
index 2b096c9..50c6fac 100644
--- a/loleaflet/src/layer/marker/ProgressOverlay.js
+++ b/loleaflet/src/layer/marker/ProgressOverlay.js
@@ -4,6 +4,10 @@
 
 L.ProgressOverlay = L.Layer.extend({
 
+       options: {
+               spinnerSpeed: 1.5
+       },
+
        initialize: function (latlng, size) {
                this._latlng = L.latLng(latlng);
                this._size = size;
@@ -23,6 +27,10 @@ L.ProgressOverlay = L.Layer.extend({
                if (this._container) {
                        this.getPane().removeChild(this._container);
                }
+
+               if (this._spinnerInterval) {
+                       clearInterval(this._spinnerInterval);
+               }
        },
 
        update: function () {
@@ -38,6 +46,7 @@ L.ProgressOverlay = L.Layer.extend({
        _initLayout: function () {
                this._container = L.DomUtil.create('div', 
'leaflet-progress-layer');
                this._spinner = L.DomUtil.create('div', 
'leaflet-progress-spinner', this._container);
+               this._spinnerCanvas = L.DomUtil.create('canvas', 
'leaflet-progress-spinner-canvas', this._spinner);
                this._label = L.DomUtil.create('div', 'leaflet-progress-label', 
this._container);
                this._progress = L.DomUtil.create('div', 'leaflet-progress', 
this._container);
                this._bar = L.DomUtil.create('span', '', this._progress);
@@ -47,11 +56,36 @@ L.ProgressOverlay = L.Layer.extend({
 
                this._container.style.width  = this._size.x + 'px';
 
+               this._initSpinner();
+
                L.DomEvent
                        .disableClickPropagation(this._progress)
                        .disableScrollPropagation(this._container);
        },
 
+       _initSpinner: function () {
+               this._spinnerCanvas.width = 50;
+               this._spinnerCanvas.height = 50;
+
+               var context = this._spinnerCanvas.getContext('2d');
+               context.lineWidth = 8;
+               context.strokeStyle = 'grey';
+               var x = this._spinnerCanvas.width / 2;
+               var y = this._spinnerCanvas.height / 2;
+               var radius = y - context.lineWidth / 2;
+               var self = this;
+               this._spinnerInterval = setInterval(function() {
+                       context.clearRect(0, 0, x * 2, y * 2);
+                       // Move to center
+                       context.translate(x, y);
+                       context.rotate(self.options.spinnerSpeed * Math.PI / 
180);
+                       context.translate(-x, -y);
+                       context.beginPath();
+                       context.arc(x, y, radius, 0, Math.PI * 1.3);
+                       context.stroke();
+               }, 1);
+       },
+
        _setPos: function (pos) {
                L.DomUtil.setPosition(this._container, pos);
        },
commit 5d5751246cc13df267e1d7bf64d9c33e51e46645
Author: Pranav Kant <pran...@collabora.com>
Date:   Wed May 25 14:23:44 2016 +0530

    bccu#1811: Give the stolen focus back to map
    
    Fallback from d104e82d742047104a79b984bf5b5391b9c76f26
    
    Change-Id: I5885bd11cee9499a26165e6989bb652683c4645d
    (cherry picked from commit 83e625e6e64d04c7610f6872929324a0d92a77c7)

diff --git a/loleaflet/src/control/Control.ContextMenu.js 
b/loleaflet/src/control/Control.ContextMenu.js
index 1947fb1..4ae611a 100644
--- a/loleaflet/src/control/Control.ContextMenu.js
+++ b/loleaflet/src/control/Control.ContextMenu.js
@@ -66,6 +66,8 @@ L.Control.ContextMenu = L.Control.extend({
                                return {
                                        callback: function(key) {
                                                map.sendUnoCommand(key);
+                                               // Give the stolen focus back 
to map
+                                               map.focus();
                                        },
                                        items: contextMenu
                                };
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to