From 98818844695b1fb7848054229270a3eea80aee60 Mon Sep 17 00:00:00 2001 From: rolux Date: Sat, 1 Nov 2014 14:45:33 +0000 Subject: [PATCH] fix export annotations dialog --- static/js/exportAnnotationsDialog.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/static/js/exportAnnotationsDialog.js b/static/js/exportAnnotationsDialog.js index 8af9dd00..b75f583f 100644 --- a/static/js/exportAnnotationsDialog.js +++ b/static/js/exportAnnotationsDialog.js @@ -34,8 +34,7 @@ pandora.ui.exportAnnotationsDialog = function(options) { change: function() { updateStatus(); that.enableButton('export'); - !$link && addLink(); - updateLink(); + !$link ? addLink() : updateLink(); } }) .appendTo($content), @@ -100,10 +99,10 @@ pandora.ui.exportAnnotationsDialog = function(options) { function addLink() { var $button = $(Ox.last(that.find('.OxButton'))) - updateLink(); $button.wrap($('')); // On wrap, a reference to the link would *not* be the link in the DOM $link = $($button.parent()); + updateLink(); } function updateLink() { @@ -141,4 +140,4 @@ pandora.ui.exportAnnotationsDialog = function(options) { return that; -}; \ No newline at end of file +};