mirror of
https://github.com/publiclab/image-sequencer.git
synced 2025-12-14 20:30:01 +01:00
Fixed buggy file upload container (#1841)
Co-authored-by: Jeffrey Warren <jeff@unterbahn.com>
This commit is contained in:
@@ -78,7 +78,8 @@ body > .container-fluid {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.hover {
|
.hover {
|
||||||
background: #eee;
|
border: 4px dashed #888888;
|
||||||
|
background: #F0F0F0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.step {
|
.step {
|
||||||
|
|||||||
@@ -114,10 +114,10 @@ function setInputStepInit() {
|
|||||||
dropzone[0].addEventListener('drop', handleFile, false);
|
dropzone[0].addEventListener('drop', handleFile, false);
|
||||||
|
|
||||||
dropzone.on('dragover', function onDragover(e) {
|
dropzone.on('dragover', function onDragover(e) {
|
||||||
e.stopPropagation();
|
dropzone.addClass('hover');
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
e.dataTransfer.dropEffect = 'copy'; // Explicitly show this is a copy.
|
e.stopPropagation();
|
||||||
}, false);
|
});
|
||||||
|
|
||||||
dropzone.on('dragenter', function onDragEnter(e) {
|
dropzone.on('dragenter', function onDragEnter(e) {
|
||||||
dropzone.addClass('hover');
|
dropzone.addClass('hover');
|
||||||
@@ -127,6 +127,11 @@ function setInputStepInit() {
|
|||||||
dropzone.removeClass('hover');
|
dropzone.removeClass('hover');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
dropzone.on('drop', function onDrop(e) {
|
||||||
|
dropzone.removeClass('hover');
|
||||||
|
e.preventDefault();
|
||||||
|
});
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user