SickGear/gui/slick/js/qualityChooser.js
JackDandy fafc972f31 Fix edit on show page for shows that have anime enabled in mass edit.
Change to only show option "End upgrade on first match" on edit show page if quality custom is selected.
Change label "Show is grouped in" in edit show page to "Show is in group" and move the section higher.
2015-07-17 00:14:24 +01:00

31 lines
No EOL
786 B
JavaScript

function setFromPresets (preset) {
var elCustomQuality = $('.show-if-quality-custom'),
selected = 'selected';
if (0 == preset) {
elCustomQuality.show();
return;
}
elCustomQuality.hide();
$('#anyQualities').find('option').each(function() {
var result = preset & $(this).val();
$(this).attr(selected, (0 < result ? selected : false));
});
$('#bestQualities').find('option').each(function() {
var result = preset & ($(this).val() << 16);
$(this).attr(selected, (result > 0 ? selected: false));
});
}
$(document).ready(function() {
var elQualityPreset = $('#qualityPreset'),
selected = ':selected';
elQualityPreset.change(function() {
setFromPresets($('#qualityPreset').find(selected).val());
});
setFromPresets(elQualityPreset.find(selected).val());
});