mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-05 22:44:22 +08:00
Fix non-existent protocol-card in preview banner
This commit is contained in:
parent
149f45f4fc
commit
1a9fca87d2
1 changed files with 5 additions and 0 deletions
|
@ -165,6 +165,11 @@ function handleFormSubmit(modal) {
|
|||
function initLoadProtocolModalPreview() {
|
||||
$('.external-import-btn').off('click').on('click', function(e) {
|
||||
var link = $(this).parents('.protocol-card');
|
||||
|
||||
// When clicking on the banner button, we have no protocol-card parent
|
||||
if (link.length == 0)
|
||||
link = $('.protocol-card.active');
|
||||
|
||||
animateSpinner(null, true);
|
||||
$.ajax({
|
||||
url: link.data('url'),
|
||||
|
|
Loading…
Reference in a new issue