This commit is contained in:
Jakob Haufe 2022-05-01 14:33:44 +00:00
parent c6d3cd9bae
commit 72f330ab75
No known key found for this signature in database
GPG Key ID: 4CF2B218F54DAE3D

View File

@ -193,6 +193,34 @@ src="{% static 'img/blank_image.png' %}"
{% block js_ready %}
{{ block.super }}
onPanelLoad("attachments", function() {
loadAttachmentTable('{% url "api-manufacturer-part-attachment-list" %}', {
filters: {
manufacturer_part: {{ part.pk }},
},
fields: {
manufacturer_part: {
value: {{ part.pk }},
hidden: true
}
}
});
enableDragAndDrop(
'#attachment-dropzone',
'{% url "api-manufacturer-part-attachment-list" %}',
{
data: {
manufacturer_part: {{ part.id }},
},
label: 'attachment',
success: function(data, status, xhr) {
reloadAttachmentTable();
}
}
);
});
function reloadParameters() {
$("#parameter-table").bootstrapTable("refresh");
}