[Libreoffice-commits] online.git: 3 commits - loleaflet/html loleaflet/src

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Nov 28 15:46:51 UTC 2018


 loleaflet/html/framed.html            |    2 +-
 loleaflet/src/map/handler/Map.WOPI.js |    6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 1dd186528696bf33257dd9dcb1434ac9206efab7
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Wed Nov 28 16:44:33 2018 +0100
Commit:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Wed Nov 28 16:46:24 2018 +0100

    framed.html: Use better defaults for URL
    
    so that only the hash code needs to be changed (in normal setups)
    
    Change-Id: Idde78ecc030573612128f0ee8d50ad95333fa72b

diff --git a/loleaflet/html/framed.html b/loleaflet/html/framed.html
index c3384b256..8b4f324c6 100644
--- a/loleaflet/html/framed.html
+++ b/loleaflet/html/framed.html
@@ -204,6 +204,6 @@
     the hex string needs to be changed of course, to the right one as
     shown by 'make run'. -->
 
-    <iframe src="http://snorken.local:9980/loleaflet/3304e9093/loleaflet.html?file_path=file:///home/tml/lo/online/test/data/empty.ods&NotWOPIButIframe=true" height="1000" width="1000"></iframe>
+    <iframe src="http://localhost:9980/loleaflet/b766728b5/loleaflet.html?file_path=file:///libreoffice/online/test/data/hello-world.ods&NotWOPIButIframe=true" height="1000" width="1000"></iframe>
   </body>
 </html>
commit 46f318c3584b810cc1b366c3510c8871b4eca886
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Wed Nov 28 16:41:20 2018 +0100
Commit:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Wed Nov 28 16:46:24 2018 +0100

    resizeToolbar is undefined
    
    But it inserting buttons seems to work fine even without that call,
    so just remove it.
    
    Change-Id: I831b171c57feed82e1ca778ba5a16a382f1786ee

diff --git a/loleaflet/src/map/handler/Map.WOPI.js b/loleaflet/src/map/handler/Map.WOPI.js
index e5728c9e9..18e86c7c6 100644
--- a/loleaflet/src/map/handler/Map.WOPI.js
+++ b/loleaflet/src/map/handler/Map.WOPI.js
@@ -3,7 +3,7 @@
  * L.WOPI contains WOPI related logic
  */
 
-/* global $ w2ui toolbarUpMobileItems resizeToolbar _ */
+/* global $ w2ui toolbarUpMobileItems _ */
 L.Map.WOPI = L.Handler.extend({
 	// If the CheckFileInfo call fails on server side, we won't have any PostMessageOrigin.
 	// So use '*' because we still needs to send 'close' message to the parent frame which
@@ -175,7 +175,6 @@ L.Map.WOPI = L.Handler.extend({
 							var idx = toolbarUpMobileItems.indexOf('save');
 							toolbarUpMobileItems.splice(idx, 0, msg.Values.id);
 						}
-						resizeToolbar();
 					}
 					else if (this._map._permission === 'readonly') {
 						// Just add a menu entry for it
commit a9008c844dcd13220a89e259af484f1ea1573583
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Wed Nov 28 16:38:25 2018 +0100
Commit:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Wed Nov 28 16:46:24 2018 +0100

    Display image url for buttons inserted with postMessage 'Insert_Button'
    
    There was no <style> element in the <head>.
    So we need to create it when it's not there.
    
    Change-Id: Id0202b194e1438bd96401851d35e1f1630a78d8e

diff --git a/loleaflet/src/map/handler/Map.WOPI.js b/loleaflet/src/map/handler/Map.WOPI.js
index 1b7806f59..e5728c9e9 100644
--- a/loleaflet/src/map/handler/Map.WOPI.js
+++ b/loleaflet/src/map/handler/Map.WOPI.js
@@ -152,6 +152,9 @@ L.Map.WOPI = L.Handler.extend({
 				    && msg.Values.imgurl) {
 					if (this._map._permission === 'edit') {
 						// add the css rule for the image
+						var style = $('html > head > style');
+						if (style.length == 0)
+							$('html > head').append('<style/>');
 						$('html > head > style').append('.w2ui-icon.' + msg.Values.id + '{background: url(' + msg.Values.imgurl + ') no-repeat center !important; }');
 
 						// add the item to the toolbar


More information about the Libreoffice-commits mailing list