diff --git a/static/js/exportAnnotationsDialog.js b/static/js/exportAnnotationsDialog.js index 4db7cf84..79f0142d 100644 --- a/static/js/exportAnnotationsDialog.js +++ b/static/js/exportAnnotationsDialog.js @@ -102,6 +102,13 @@ pandora.ui.exportAnnotationsDialog = function(options) { $button.wrap($('')); // On wrap, a reference to the link would *not* be the link in the DOM $link = $($button.parent()); + $link.on({ + click: function() { + setTimeout(() => { + that.close() + }, 10) + } + }) updateLink(); } diff --git a/static/js/importAnnotationsDialog.js b/static/js/importAnnotationsDialog.js index 13e83118..2c11160b 100644 --- a/static/js/importAnnotationsDialog.js +++ b/static/js/importAnnotationsDialog.js @@ -201,10 +201,11 @@ pandora.ui.importAnnotationsDialog = function(options) { pandora.$ui.contentPanel.replaceElement( 1, pandora.$ui.item = pandora.ui.item() ); + that.close(); } else { $status.html(Ox._('Import failed.')); + enableButtons(); } - enableButtons(); }); } else { $status.html(Ox._('Import failed.'));