mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-06 12:43:06 +08:00
Fix file preview not showing in modal when processing is done
Close SCI-3587
This commit is contained in:
parent
20134c9f8a
commit
0ee0b1c834
2 changed files with 2 additions and 1 deletions
|
@ -509,7 +509,7 @@ var FilePreviewModal = (function() {
|
|||
}, CHECK_READY_DELAY);
|
||||
}
|
||||
} else {
|
||||
if (data.type === 'image') {
|
||||
if (data.type === 'image' || (data.type === 'file' && data['preview-icon'])) {
|
||||
modal.find('.file-preview-container').empty();
|
||||
modal.find('.file-preview-container')
|
||||
.append($('<img>')
|
||||
|
|
|
@ -76,6 +76,7 @@ class AssetsController < ApplicationController
|
|||
)
|
||||
else
|
||||
response_json['processing'] = @asset.file.processing?
|
||||
response_json['large-preview-url'] = @asset.url(:large)
|
||||
response_json['preview-icon'] = render_to_string(
|
||||
partial: 'shared/file_preview_icon.html.erb',
|
||||
locals: { asset: @asset }
|
||||
|
|
Loading…
Reference in a new issue