From b382bb441ed68ab703c677969cac1d1e169dd5f8 Mon Sep 17 00:00:00 2001 From: Gregor Lasnibat Date: Sat, 2 Sep 2023 06:44:30 +0200 Subject: [PATCH] Fix save empty OVE [SCI-9193] --- app/javascript/vue/ove/OpenVectorEditor.vue | 6 +++--- app/javascript/vue/protocol/attachments.vue | 2 +- app/javascript/vue/protocol/step.vue | 24 ++++++++++----------- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/app/javascript/vue/ove/OpenVectorEditor.vue b/app/javascript/vue/ove/OpenVectorEditor.vue index 4eb9e47e6..dc7cd257a 100644 --- a/app/javascript/vue/ove/OpenVectorEditor.vue +++ b/app/javascript/vue/ove/OpenVectorEditor.vue @@ -55,6 +55,7 @@ generatePng: true, readOnly: this.readOnly, showMenuBar: true, + alwaysAllowSave: true, ToolBarProps: { toolList: [ 'saveTool', @@ -108,12 +109,11 @@ ); }, saveAndClose() { - this.closeAfterSave = close; - document.querySelector('[data-test=saveTool]').click(); + this.closeAfterSave = true; + document.querySelector('[data-test=saveTool]').click() }, saveFile(opts, sequenceDataToSave, editorState, onSuccessCallback) { if (this.readOnly) return; - blobToBase64(opts.pngFile).then((base64image) => { (this.fileUrl ? axios.patch : axios.post)( this.updateUrl, diff --git a/app/javascript/vue/protocol/attachments.vue b/app/javascript/vue/protocol/attachments.vue index c2e5da344..9ac6afba3 100644 --- a/app/javascript/vue/protocol/attachments.vue +++ b/app/javascript/vue/protocol/attachments.vue @@ -1,5 +1,5 @@