mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Drag-and-drop attachments for stock item
This commit is contained in:
parent
db01f3646a
commit
7143c32fc9
@ -346,9 +346,11 @@
|
|||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
.dropzone * {
|
.dropzone * {
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
.dragover {
|
.dragover {
|
||||||
background-color: #55A;
|
background-color: #55A;
|
||||||
|
@ -17,6 +17,20 @@
|
|||||||
{% block js_ready %}
|
{% block js_ready %}
|
||||||
{{ block.super }}
|
{{ block.super }}
|
||||||
|
|
||||||
|
enableDragAndDrop(
|
||||||
|
'#attachment-dropzone',
|
||||||
|
"{% url 'stock-item-attachment-create' %}",
|
||||||
|
{
|
||||||
|
data: {
|
||||||
|
stock_item: {{ item.id }},
|
||||||
|
},
|
||||||
|
label: 'attachment',
|
||||||
|
success: function(data, status, xhr) {
|
||||||
|
location.reload();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
$("#new-attachment").click(function() {
|
$("#new-attachment").click(function() {
|
||||||
launchModalForm("{% url 'stock-item-attachment-create' %}?item={{ item.id }}",
|
launchModalForm("{% url 'stock-item-attachment-create' %}?item={{ item.id }}",
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user