mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-31 01:10:39 +08:00
Fix drag n drop for locked tasks [SCI-7123
This commit is contained in:
parent
c2242b6cc8
commit
d8bcdb09e4
2 changed files with 3 additions and 1 deletions
app/javascript/vue/protocol
|
@ -22,6 +22,8 @@ export default {
|
||||||
let filesUploadedCntr = 0;
|
let filesUploadedCntr = 0;
|
||||||
this.showFileModal = false;
|
this.showFileModal = false;
|
||||||
|
|
||||||
|
if (!this.step.attributes.urls.upload_attachment_url) return false;
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
$(files).each((_, file) => {
|
$(files).each((_, file) => {
|
||||||
const fileObject = {
|
const fileObject = {
|
||||||
|
|
|
@ -254,7 +254,7 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
dragEnter(e) {
|
dragEnter(e) {
|
||||||
if (this.showFileModal) return;
|
if (this.showFileModal || !urls.upload_attachment_url) return;
|
||||||
|
|
||||||
// Detect if dragged element is a file
|
// Detect if dragged element is a file
|
||||||
// https://stackoverflow.com/a/8494918
|
// https://stackoverflow.com/a/8494918
|
||||||
|
|
Loading…
Add table
Reference in a new issue