mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-05 22:44:22 +08:00
Add spinner to external preview
This commit is contained in:
parent
b2b752fcf8
commit
7d71608166
1 changed files with 3 additions and 0 deletions
|
@ -8,15 +8,18 @@ function applyClickCallbackOnProtocolCards() {
|
|||
protocol_source: $(this).data('protocol-source'),
|
||||
protocol_id: $(this).data('show-protocol-id')
|
||||
},
|
||||
beforeSend: animateSpinner($('.protocol-preview-panel'), true),
|
||||
success: function(data) {
|
||||
$('.empty-preview-panel').hide();
|
||||
$('.full-preview-panel').show();
|
||||
$('.preview-iframe').contents().find('body').html(data.html);
|
||||
animateSpinner($('.protocol-preview-panel'), false);
|
||||
},
|
||||
error: function(_error) {
|
||||
// TODO: we should probably show some alert bubble
|
||||
$('.empty-preview-panel').show();
|
||||
$('.full-preview-panel').hide();
|
||||
animateSpinner($('.protocol-preview-panel'), false);
|
||||
}
|
||||
});
|
||||
e.preventDefault();
|
||||
|
|
Loading…
Reference in a new issue