Avoid duplicate sliders when switching between WEBP and JPEG (thanks adrianbjones for the report!); fix tabs

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@2616 eee81c28-f429-11dd-99c0-75d572ba1ddd
master
Brett Zamir 2013-10-29 07:07:09 +00:00
parent 5ff2311348
commit 395badc387
1 changed files with 21 additions and 19 deletions

View File

@ -2575,8 +2575,10 @@
}, function () { }, function () {
var sel = $(this); var sel = $(this);
if (sel.val() === 'JPEG' || sel.val() === 'WEBP') { if (sel.val() === 'JPEG' || sel.val() === 'WEBP') {
if (!$('#image-slider').length) {
$('<div><label>Quality: <input id="image-slider" type="range" min="1" max="100" value="92" /></label></div>').appendTo(sel.parent()); // Todo: i18n-ize label $('<div><label>Quality: <input id="image-slider" type="range" min="1" max="100" value="92" /></label></div>').appendTo(sel.parent()); // Todo: i18n-ize label
} }
}
else { else {
$('#image-slider').parent().remove(); $('#image-slider').parent().remove();
} }