SVG-Edit fixes
Some bugfixes from the latest SVG-Edit
This commit is contained in:
parent
105c1d79e7
commit
8aa3a9e929
7 changed files with 360 additions and 99 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue