mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-03 18:03:37 +00:00
5c6ca57474
Change Config/Search Providers texts and descriptions. Fix display when no providers are visible on Config/Search Providers. Fix failing "Search Settings" link that is shown on Config/Search Providers when Torrents Search is not enabled under that Config/Search Settings/Torrent Search tab. Fix failing "Providers" link on Config/Search Settings/Episode Search tab. Change case of labels in General Config/Interface/Timezone. Split enabled from not enabled providers in the Configure Provider drop down on the Providers Options tab.
85 lines
2.8 KiB
JavaScript
85 lines
2.8 KiB
JavaScript
$(document).ready(function(){
|
|
$('.enabler').each(function(){
|
|
if (!$(this).prop('checked'))
|
|
$('#content_' + $(this).attr('id')).hide();
|
|
});
|
|
|
|
$('.enabler').click(function(){
|
|
if ($(this).prop('checked'))
|
|
$('#content_' + $(this).attr('id')).fadeIn('fast', 'linear');
|
|
else
|
|
$('#content_' + $(this).attr('id')).fadeOut('fast', 'linear');
|
|
});
|
|
|
|
$('.viewIf').click(function(){
|
|
if ($(this).prop('checked')) {
|
|
$('.hide_if_' + $(this).attr('id')).css('display','none');
|
|
$('.show_if_' + $(this).attr('id')).fadeIn('fast', 'linear');
|
|
} else {
|
|
$('.show_if_' + $(this).attr('id')).css('display','none');
|
|
$('.hide_if_' + $(this).attr('id')).fadeIn('fast', 'linear');
|
|
}
|
|
});
|
|
|
|
$('.datePresets').click(function(){
|
|
var def = $('#date_presets').val()
|
|
if ($(this).prop('checked') && '%x' == def) {
|
|
def = '%a, %b %d, %Y'
|
|
$('#date_use_system_default').html('1')
|
|
} else if (!$(this).prop('checked') && '1' == $('#date_use_system_default').html())
|
|
def = '%x'
|
|
|
|
$('#date_presets').attr('name', 'date_preset_old')
|
|
$('#date_presets').attr('id', 'date_presets_old')
|
|
|
|
$('#date_presets_na').attr('name', 'date_preset')
|
|
$('#date_presets_na').attr('id', 'date_presets')
|
|
|
|
$('#date_presets_old').attr('name', 'date_preset_na')
|
|
$('#date_presets_old').attr('id', 'date_presets_na')
|
|
|
|
if (def)
|
|
$('#date_presets').val(def)
|
|
});
|
|
|
|
// bind 'myForm' and provide a simple callback function
|
|
$('#configForm').ajaxForm({
|
|
beforeSubmit: function(){
|
|
$('.config_submitter').each(function(){
|
|
$(this).attr('disabled', 'disabled');
|
|
$(this).after('<span><img src="' + sbRoot + '/images/loading16' + themeSpinner + '.gif"> Saving...</span>');
|
|
$(this).hide();
|
|
});
|
|
},
|
|
success: function(){
|
|
setTimeout('config_success()', 2000)
|
|
}
|
|
});
|
|
|
|
$('#api_key').click(function(){ $('#api_key').select() });
|
|
$("#generate_new_apikey").click(function(){
|
|
$.get(sbRoot + '/config/general/generateKey',
|
|
function(data){
|
|
if (data.error != undefined) {
|
|
alert(data.error);
|
|
return;
|
|
}
|
|
$('#api_key').val(data);
|
|
});
|
|
});
|
|
|
|
$('#branchCheckout').click(function(){
|
|
url = sbRoot + '/home/branchCheckout?branch=' + $('#branchVersion').val();
|
|
window.location.href = url;
|
|
});
|
|
|
|
});
|
|
|
|
function config_success(){
|
|
$('.config_submitter').each(function(){
|
|
$(this).removeAttr('disabled');
|
|
$(this).next().remove();
|
|
$(this).show();
|
|
});
|
|
$('#email_show').trigger('notify');
|
|
}
|