mirror of
https://github.com/moparisthebest/SickRage
synced 2024-11-16 06:15:09 -05:00
2ab436b764
Fix for default provider not being passed in properly.
35 lines
1.3 KiB
JavaScript
35 lines
1.3 KiB
JavaScript
$(document).ready(function () {
|
|
|
|
$('#saveDefaultsButton').click(function () {
|
|
var anyQualArray = [];
|
|
var bestQualArray = [];
|
|
$('#anyQualities option:selected').each(function (i, d) {
|
|
anyQualArray.push($(d).val());
|
|
});
|
|
$('#bestQualities option:selected').each(function (i, d) {
|
|
bestQualArray.push($(d).val());
|
|
});
|
|
|
|
$.get(sbRoot + '/config/general/saveAddShowDefaults', {
|
|
defaultStatus: $('#statusSelect').val(),
|
|
anyQualities: anyQualArray.join(','),
|
|
bestQualities: bestQualArray.join(','),
|
|
defaultFlattenFolders: $('#flatten_folders').prop('checked'),
|
|
subtitles: $('#subtitles').prop('checked'),
|
|
anime: $('#anime').prop('checked'),
|
|
scene: $('#scene').prop('checked')
|
|
});
|
|
|
|
$(this).attr('disabled', true);
|
|
$.pnotify({
|
|
pnotify_title: 'Saved Defaults',
|
|
pnotify_text: 'Your "add show" defaults have been set to your current selections.',
|
|
pnotify_shadow: false
|
|
});
|
|
});
|
|
|
|
$('#statusSelect, #qualityPreset, #flatten_folders, #anyQualities, #bestQualities, #subtitles, #scene, #anime').change(function () {
|
|
$('#saveDefaultsButton').attr('disabled', false);
|
|
});
|
|
|
|
}); |