Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Chiefs
ChiefSend
Commits
a67e3dcd
Commit
a67e3dcd
authored
Oct 23, 2020
by
Lukas Bhm
Browse files
fixed tag
parent
33597b40
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/static/js/drag-and-drop.js
0 → 100644
View file @
a67e3dcd
$
(
"
.custom-file-input
"
).
on
(
"
change
"
,
function
()
{
updateFileList
();
});
// -------------
// DRAG AND DROP
// -------------
const
dropArea
=
document
.
body
;
const
output
=
document
.
getElementById
(
'
uploaded-items
'
);
const
fileField
=
document
.
getElementById
(
'
files
'
);
if
(
window
.
FileList
&&
window
.
File
)
{
dropArea
.
addEventListener
(
'
dragenter
'
,
event
=>
{
//$(".card").removeClass("shadow");
//$(".card").addClass("drag");
});
dropArea
.
addEventListener
(
'
dragover
'
,
event
=>
{
console
.
log
(
"
DRAG ENTER
"
);
event
.
stopPropagation
();
event
.
preventDefault
();
event
.
dataTransfer
.
dropEffect
=
'
copy
'
;
});
dropArea
.
addEventListener
(
'
dragleave
'
,
()
=>
{
//$(".card").removeClass("drag");
//$(".card").addClass("shadow");
});
dropArea
.
addEventListener
(
'
drop
'
,
event
=>
{
event
.
stopPropagation
();
event
.
preventDefault
();
//$(".card").removeClass("drag");
//$(".card").addClass("shadow");
fileField
.
files
=
event
.
dataTransfer
.
files
;
updateFileList
();
});
}
\ No newline at end of file
app/templates/Upload.html
View file @
a67e3dcd
...
@@ -102,6 +102,4 @@
...
@@ -102,6 +102,4 @@
}
}
});
});
</script>
</script>
});
</script>
{% endblock content %}
{% endblock content %}
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment