diff --git a/editor/extensions/ext-imagelib.js b/editor/extensions/ext-imagelib.js index 642f0071..cb874694 100644 --- a/editor/extensions/ext-imagelib.js +++ b/editor/extensions/ext-imagelib.js @@ -173,10 +173,12 @@ svgEditor.addExtension("imagelib", function() { } else { $(this).text(title); } + submit.removeAttr('disabled'); } }); } else { preview.append('
'+title+'
'); + submit.removeAttr('disabled'); } } else { if(cur_meta && cur_meta.preview_url) { @@ -192,10 +194,12 @@ svgEditor.addExtension("imagelib", function() { preview.children().each(function() { if($(this).data('id') == id) { $(this).html(entry); + submit.removeAttr('disabled'); } }); } else { preview.append($('
').append(entry)); + submit.removeAttr('disabled'); } } @@ -214,11 +218,10 @@ svgEditor.addExtension("imagelib", function() { } }, true); - var preview; + var preview, submit; function toggleMulti(show) { - var submit; - + $('#lib_framewrap, #imglib_opts').css({right: (show ? 200 : 10)}); if(!preview) { preview = $('
').css({ @@ -231,7 +234,7 @@ svgEditor.addExtension("imagelib", function() { overflow: 'auto' }).insertAfter('#lib_framewrap'); - submit = $('').appendTo('#imgbrowse').click(function() { + submit = $('').appendTo('#imgbrowse').click(function() { $.each(multi_arr, function(i) { var type = this[0]; var data = this[1]; @@ -254,6 +257,7 @@ svgEditor.addExtension("imagelib", function() { } preview.toggle(show); + submit.toggle(show); } function showBrowser() { diff --git a/editor/svg-editor.js b/editor/svg-editor.js index 57602b2e..3c88cf98 100644 --- a/editor/svg-editor.js +++ b/editor/svg-editor.js @@ -648,7 +648,7 @@ // select mode and this event fires - we need our UI to be in sync if (mode !== "multiselect" && !is_node) { - console.log('ut'); + // FIXME: This also needs to fire if only one element is selected via multiselect updateToolbar(); }