Fixed issue 697

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1770 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Alexis Deveria 2010-09-29 20:32:28 +00:00
parent e26eb40fcc
commit 1988023fe0
2 changed files with 9 additions and 5 deletions

View File

@ -173,10 +173,12 @@ svgEditor.addExtension("imagelib", function() {
} else {
$(this).text(title);
}
submit.removeAttr('disabled');
}
});
} else {
preview.append('<div>'+title+'</div>');
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($('<div>').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 = $('<div id=imglib_preview>').css({
@ -231,7 +234,7 @@ svgEditor.addExtension("imagelib", function() {
overflow: 'auto'
}).insertAfter('#lib_framewrap');
submit = $('<button>Import selected</button>').appendTo('#imgbrowse').click(function() {
submit = $('<button disabled>Import selected</button>').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() {

View File

@ -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();
}