[Libreoffice-commits] online.git: loleaflet/main.js

Tor Lillqvist tml at collabora.com
Wed Mar 28 10:13:42 UTC 2018


 loleaflet/main.js |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 890c52b622bca074a3f13d5753a732b1775f1a5f
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Jan 18 18:37:01 2018 +0200

    Add a notWopiButIframe property to the options object
    
    Set to true iff the URL for the enclosing document had a non-empty
    parameter called NotWOPIButIframe, as in for example
    http://snorken.local:9980/loleaflet/94781ec6/loleaflet.html?file_path=file:///home/tml/lo/internal-online/test/data/empty.ods&NotWOPIButIframe=true
    . In this case the enclosing document (i.e. loleaflet.html) should be
    displayed in an iframe of an enclosing HTML document.
    
    Change-Id: I202e2a726ce15a23785b6d9accba4c123517197a

diff --git a/loleaflet/main.js b/loleaflet/main.js
index 8a79a8bb5..0438a818e 100644
--- a/loleaflet/main.js
+++ b/loleaflet/main.js
@@ -99,6 +99,8 @@ if (wopiSrc != '') {
 	docParams = {};
 }
 
+var notWopiButIframe = getParameterByName('NotWOPIButIframe') != '';
+
 var map = L.map('map', {
 	server: host,
 	doc: docURL,
@@ -107,8 +109,10 @@ var map = L.map('map', {
 	timestamp: timestamp,
 	documentContainer: 'document-container',
 	debug: debugMode,
+	// the wopi and wopiSrc properties are in sync: false/true : empty/non-empty
 	wopi: isWopi,
 	wopiSrc: wopiSrc,
+	notWopiButIframe: notWopiButIframe,
 	alwaysActive: alwaysActive,
 	idleTimeoutSecs: idleTimeoutSecs,  // Dim when user is idle.
 	outOfFocusTimeoutSecs: outOfFocusTimeoutSecs // Dim after switching tabs.


More information about the Libreoffice-commits mailing list