1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-12 11:02:21 -05:00

Overhaul Config Search Settings in line with General Configuration.

Improve text wording on many UI elements under Search Settings.
Improve reduce over use of capitals.
Change prevent specific rTorrent guidance from showing everywhere.
Fix duplicate html IDs used on the Torrent Search tab, there can be only ONE ID!
Improve streamline UI layout, mark-up, and javascript, remove unused DOM setters.
Clean up text, correct quotations, use spaces for code lines, tabs for html.
This commit is contained in:
JackDandy 2014-10-29 02:55:59 +00:00
parent 4ab2b141a1
commit 1b2195d246
3 changed files with 605 additions and 688 deletions

View File

@ -26,7 +26,7 @@
* Fix Layout "Poster" sort of Paused, Ended, and Continuing shows as they were random
* Fix Layout "Simple" sort of tvrage "New" and "Returning" series by changing status column text to "Continuing"
* Add dark spinner to "Add New Show" (searching indexers), "Add existing shows" (Loading Folders), Coming Eps and all config pages (when saving)
* Overhaul Config Search Settings in line with General Configuration
### 0.2.1 (2014-10-22 06:41:00 UTC)

File diff suppressed because it is too large Load Diff

View File

@ -1,126 +1,113 @@
$(document).ready(function(){
var loading = '<img src="'+sbRoot+'/images/loading16' + themeSpinner + '.gif" height="16" width="16" />';
function toggle_torrent_title(){
if ($('#use_torrents').prop('checked'))
$('#no-torrents').show();
else
$('#no-torrents').hide();
}
var loading = '<img src="' + sbRoot + '/images/loading16' + themeSpinner + '.gif" height="16" width="16" />';
function toggle_torrent_title(){
if ($('#use_torrents').prop('checked'))
$('#no_torrents').show();
else
$('#no_torrents').hide();
}
$.fn.nzb_method_handler = function() {
var selectedProvider = $('#nzb_method :selected').val();
if (selectedProvider == "blackhole") {
$('#blackhole_settings').show();
$('#sabnzbd_settings').hide();
$('#testSABnzbd').hide();
$('#testSABnzbd-result').hide();
$('#nzbget_settings').hide();
} else if (selectedProvider == "nzbget") {
$('#blackhole_settings').hide();
$('#sabnzbd_settings').hide();
$('#testSABnzbd').hide();
$('#testSABnzbd-result').hide();
$('#nzbget_settings').show();
var selectedProvider = $('#nzb_method :selected').val(),
blackhole_settings = '#blackhole_settings',
sabnzbd_settings = '#sabnzbd_settings',
testSABnzbd = '#testSABnzbd',
testSABnzbd_result = '#testSABnzbd_result',
nzbget_settings = '#nzbget_settings';
$(blackhole_settings).hide();
$(sabnzbd_settings).hide();
$(testSABnzbd).hide();
$(testSABnzbd_result).hide();
$(nzbget_settings).hide();
if ('blackhole' == selectedProvider) {
$(blackhole_settings).show();
} else if ('nzbget' == selectedProvider) {
$(nzbget_settings).show();
} else {
$('#blackhole_settings').hide();
$('#sabnzbd_settings').show();
$('#testSABnzbd').show();
$('#testSABnzbd-result').show();
$('#nzbget_settings').hide();
$(sabnzbd_settings).show();
$(testSABnzbd).show();
$(testSABnzbd_result).show();
}
}
$.fn.torrent_method_handler = function() {
var selectedProvider = $('#torrent_method :selected').val();
if (selectedProvider == "blackhole") {
$('#t_blackhole_settings').show();
$('#torrent_settings').hide();
} else if (selectedProvider == "utorrent") {
$('#t_blackhole_settings').hide();
$('#torrent_settings').show();
$('#Torrent_Verify_Cert').hide();
$('#Torrent_username').show();
$('#Torrent_Path').hide();
$('#Torrent_Ratio').show();
$('#Torrent_Seed_Time').show();
$('#Torrent_High_Bandwidth').hide();
$('#Torrent_Label').show();
$('#label_warning').text('');
$('#host_desc').text('uTorrent Host');
$('#username_desc').text('uTorrent Username');
$('#password_desc').text('uTorrent Password');
$('#label_desc').text('uTorrent Label');
} else if (selectedProvider == "transmission"){
$('#t_blackhole_settings').hide();
$('#torrent_settings').show();
$('#Torrent_Verify_Cert').hide();
$('#Torrent_username').show();
$('#Torrent_Path').show();
$('#Torrent_Ratio').show();
$('#Torrent_Seed_Time').show();
$('#Torrent_High_Bandwidth').show();
$('#Torrent_Label').hide();
$('#host_desc').html('Transmission Host');
$('#username_desc').text('Transmission Username');
$('#password_desc').text('Transmission Password');
$('#directory_desc').text('Transmission Directory');
} else if (selectedProvider == "deluge"){
$('#t_blackhole_settings').hide();
$('#torrent_settings').show();
$('#Torrent_Verify_Cert').show();
$('#Torrent_Label').show();
$('#Torrent_username').show();
$('#Torrent_Path').show();
$('#Torrent_Ratio').show();
$('#Torrent_Seed_Time').hide();
$('#Torrent_High_Bandwidth').hide();
$('#host_desc').text('Deluge Host');
$('#username_desc').text('Deluge Username');
$('#password_desc').text('Deluge Password');
$('#label_desc').text('Deluge Label');
$('#label_warning').text('Note: Label plugin must be enabled in Deluge client. No blank spaces are allowed in label name');
$('#directory_desc').text('Deluge Directory');
} else if (selectedProvider == "download_station"){
$('#t_blackhole_settings').hide();
$('#torrent_settings').show();
$('#Torrent_Verify_Cert').hide();
$('#Torrent_Label').hide();
$('#Torrent_username').show();
$('#Torrent_Paused').hide();
$('#Torrent_Path').show();
$('#Torrent_Ratio').hide();
$('#Torrent_Seed_Time').hide();
$('#Torrent_High_Bandwidth').hide();
$('#host_desc').text('Synology Host');
$('#username_desc').text('Synology Username');
$('#password_desc').text('Synology Password');
$('#label_desc').text('Synology Label');
$('#directory_desc').text('Synology Directory');
$('#Torrent_Path').find('.fileBrowser').hide();
} else if (selectedProvider == "rtorrent"){
$('#t_blackhole_settings').hide();
$('#torrent_settings').show();
$('#Torrent_Verify_Cert').hide();
$('#Torrent_Label').show();
$('#Torrent_username').show();
$('#Torrent_Paused').hide();
$('#Torrent_Path').show();
$('#Torrent_Ratio').hide();
$('#Torrent_Seed_Time').hide();
$('#Torrent_High_Bandwidth').hide();
$('#host_desc').text('rTorrent Host');
$('#username_desc').text('rTorrent Username');
$('#password_desc').text('rTorrent Password');
$('#label_desc').text('rTorrent Label');
$('#label_warning').text('');
$('#directory_desc').text('rTorrent Directory');
$('#options_torrent_clients').hide();
$('#options_torrent_blackhole').hide();
var selectedProvider = $('#torrent_method :selected').val(),
host = ' host:port',
username = ' username',
password = ' password',
label = ' label',
directory = ' directory',
client = '',
option_panel = '#options_torrent_blackhole';
if ('blackhole' != selectedProvider) {
var label_warning_deluge = '#label_warning_deluge',
host_desc_rtorrent = '#host_desc_rtorrent',
host_desc_torrent = '#host_desc_torrent',
torrent_verify_cert_option = '#torrent_verify_cert_option',
torrent_path_option = '#torrent_path_option',
torrent_seed_time_option = '#torrent_seed_time_option',
torrent_high_bandwidth_option = '#torrent_high_bandwidth_option',
torrent_label_option = '#torrent_label_option',
path_synology = '#path_synology',
torrent_paused_option = '#torrent_paused_option';
$(label_warning_deluge).hide();
$(host_desc_rtorrent).hide();
$(host_desc_torrent).show();
$(torrent_verify_cert_option).hide();
$(torrent_path_option).show();
$(torrent_path_option).find('.fileBrowser').show();
$(torrent_seed_time_option).hide();
$(torrent_high_bandwidth_option).hide();
$(torrent_label_option).show();
$(path_synology).hide();
$(torrent_paused_option).show();
if ('utorrent' == selectedProvider) {
client = 'uTorrent';
$(torrent_path_option).hide();
$(torrent_seed_time_option).show();
} else if ('transmission' == selectedProvider){
client = 'Transmission';
$(torrent_seed_time_option).show();
$(torrent_high_bandwidth_option).show();
$(torrent_label_option).hide();
//$('#directory_title').text(client + directory);
} else if ('deluge' == selectedProvider){
client = 'Deluge';
$(torrent_verify_cert_option).show();
$(label_warning_deluge).show();
//$('#directory_title').text(client + directory);
} else if ('download_station' == selectedProvider){
client = 'Synology DS';
$(torrent_label_option).hide();
$('#torrent_paused_option').hide();
$(torrent_path_option).find('.fileBrowser').hide();
//$('#directory_title').text(client + directory);
$(path_synology).show();
} else if ('rtorrent' == selectedProvider){
client = 'rTorrent';
$(host_desc_torrent).hide();
$(host_desc_rtorrent).show();
$(torrent_paused_option).hide();
//$('#directory_title').text(client + directory);
}
$('#host_title').text(client + host);
$('#username_title').text(client + username);
$('#password_title').text(client + password);
$('#torrent_client').text(client);
option_panel = '#options_torrent_clients';
}
$(option_panel).show();
}
$('#nzb_method').change($(this).nzb_method_handler);
@ -128,34 +115,34 @@ $(document).ready(function(){
$(this).nzb_method_handler();
$('#testSABnzbd').click(function(){
$('#testSABnzbd-result').html(loading);
$('#testSABnzbd_result').html(loading);
var sab_host = $('#sab_host').val();
var sab_username = $('#sab_username').val();
var sab_password = $('#sab_password').val();
var sab_apiKey = $('#sab_apikey').val();
$.get(sbRoot+"/home/testSABnzbd", {'host': sab_host, 'username': sab_username, 'password': sab_password, 'apikey': sab_apiKey},
function (data){ $('#testSABnzbd-result').html(data); });
$.get(sbRoot + '/home/testSABnzbd', {'host': sab_host, 'username': sab_username, 'password': sab_password, 'apikey': sab_apiKey},
function (data){ $('#testSABnzbd_result').html(data); });
});
$('#torrent_method').change($(this).torrent_method_handler);
$(this).torrent_method_handler();
$(this).torrent_method_handler();
$('#use_torrents').click(function(){
toggle_torrent_title();
toggle_torrent_title();
});
$('#testTorrent').click(function(){
$('#testTorrent-result').html(loading);
var torrent_method = $('#torrent_method :selected').val();
$('#test_torrent').click(function(){
$('#test_torrent_result').html(loading);
var torrent_method = $('#torrent_method :selected').val();
var torrent_host = $('#torrent_host').val();
var torrent_username = $('#torrent_username').val();
var torrent_password = $('#torrent_password').val();
$.get(sbRoot+"/home/testTorrent", {'torrent_method': torrent_method, 'host': torrent_host, 'username': torrent_username, 'password': torrent_password},
function (data){ $('#testTorrent-result').html(data); });
$.get(sbRoot + '/home/testTorrent', {'torrent_method': torrent_method, 'host': torrent_host, 'username': torrent_username, 'password': torrent_password},
function (data){ $('#test_torrent_result').html(data); });
});
});