fix export annotations dialog

This commit is contained in:
rolux 2014-11-01 14:45:33 +00:00
parent f4779195a2
commit 9881884469

View file

@ -34,8 +34,7 @@ pandora.ui.exportAnnotationsDialog = function(options) {
change: function() { change: function() {
updateStatus(); updateStatus();
that.enableButton('export'); that.enableButton('export');
!$link && addLink(); !$link ? addLink() : updateLink();
updateLink();
} }
}) })
.appendTo($content), .appendTo($content),
@ -100,10 +99,10 @@ pandora.ui.exportAnnotationsDialog = function(options) {
function addLink() { function addLink() {
var $button = $(Ox.last(that.find('.OxButton'))) var $button = $(Ox.last(that.find('.OxButton')))
updateLink();
$button.wrap($('<a>')); $button.wrap($('<a>'));
// On wrap, a reference to the link would *not* be the link in the DOM // On wrap, a reference to the link would *not* be the link in the DOM
$link = $($button.parent()); $link = $($button.parent());
updateLink();
} }
function updateLink() { function updateLink() {