mirror of
https://github.com/inventree/InvenTree.git
synced 2026-11-30 11:34:41 +00:00
Enable drag-and-drop attachment upload for Part
This commit is contained in:
1 parent
cedf9a9108
commit
db01f3646a
3 files changed
+25
-1
No files matched your search
@@ -16,6 +16,20 @@
|
||||
{% block js_ready %}
|
||||
{{ block.super }}
|
||||
|
||||
enableDragAndDrop(
|
||||
'#attachment-dropzone',
|
||||
"{% url 'part-attachment-create' %}",
|
||||
{
|
||||
data: {
|
||||
part: {{ part.id }},
|
||||
},
|
||||
label: 'attachment',
|
||||
success: function(data, status, xhr) {
|
||||
location.reload();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
$("#new-attachment").click(function() {
|
||||
launchModalForm("{% url 'part-attachment-create' %}?part={{ part.id }}",
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user