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-75d572ba1dddmaster
parent
5ff2311348
commit
395badc387
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue