2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-19 13:35:40 +00:00

Provide function callback when file is dropped

- https://stackoverflow.com/questions/6756583/prevent-browser-from-loading-a-drag-and-dropped-file
-
This commit is contained in:
Oliver Walters
2019-05-06 21:22:31 +10:00
parent dca26b5810
commit eec0fc34d2
3 changed files with 35 additions and 12 deletions

View File

@ -101,6 +101,18 @@
{% block js_ready %}
{{ block.super }}
$('#part-thumb').on('drop', function(event) {
var transfer = event.originalEvent.dataTransfer;
var files = transfer.files;
console.log('dropped');
//$(this).removeClass('dragover');
});
$("#show-qr-code").click(function() {
launchModalForm(
"{% url 'part-qr' part.id %}",