mirror of
https://github.com/inventree/InvenTree.git
synced 2025-06-19 21:45:39 +00:00
Reset modal image when a new image is uploaded
This commit is contained in:
@ -328,6 +328,12 @@
|
||||
// If image / thumbnail data present, live update
|
||||
if (data.image) {
|
||||
$('#part-image').attr('src', data.image);
|
||||
|
||||
// Reset the "modal image" view
|
||||
$('#part-thumb').click(function() {
|
||||
showModalImage(data.image);
|
||||
});
|
||||
|
||||
} else {
|
||||
// Otherwise, reload the page
|
||||
location.reload();
|
||||
|
Reference in New Issue
Block a user