[WOPI] Add queryParams parameter

This commit is contained in:
Sergey Konovalov 2021-04-23 17:44:57 +03:00
parent f1a5a910fb
commit 74b63277f5
No known key found for this signature in database
GPG key ID: 9BC70BEFF12CC5AE

View file

@ -144,15 +144,14 @@ div {
var fileInfo = <%- JSON.stringify(fileInfo) %>; var fileInfo = <%- JSON.stringify(fileInfo) %>;
var userAuth = <%- JSON.stringify(userAuth) %>; var userAuth = <%- JSON.stringify(userAuth) %>;
var token = "<%- token %>"; var token = "<%- token %>";
var documentType = "<%- documentType %>"; var queryParams = <%- JSON.stringify(queryParams) %>;
var mode = "<%- mode %>";
var fileType = fileInfo.BaseFileName ? fileInfo.BaseFileName.substr(fileInfo.BaseFileName.lastIndexOf('.') + 1) : ""; var fileType = fileInfo.BaseFileName ? fileInfo.BaseFileName.substr(fileInfo.BaseFileName.lastIndexOf('.') + 1) : "";
var config = { var config = {
"width": "100%", "width": "100%",
"height": "100%", "height": "100%",
"type": "desktop", "type": "desktop",
"documentType": documentType, "documentType": queryParams.documenttype,
"token": token, "token": token,
"document": { "document": {
"title": fileInfo.BaseFileName, "title": fileInfo.BaseFileName,
@ -177,7 +176,7 @@ div {
}, },
"editorConfig": { "editorConfig": {
"actionLink": "null", "actionLink": "null",
"mode": mode, "mode": queryParams.mode,
"lang": "en", "lang": "en",
"callbackUrl": JSON.stringify(userAuth), "callbackUrl": JSON.stringify(userAuth),
"user": { "user": {