mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-03 18:03:37 +00:00
fafc972f31
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.
31 lines
No EOL
786 B
JavaScript
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());
|
|
}); |