Reload after adjusting Part attachments

This commit is contained in:
Oliver Walters 2019-05-05 00:53:42 +10:00
parent ecb8e71d75
commit a66bc2fe72

View File

@ -37,7 +37,10 @@
{{ block.super }} {{ block.super }}
$("#new-attachment").click(function() { $("#new-attachment").click(function() {
launchModalForm("{% url 'part-attachment-create' %}?part={{ part.id }}"); launchModalForm("{% url 'part-attachment-create' %}?part={{ part.id }}",
{
reload: true,
});
}); });
$("#attachment-table").on('click', '.attachment-edit-button', function() { $("#attachment-table").on('click', '.attachment-edit-button', function() {
@ -45,9 +48,8 @@
launchModalForm(button.attr('url'), launchModalForm(button.attr('url'),
{ {
success: function() { reload: true,
} });
});
}); });
$("#attachment-table").on('click', '.attachment-delete-button', function() { $("#attachment-table").on('click', '.attachment-delete-button', function() {
@ -55,6 +57,7 @@
launchDeleteForm(button.attr('url'), { launchDeleteForm(button.attr('url'), {
success: function() { success: function() {
location.reload();
} }
}); });
}); });