Live update part image

This commit is contained in:
Oliver 2021-06-23 19:28:23 +10:00
parent 2e1ad0c245
commit 70a073be21

View File

@ -244,7 +244,14 @@
label: 'image', label: 'image',
method: 'PATCH', method: 'PATCH',
success: function(data, status, xhr) { success: function(data, status, xhr) {
location.reload();
// If image / thumbnail data present, live update
if (data.image) {
$('#part-image').attr('src', data.image);
} else {
// Otherwise, reload the page
location.reload();
}
} }
} }
); );