Skip to content

Commit

Permalink
fix: Update OO to 8.2 - EXO-74305
Browse files Browse the repository at this point in the history
Allow to open a pdf in edit mode or in fill mode in processes
  • Loading branch information
rdenarie committed Jan 8, 2025
1 parent 96b198e commit 9d0c0f1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,11 @@ public class ProcessesAttachmentServiceImpl implements ProcessesAttachmentServic

private static final String GROUP_PROCESSES = "*:/platform/processes";

private static final String DOC_OFORM_MIMETYPE = "application/vnd.openxmlformats-officedocument.wordprocessingml.document.form";
private static final String DOC_OFORM_MIMETYPE = "application/pdf";

private static final String DOCXF_EXTENSION = ".docxf";
private static final String DOCXF_EXTENSION = ".pdf";

private static final String OFORM_EXTENSION = ".oform";
private static final String OFORM_EXTENSION = ".pdf";

private static final String WORKFLOW_ENTITY_TYPE = "workflow";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ export default {
return {
newDocumentTitle: null,
NewFormDocInputHidden: true,
extension: '.docxf',
extension: '.pdf',
personalDrive: 'Personal Documents',
defaultFolder: 'Documents',
templateName: 'OnlyOfficeDocumentForm',
templateName: 'OnlyOfficeDocumentFormPdf',
MAX_FILE_NAME_LENGTH: 200
};
},
Expand Down Expand Up @@ -150,4 +150,4 @@ export default {
}
}
};
</script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
:allow-to-detach="false"
:open-in-editor="true"
:is-file-editable="isFileEditable(attachment)"
:is-file-fillable="isFileFillable(attachment)"
allow-to-preview
small-attachment-icon />
</v-list-item-group>
Expand Down Expand Up @@ -133,6 +134,7 @@ export default {
}
},
created() {

this.initEntityAttachmentsList();
if (this.workflowParentSpace) {
this.$spaceService.getSpaceByPrettyName(this.workflowParentSpace.prettyName)
Expand Down Expand Up @@ -182,7 +184,11 @@ export default {
isFileEditable(attachment) {
const type = attachment && attachment.mimetype || '';
return this.supportedDocuments && this.supportedDocuments.filter(doc => doc.edit && doc.mimeType === type
&& !attachment.cloudDriveFile).length > 0;
&& !attachment.cloudDriveFile).length > 0;
},
isFileFillable(attachment) {
const type = attachment && attachment.mimetype || '';
return type === 'application/pdf';
},
refreshSupportedDocumentExtensions () {
this.supportedDocuments = extensionRegistry.loadExtensions('documents', 'supported-document-types');
Expand Down Expand Up @@ -234,4 +240,4 @@ export default {
},
}
};
</script>
</script>

0 comments on commit 9d0c0f1

Please sign in to comment.