From c750dbcfea6189069f2aa7336e670ad83aac1814 Mon Sep 17 00:00:00 2001 From: Sergey Konovalov Date: Tue, 24 Sep 2024 12:44:40 +0300 Subject: [PATCH] [wopi] Set 'edit' as default action for pdf --- DocService/sources/wopiClient.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/DocService/sources/wopiClient.js b/DocService/sources/wopiClient.js index 525f5bf3..c874aea5 100644 --- a/DocService/sources/wopiClient.js +++ b/DocService/sources/wopiClient.js @@ -214,8 +214,8 @@ function discovery(req, res) { xmlApp.ele('action', {name: 'embedview', ext: ext.edit[j], urlsrc: urlTemplateEmbedView}).up(); xmlApp.ele('action', {name: 'mobileView', ext: ext.edit[j], urlsrc: urlTemplateMobileView}).up(); if (formsExts[ext.edit[j]]) { - xmlApp.ele('action', {name: 'formsubmit', ext: ext.edit[j], default: 'true', requires: 'locks,update', urlsrc: urlTemplateFormSubmit}).up(); - xmlApp.ele('action', {name: 'edit', ext: ext.edit[j], requires: 'locks,update', urlsrc: urlTemplateEdit}).up(); + xmlApp.ele('action', {name: 'edit', ext: ext.edit[j], default: 'true', requires: 'locks,update', urlsrc: urlTemplateEdit}).up(); + xmlApp.ele('action', {name: 'formsubmit', ext: ext.edit[j], requires: 'locks,update', urlsrc: urlTemplateFormSubmit}).up(); } else { xmlApp.ele('action', {name: 'edit', ext: ext.edit[j], default: 'true', requires: 'locks,update', urlsrc: urlTemplateEdit}).up(); } @@ -258,8 +258,8 @@ function discovery(req, res) { mimeTypes.forEach((value) => { let xmlApp = xmlZone.ele('app', {name: value}); if (formsExts[ext.edit[j]]) { - xmlApp.ele('action', {name: 'formsubmit', ext: '', default: 'true', requires: 'locks,update', urlsrc: urlTemplateFormSubmit}).up(); - xmlApp.ele('action', {name: 'edit', ext: '', requires: 'locks,update', urlsrc: urlTemplateEdit}).up(); + xmlApp.ele('action', {name: 'edit', ext: '', default: 'true', requires: 'locks,update', urlsrc: urlTemplateEdit}).up(); + xmlApp.ele('action', {name: 'formsubmit', ext: '', requires: 'locks,update', urlsrc: urlTemplateFormSubmit}).up(); } else { xmlApp.ele('action', {name: 'edit', ext: '', default: 'true', requires: 'locks,update', urlsrc: urlTemplateEdit}).up(); }