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

New commits:
commit 8247e8dc4f3295649ceb19bf67da872fb24963f5
Author: Tor Lillqvist <t...@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
    (cherry picked from commit 890c52b622bca074a3f13d5753a732b1775f1a5f)
    Reviewed-on: https://gerrit.libreoffice.org/52102
    Reviewed-by: Jan Holesovsky <ke...@collabora.com>
    Tested-by: Jan Holesovsky <ke...@collabora.com>

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.
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to