From 05186e5f2c038d2f98256fc1ad5f26f36d97d293 Mon Sep 17 00:00:00 2001 From: Aleksandr Fedorov Date: Fri, 27 Sep 2024 11:04:53 +0300 Subject: [PATCH] delete: link fill form for pdf --- .../conditions/IsOfficeFileAttachment.java | 19 +++---------------- src/main/resources/atlassian-plugin.xml | 10 ---------- .../onlyoffice-button.js | 3 --- src/main/resources/lang-resource.properties | 1 - .../resources/lang-resource_de.properties | 1 - .../resources/lang-resource_es.properties | 1 - .../resources/lang-resource_fr.properties | 1 - .../resources/lang-resource_it.properties | 1 - .../resources/lang-resource_ru.properties | 1 - .../resources/lang-resource_zh_CN.properties | 1 - src/main/resources/templates/preview.vm | 2 -- 11 files changed, 3 insertions(+), 38 deletions(-) diff --git a/src/main/java/onlyoffice/conditions/IsOfficeFileAttachment.java b/src/main/java/onlyoffice/conditions/IsOfficeFileAttachment.java index 5a99c741..6db8ccbd 100644 --- a/src/main/java/onlyoffice/conditions/IsOfficeFileAttachment.java +++ b/src/main/java/onlyoffice/conditions/IsOfficeFileAttachment.java @@ -30,7 +30,6 @@ public class IsOfficeFileAttachment implements Condition { private boolean forEdit; - private boolean form; private DocumentManager documentManager; private AttachmentUtil attachmentUtil; @@ -41,13 +40,9 @@ public IsOfficeFileAttachment(final DocumentManager documentManager, final Attac public void init(final Map params) throws PluginParseException { forEdit = false; - form = false; if (params != null && !params.isEmpty() && params.get("forEdit") != null) { forEdit = !params.get("forEdit").isEmpty(); } - if (params != null && !params.isEmpty() && params.get("form") != null) { - form = !params.get("form").isEmpty(); - } } public boolean shouldDisplay(final Map context) { @@ -65,20 +60,12 @@ public boolean shouldDisplay(final Map context) { String fileName = attachment.getFileName(); if (forEdit) { - if (form) { - if (accessEdit && documentManager.isFillable(fileName)) { - return true; - } - } else { - if (accessEdit && documentManager.isEditable(fileName) && !documentManager.isFillable(fileName)) { - return true; - } + if (accessEdit && documentManager.isEditable(fileName)) { + return true; } } else { if (accessView - && documentManager.isViewable(fileName) - && !(accessEdit && documentManager.isEditable(fileName)) - && !(accessEdit && documentManager.isFillable(fileName)) + && documentManager.isViewable(fileName) && !(accessEdit && documentManager.isEditable(fileName)) ) { return true; } diff --git a/src/main/resources/atlassian-plugin.xml b/src/main/resources/atlassian-plugin.xml index 1e6c6e3f..eeff44ab 100644 --- a/src/main/resources/atlassian-plugin.xml +++ b/src/main/resources/atlassian-plugin.xml @@ -147,16 +147,6 @@ onlyoffice-doceditor - - - true - true - - The link and the text for it which is used to open the .oform document to fill in the fields in the form. - Link and text for this link used to open the document which is available for preview only. diff --git a/src/main/resources/js/confluence-previews-plugin/onlyoffice-button.js b/src/main/resources/js/confluence-previews-plugin/onlyoffice-button.js index d3d00d98..7ea3d995 100644 --- a/src/main/resources/js/confluence-previews-plugin/onlyoffice-button.js +++ b/src/main/resources/js/confluence-previews-plugin/onlyoffice-button.js @@ -54,9 +54,6 @@ define('cp/component/onlyoffice-button', [ title = AJS.I18n.getText('onlyoffice.editor.editlink'); } else if (response.access == "view") { title = AJS.I18n.getText('onlyoffice.editor.viewlink'); - } else if (response.access == "fillForms") { - title = AJS.I18n.getText('onlyoffice.editor.fillFormlink'); - mode = "fillForms"; } } diff --git a/src/main/resources/lang-resource.properties b/src/main/resources/lang-resource.properties index ec830702..638200d4 100644 --- a/src/main/resources/lang-resource.properties +++ b/src/main/resources/lang-resource.properties @@ -38,7 +38,6 @@ onlyoffice.configuration.banner.message=Easily launch the editors in the cloud w onlyoffice.configuration.banner.button=Get Now onlyoffice.editor.editlink=Edit in ONLYOFFICE onlyoffice.editor.viewlink=View in ONLYOFFICE -onlyoffice.editor.fillFormlink=Open in ONLYOFFICE onlyoffice.editor.createlink=New document onlyoffice.editor.createlink.tooltip=Create new file onlyoffice.editor.dialog.filecreate.docx=Document diff --git a/src/main/resources/lang-resource_de.properties b/src/main/resources/lang-resource_de.properties index 17544e63..a268b951 100644 --- a/src/main/resources/lang-resource_de.properties +++ b/src/main/resources/lang-resource_de.properties @@ -38,7 +38,6 @@ onlyoffice.configuration.banner.message=\u00d6ffnen Sie die Editoren in der Clou onlyoffice.configuration.banner.button=Jetzt erhalten onlyoffice.editor.editlink=Mit ONLYOFFICE bearbeiten onlyoffice.editor.viewlink=Ansicht in ONLYOFFICE -onlyoffice.editor.fillFormlink=In ONLYOFFICE \u00f6ffnen onlyoffice.editor.createlink=Neues Dokument onlyoffice.editor.createlink.tooltip=Neue Datei erstellen onlyoffice.editor.dialog.filecreate.docx=Dokument diff --git a/src/main/resources/lang-resource_es.properties b/src/main/resources/lang-resource_es.properties index 517964e8..b52e9f54 100644 --- a/src/main/resources/lang-resource_es.properties +++ b/src/main/resources/lang-resource_es.properties @@ -38,7 +38,6 @@ onlyoffice.configuration.banner.message=Inicie f\u00e1cilmente los editores en l onlyoffice.configuration.banner.button=Obtener ahora onlyoffice.editor.editlink=Editar en ONLYOFFICE onlyoffice.editor.viewlink=Ver en ONLYOFFICE -onlyoffice.editor.fillFormlink=Abrir en ONLYOFFICE onlyoffice.editor.createlink=Nuevo documento onlyoffice.editor.createlink.tooltip=Crear nuevo archivo onlyoffice.editor.dialog.filecreate.docx=Documento diff --git a/src/main/resources/lang-resource_fr.properties b/src/main/resources/lang-resource_fr.properties index 77edde14..ea50093a 100644 --- a/src/main/resources/lang-resource_fr.properties +++ b/src/main/resources/lang-resource_fr.properties @@ -38,7 +38,6 @@ onlyoffice.configuration.banner.message=Lancez facilement les \u00e9diteurs dans onlyoffice.configuration.banner.button=Obtenir maintenant onlyoffice.editor.editlink=Modifier dans ONLYOFFICE onlyoffice.editor.viewlink=Voir dans ONLYOFFICE -onlyoffice.editor.fillFormlink=Ouvrir dans ONLYOFFICE onlyoffice.editor.createlink=Nouveau document onlyoffice.editor.createlink.tooltip=\u0421\u0072\u00e9\u0065\u0072 un nouveau fichier onlyoffice.editor.dialog.filecreate.docx=Document diff --git a/src/main/resources/lang-resource_it.properties b/src/main/resources/lang-resource_it.properties index b510949d..e4d0dc0c 100644 --- a/src/main/resources/lang-resource_it.properties +++ b/src/main/resources/lang-resource_it.properties @@ -38,7 +38,6 @@ onlyoffice.configuration.banner.message=Avvia facilmente gli editor nel cloud se onlyoffice.configuration.banner.button=Ottieni ora onlyoffice.editor.editlink=Modifica in ONLYOFFICE onlyoffice.editor.viewlink=Visualizza in ONLYOFFICE -onlyoffice.editor.fillFormlink=Apri in ONLYOFFICE onlyoffice.editor.createlink=Nuovo documento onlyoffice.editor.createlink.tooltip=Crea un nuovo file onlyoffice.editor.dialog.filecreate.docx=Documento diff --git a/src/main/resources/lang-resource_ru.properties b/src/main/resources/lang-resource_ru.properties index 35cb35df..84972ef0 100644 --- a/src/main/resources/lang-resource_ru.properties +++ b/src/main/resources/lang-resource_ru.properties @@ -38,7 +38,6 @@ onlyoffice.configuration.banner.message=\u041b\u0435\u0433\u043a\u043e\u0020\u04 onlyoffice.configuration.banner.button=\u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c\u0020\u0441\u0435\u0439\u0447\u0430\u0441 onlyoffice.editor.editlink=\u0420\u0435\u0434\u0430\u043A\u0442\u0438\u0440\u043E\u0432\u0430\u0442\u044C \u0432 ONLYOFFICE onlyoffice.editor.viewlink=\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0432 ONLYOFFICE -onlyoffice.editor.fillFormlink=\u041e\u0442\u043a\u0440\u044b\u0442\u044c \u0432 ONLYOFFICE onlyoffice.editor.createlink=\u041d\u043e\u0432\u044b\u0439\u0020\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442 onlyoffice.editor.createlink.tooltip=\u0421\u043e\u0437\u0434\u0430\u0442\u044c\u0020\u043d\u043e\u0432\u044b\u0439\u0020\u0444\u0430\u0439\u043b\u0020 onlyoffice.editor.dialog.filecreate.docx=\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442 diff --git a/src/main/resources/lang-resource_zh_CN.properties b/src/main/resources/lang-resource_zh_CN.properties index fd2bc3b7..939eda63 100644 --- a/src/main/resources/lang-resource_zh_CN.properties +++ b/src/main/resources/lang-resource_zh_CN.properties @@ -36,7 +36,6 @@ onlyoffice.configuration.message.settings.saving-error=\u4FDD\u5B58\u8BBE\u7F6E\ onlyoffice.configuration.banner.message=\u65E0\u9700\u4E0B\u8F7D\u548C\u5B89\u88C5\u5373\u53EF\u8F7B\u677E\u542F\u52A8\u4E91\u7AEF\u7F16\u8F91\u5668 onlyoffice.configuration.banner.button=\u7ACB\u5373\u83B7\u53D6 onlyoffice.editor.editlink=\u4F7F\u7528 ONLYOFFICE \u7F16\u8F91 -onlyoffice.editor.viewlink=\u4F7F\u7528 ONLYOFFICE \u67E5\u770B onlyoffice.editor.fillFormlink=\u7528 ONLYOFFICE \u6253\u5f00 onlyoffice.editor.createlink=\u65B0\u5EFA\u6587\u6863 onlyoffice.editor.createlink.tooltip=\u65B0\u5EFA\u6587\u4EF6 diff --git a/src/main/resources/templates/preview.vm b/src/main/resources/templates/preview.vm index fc406ec8..74f93fa2 100644 --- a/src/main/resources/templates/preview.vm +++ b/src/main/resources/templates/preview.vm @@ -3,8 +3,6 @@ #if($action == "edit") $i18n.getText('onlyoffice.editor.editlink') - #elseif($action == "fill") - $i18n.getText('onlyoffice.editor.fillFormlink') #end