diff --git a/app/assets/stylesheets/steps/components/checklist.scss b/app/assets/stylesheets/steps/components/checklist.scss index a8067418f..ee339e878 100644 --- a/app/assets/stylesheets/steps/components/checklist.scss +++ b/app/assets/stylesheets/steps/components/checklist.scss @@ -50,7 +50,7 @@ } .sci-checkbox-container { - margin: 10px 0; + margin: 16px 0; &.disabled { pointer-events: none; diff --git a/app/javascript/vue/protocol/step.vue b/app/javascript/vue/protocol/step.vue index 25daf9763..e48f8b3aa 100644 --- a/app/javascript/vue/protocol/step.vue +++ b/app/javascript/vue/protocol/step.vue @@ -2,7 +2,7 @@
@@ -250,6 +250,16 @@ } }, methods: { + dragEnter(e) { + if (this.showFileModal) return; + + // Detect if dragged element is a file + // https://stackoverflow.com/a/8494918 + let dt = e.dataTransfer; + if (dt.types && (dt.types.indexOf ? dt.types.indexOf('Files') != -1 : dt.types.contains('Files'))) { + this.dragingFile = true; + } + }, loadAttachments() { $.get(this.urls.attachments_url, (result) => { this.attachments = result.data