Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/richdocuments.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMert Tumer <mert.tumer@collabora.com>2020-10-20 13:20:07 +0300
committerMert Tumer <mert.tumer@collabora.com>2020-10-20 15:13:42 +0300
commite4c3cb4f92748cad89e1762f4a892213e0b839aa (patch)
tree83b6c4792fcb3589341f4093230d9cb7cadaab1c /src
parent886ddb62ce5fbcb8ba210ce90c27a78066b3188a (diff)
Passing some UI Defaults to loleaflet frame
These ui defaults determine some widget states at the start of the document which is hidden or shown Some of them such as Ruler Statusbar and Sidebar can be hidden at start with this patch. If not set, collabora online will assume they are true Signed-off-by: Mert Tumer <mert.tumer@collabora.com>
Diffstat (limited to 'src')
-rw-r--r--src/document.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/document.js b/src/document.js
index 7aa4ac91..2f6a1b5a 100644
--- a/src/document.js
+++ b/src/document.js
@@ -176,7 +176,8 @@ const documentsMain = {
// form to post the access token for WOPISrc
const form = '<form id="loleafletform_viewer" name="loleafletform_viewer" target="loleafletframe_viewer" action="' + urlsrc + '" method="post">'
- + '<input name="access_token" value="' + accessToken + '" type="hidden"/></form>'
+ + '<input name="access_token" value="' + accessToken + '" type="hidden"/>'
+ + '<input name="ui_defaults" value="TextRuler=false;TextStatusbar=true;TextSidebar=false;PresentationSidebar=false;PresentationStatusbar=true;SpreadsheetSidebar=false" type="hidden"/></form>'
// iframe that contains the Collabora Online Viewer
const frame = '<iframe id="loleafletframe_viewer" name="loleafletframe_viewer" nonce="' + btoa(getRequestToken()) + '" style="width:100%;height:100%;position:absolute;"/>'
@@ -225,7 +226,8 @@ const documentsMain = {
// form to post the access token for WOPISrc
var form = '<form id="loleafletform" name="loleafletform" target="loleafletframe" action="' + urlsrc + '" method="post">'
- + '<input name="access_token" value="' + accessToken + '" type="hidden"/></form>'
+ + '<input name="access_token" value="' + accessToken + '" type="hidden"/>'
+ + '<input name="ui_defaults" value="TextRuler=true;TextStatusbar=true;TextSidebar=true;PresentationSidebar=true;PresentationStatusbar=true;SpreadsheetSidebar=true" type="hidden"/></form>'
// iframe that contains the Collabora Online
var frame = '<iframe id="loleafletframe" name="loleafletframe" nonce="' + btoa(getRequestToken()) + '" scrolling="no" allowfullscreen style="width:100%;height:100%;position:absolute;" />'