mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-11 09:26:37 +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() {
|
function initLoadProtocolModalPreview() {
|
||||||
$('.external-import-btn').off('click').on('click', function(e) {
|
$('.external-import-btn').off('click').on('click', function(e) {
|
||||||
var link = $(this).parents('.protocol-card');
|
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);
|
animateSpinner(null, true);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: link.data('url'),
|
url: link.data('url'),
|
||||||
|
|
Loading…
Reference in a new issue