From f1ec3776cffb434777e0851f53fa962661fe9be8 Mon Sep 17 00:00:00 2001 From: Alexis Tyler <xo@wvvw.me> Date: Tue, 17 Nov 2015 18:13:06 +1030 Subject: [PATCH] fix config provider linting --- gui/slick/js/core.js | 130 +++++++++++++++++---------------------- gui/slick/js/core.min.js | Bin 47227 -> 48102 bytes 2 files changed, 57 insertions(+), 73 deletions(-) diff --git a/gui/slick/js/core.js b/gui/slick/js/core.js index 2a90e8884..12675949b 100644 --- a/gui/slick/js/core.js +++ b/gui/slick/js/core.js @@ -1544,104 +1544,88 @@ var SICKRAGE = { rpcurl = ' RPC URL'; if (selectedProvider.toLowerCase() !== 'blackhole') { - var label_warning_deluge = '#label_warning_deluge', - label_anime_warning_deluge = '#label_anime_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', - torrent_label_anime_option = '#torrent_label_anime_option', - path_synology = '#path_synology', - torrent_paused_option = '#torrent_paused_option'; - - $(label_warning_deluge).hide(); - $(label_anime_warning_deluge).hide(); - $(label_anime_warning_deluge).hide(); - $(host_desc_rtorrent).hide(); - $(host_desc_torrent).show(); - $(torrent_verify_cert_option).hide(); - $(torrent_verify_deluge).hide(); - $(torrent_verify_rtorrent).hide(); - $(torrent_auth_type_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(); - $(torrent_label_anime_option).show(); - $(path_synology).hide(); - $(torrent_paused_option).show(); - $(torrent_rpcurl_option).hide(); - $(this).rtorrentScgi(); + $('#label_warning_deluge').hide(); + $('#label_anime_warning_deluge').hide(); + $('#host_desc_torrent').show(); + $('#torrent_verify_cert_option').hide(); + $('#torrent_verify_deluge').hide(); + $('#torrent_verify_rtorrent').hide(); + $('#torrent_auth_type_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(); + $('#torrent_label_anime_option').show(); + $('#path_synology').hide(); + $('#torrent_paused_option').show(); + $('#torrent_rpcurl_option').hide(); if (selectedProvider.toLowerCase() === 'utorrent') { client = 'uTorrent'; - $(torrent_path_option).hide(); + $('#torrent_path_option').hide(); $('#torrent_seed_time_label').text('Minimum seeding time is'); - $(torrent_seed_time_option).show(); + $('#torrent_seed_time_option').show(); $('#host_desc_torrent').text('URL to your uTorrent client (e.g. http://localhost:8000)'); } else if (selectedProvider.toLowerCase() === 'transmission'){ client = 'Transmission'; $('#torrent_seed_time_label').text('Stop seeding when inactive for'); - $(torrent_seed_time_option).show(); - $(torrent_high_bandwidth_option).show(); - $(torrent_label_option).hide(); - $(torrent_label_anime_option).hide(); - $(torrent_rpcurl_option).show(); + $('#torrent_seed_time_option').show(); + $('#torrent_high_bandwidth_option').show(); + $('#torrent_label_option').hide(); + $('#torrent_label_anime_option').hide(); + $('#torrent_rpcurl_option').show(); $('#host_desc_torrent').text('URL to your Transmission client (e.g. http://localhost:9091)'); } else if (selectedProvider.toLowerCase() === 'deluge'){ client = 'Deluge'; - $(torrent_verify_cert_option).show(); - $(torrent_verify_deluge).show(); - $(torrent_verify_rtorrent).hide(); - $(label_warning_deluge).show(); - $(label_anime_warning_deluge).show(); + $('#torrent_verify_cert_option').show(); + $('#torrent_verify_deluge').show(); + $('#torrent_verify_rtorrent').hide(); + $('#label_warning_deluge').show(); + $('#label_anime_warning_deluge').show(); $('#torrent_username_option').hide(); $('#torrent_username').prop('value', ''); $('#host_desc_torrent').text('URL to your Deluge client (e.g. http://localhost:8112)'); - } else if ('deluged' == selectedProvider){ + } else if (selectedProvider.toLowerCase() === 'deluged'){ client = 'Deluge'; - $(torrent_verify_cert_option).hide(); - $(torrent_verify_deluge).hide(); - $(torrent_verify_rtorrent).hide(); - $(label_warning_deluge).show(); - $(label_anime_warning_deluge).show(); + $('#torrent_verify_cert_option').hide(); + $('#torrent_verify_deluge').hide(); + $('#torrent_verify_rtorrent').hide(); + $('#label_warning_deluge').show(); + $('#label_anime_warning_deluge').show(); $('#torrent_username_option').show(); $('#host_desc_torrent').text('IP or Hostname of your Deluge Daemon (e.g. scgi://localhost:58846)'); - } else if ('download_station' == selectedProvider){ + } else if (selectedProvider.toLowerCase() === 'download_station'){ client = 'Synology DS'; - $(torrent_label_option).hide(); - $(torrent_label_anime_option).hide(); + $('#torrent_label_option').hide(); + $('#torrent_label_anime_option').hide(); $('#torrent_paused_option').hide(); - $(torrent_path_option).find('.fileBrowser').hide(); + $('#torrent_path_option').find('.fileBrowser').hide(); $('#host_desc_torrent').text('URL to your Synology DS client (e.g. http://localhost:5000)'); - $(path_synology).show(); - } else if ('rtorrent' == selectedProvider){ + $('#path_synology').show(); + } else if (selectedProvider.toLowerCase() === 'rtorrent'){ client = 'rTorrent'; - $(torrent_paused_option).hide(); + $('#torrent_paused_option').hide(); $('#host_desc_torrent').text('URL to your rTorrent client (e.g. scgi://localhost:5000 <br> or https://localhost/rutorrent/plugins/httprpc/action.php)'); - $(torrent_verify_cert_option).show(); - $(torrent_verify_deluge).hide(); - $(torrent_verify_rtorrent).show(); - $(torrent_auth_type_option).show(); - } else if ('qbittorrent' == selectedProvider){ + $('#torrent_verify_cert_option').show(); + $('#torrent_verify_deluge').hide(); + $('#torrent_verify_rtorrent').show(); + $('#torrent_auth_type_option').show(); + } else if (selectedProvider.toLowerCase() === 'qbittorrent'){ client = 'qbittorrent'; - $(torrent_path_option).hide(); - $(torrent_label_option).hide(); - $(torrent_label_anime_option).hide(); + $('#torrent_path_option').hide(); + $('#torrent_label_option').hide(); + $('#torrent_label_anime_option').hide(); $('#host_desc_torrent').text('URL to your qbittorrent client (e.g. http://localhost:8080)'); - } else if ('mlnet' == selectedProvider){ + } else if (selectedProvider.toLowerCase() === 'mlnet'){ client = 'mlnet'; - $(torrent_path_option).hide(); - $(torrent_label_option).hide(); - $(torrent_verify_cert_option).hide(); - $(torrent_verify_deluge).hide(); - $(torrent_verify_rtorrent).hide(); - $(torrent_label_anime_option).hide(); - $(torrent_paused_option).hide(); + $('#torrent_path_option').hide(); + $('#torrent_label_option').hide(); + $('#torrent_verify_cert_option').hide(); + $('#torrent_verify_deluge').hide(); + $('#torrent_verify_rtorrent').hide(); + $('#torrent_label_anime_option').hide(); + $('#torrent_paused_option').hide(); $('#host_desc_torrent').text('URL to your MLDonkey (e.g. http://localhost:4080)'); } $('#host_title').text(client + host); diff --git a/gui/slick/js/core.min.js b/gui/slick/js/core.min.js index fac48e2207d949e1ee031c8ed5a1e974968361bc..b0af1a1280876c5a80447f4db0f5d5b8cac1cb88 100644 GIT binary patch delta 2354 zcmezUf$7<IrVXq-lU17JCd=_mfzkq#Z}a?_tkNVlxu=n1^9SB4=E*8e5|e8M4JWHK ziBGnYp8=BGoGG*$A|WZpJ(*KnaB{pj`{XFGtCL+h#U?k@vut(|w`GDFiPh-IA9&3+ zFOqhGn1W{f<V>Lnn~N1>SSKsjh;Lq~+6gjBY_qk-Z$^;qldUy`Hb-hbg>jTN7wQOr zm4IcI=*1&AYKALd9Er`}jniQqp~+qWBAch0?SdI1w7JOQ4T95XwF{(FVzQs@1aJuW z*|JT}wG*4HV9q&N%x*Q@9Z&3XK)OId!#BCWArvYhu=$xoHOK_9$<`W5o2NK`0I33T zI5*F8J%Ny!=`ojavMZ;|WV-;K&5>TGVKSVP_5D~kJNxd1>zl0ar!(2j{~^={q0L?a z)}Y`M+dM7!2ABcz{^Uq4{>=-*kHWMGZSIKVff*_^IZ{ht^YQ2-5ZO7gA)pYR%oMi+ z9C4@PdO&fuxgh?O3=>!8<iu);$-y;cJo$MVO34|CdFiQ2I+H)vNbrFK((;o_i}OoM zAVOjwq3qPk(gG!&w9>rflFa-(4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