From 6331a5b672d04d807a50020f0200b8fffd0b3c07 Mon Sep 17 00:00:00 2001 From: Sergey Konovalov Date: Thu, 21 Apr 2022 18:29:34 +0300 Subject: [PATCH] [wopi] Add embedview action to discovery; For bug 56772 --- DocService/sources/wopiClient.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/DocService/sources/wopiClient.js b/DocService/sources/wopiClient.js index 3ac3db52..c94456b8 100644 --- a/DocService/sources/wopiClient.js +++ b/DocService/sources/wopiClient.js @@ -105,7 +105,7 @@ function discovery(req, res) { let exts = [{view: cfgWopiWordView, edit: cfgWopiWordEdit}, {view: cfgWopiCellView, edit: cfgWopiCellEdit}, {view: cfgWopiSlideView, edit: cfgWopiSlideEdit}]; let templateStart = `${baseUrl}/hosting/wopi`; - let templateEnd = `&<rs=DC_LLCC&><dchat=DISABLE_CHAT&><e=EMBEDDED&>`; + let templateEnd = `&<rs=DC_LLCC&><dchat=DISABLE_CHAT&><embed=EMBEDDED&>`; templateEnd += `<fs=FULLSCREEN&><hid=HOST_SESSION_ID&><rec=RECORDING&>`; templateEnd += `<sc=SESSION_CONTEXT&><thm=THEME_ID&><ui=UI_LLCC&>`; templateEnd += `<wopisrc=WOPI_SOURCE&>&`; @@ -120,13 +120,16 @@ function discovery(req, res) { } let ext = exts[i]; let urlTemplateView = `${templateStart}/${documentTypes[i]}/view?${templateEnd}`; + let urlTemplateEmbedView = `${templateStart}/${documentTypes[i]}/view?embed=1${templateEnd}`; let urlTemplateEdit = `${templateStart}/${documentTypes[i]}/edit?${templateEnd}`; output +=``; for (let j = 0; j < ext.view.length; ++j) { output += ``; + output += ``; } for (let j = 0; j < ext.edit.length; ++j) { output += ``; + output += ``; if ("oform" !== ext.edit[j]) { //todo config output += ``; @@ -140,6 +143,7 @@ function discovery(req, res) { for(let i = 0; i < exts.length; ++i) { let ext = exts[i]; let urlTemplateView = `${templateStart}/${documentTypes[i]}/view?${templateEnd}`; + let urlTemplateEmbedView = `${templateStart}/${documentTypes[i]}/view?embed=1${templateEnd}`; let urlTemplateEdit = `${templateStart}/${documentTypes[i]}/edit?${templateEnd}`; for (let j = 0; j < ext.view.length; ++j) { let mimeTypes = mimeTypesByExt[ext.view[j]]; @@ -147,6 +151,7 @@ function discovery(req, res) { mimeTypes.forEach((value) => { output += ``; output += ``; + output += ``; output += ``; }); }