mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-21 15:36:22 +08:00
Fix issue previewing image after edit [SCI-8914] (#5908)
* Fix issue previewing image after edit [SCI-8914]
This commit is contained in:
parent
fcd76661c7
commit
6c18a5a622
|
@ -1,4 +1,4 @@
|
|||
/* global animateSpinner fabric PerfectScrollbar refreshProtocolStatusBar tui Uint8Array*/
|
||||
/* global animateSpinner fabric PerfectScrollbar refreshProtocolStatusBar tui Uint8Array ActiveStoragePreviews*/
|
||||
/* eslint-disable no-underscore-dangle */
|
||||
|
||||
var ImageEditorModal = (function() {
|
||||
|
@ -364,9 +364,14 @@ var ImageEditorModal = (function() {
|
|||
contentType: false,
|
||||
processData: false,
|
||||
success: function(res) {
|
||||
$(`.asset[data-asset-id=${data.id}] .image-container img`).replaceWith($(res.html).find('.image-container img'));
|
||||
$(`.asset[data-asset-id=${data.id}] .attachment-preview img`).replaceWith($(res.html).find('attachment-preview img'));
|
||||
$(`.asset[data-asset-id=${data.id}] .image-container img`)
|
||||
.replaceWith($(res.html).find('.image-container img'));
|
||||
$(`.asset[data-asset-id=${data.id}] .attachment-preview img`)
|
||||
.replaceWith($(res.html).find('.attachment-preview img'));
|
||||
$(`.asset[data-asset-id=${data.id}]`).closest('.attachments').trigger('reorder');
|
||||
$(`.asset[data-asset-id=${data.id}] .attachment-preview img`)
|
||||
.one('error', (event) => ActiveStoragePreviews.reCheckPreview(event))
|
||||
.one('load', (event) => ActiveStoragePreviews.showPreview(event));
|
||||
closeEditor();
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue