2011-10-19 20:55:11 +04:00
|
|
|
<div id="ConnectionTab" class="PrefTab">
|
2011-09-20 21:35:33 +04:00
|
|
|
<fieldset class="settings">
|
|
|
|
<legend>_(Listening Port)</legend>
|
2011-10-02 13:35:27 +04:00
|
|
|
<label for="port_value">_(Port used for incoming connections:)</label>
|
|
|
|
<input type="text" id="port_value" style="width: 4em;"/><br/>
|
|
|
|
<input type="checkbox" id="upnp_checkbox"/>
|
|
|
|
<label for="upnp_checkbox">_(Use UPnP / NAT-PMP port forwarding from my router)</label>
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
</fieldset>
|
2011-09-20 21:35:33 +04:00
|
|
|
<fieldset class="settings">
|
|
|
|
<legend>_(Connections Limits)</legend>
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
<table>
|
|
|
|
<tr>
|
2011-10-02 13:35:27 +04:00
|
|
|
<td>
|
|
|
|
<input type="checkbox" id="max_connec_checkbox" onClick="updateMaxConnecEnabled();"/>
|
|
|
|
<label for="max_connec_checkbox">_(Global maximum number of connections:)</label>
|
|
|
|
</td>
|
|
|
|
<td><input type="text" id="max_connec_value" style="width: 4em;"/></td>
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2011-10-02 13:35:27 +04:00
|
|
|
<td>
|
|
|
|
<input type="checkbox" id="max_connec_per_torrent_checkbox" onClick="updateMaxConnecPerTorrentEnabled();"/>
|
|
|
|
<label for="max_connec_per_torrent_checkbox">_(Maximum number of connections per torrent:)</label>
|
|
|
|
</td>
|
|
|
|
<td><input type="text" id="max_connec_per_torrent_value" style="width: 4em;"/></td>
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2011-10-02 13:35:27 +04:00
|
|
|
<td>
|
|
|
|
<input type="checkbox" id="max_uploads_per_torrent_checkbox" onClick="updateMaxUploadsPerTorrentEnabled();"/>
|
|
|
|
<label for="max_uploads_per_torrent_checkbox">_(Maximum number of upload slots per torrent:)</label>
|
|
|
|
</td>
|
|
|
|
<td><input type="text" id="max_uploads_per_torrent_value" style="width: 4em;"/></td>
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
</fieldset>
|
2011-09-20 21:35:33 +04:00
|
|
|
<fieldset class="settings">
|
|
|
|
<legend>_(Global Rate Limits)</legend>
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
<table>
|
|
|
|
<tr>
|
2011-10-02 13:35:27 +04:00
|
|
|
<td>
|
|
|
|
<input type="checkbox" id="up_limit_checkbox" onClick="updateUpLimitEnabled();"/>
|
|
|
|
<label for ="up_limit_checkbox">_(Upload:)</label>
|
|
|
|
</td>
|
|
|
|
<td><input type="text" id="up_limit_value" style="width: 4em;"/> _(KiB/s)</td>
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
</tr>
|
|
|
|
<tr>
|
2011-10-02 13:35:27 +04:00
|
|
|
<td>
|
|
|
|
<input type="checkbox" id="dl_limit_checkbox" onClick="updateDlLimitEnabled();"/>
|
|
|
|
<label for="dl_limit_checkbox">_(Download:)</label>
|
|
|
|
</td>
|
|
|
|
<td><input type="text" id="dl_limit_value" style="width: 4em;"/> _(KiB/s)</td>
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
</tr>
|
|
|
|
</table>
|
2011-09-20 21:35:33 +04:00
|
|
|
<fieldset class="settings">
|
|
|
|
<legend>_(Options)</legend>
|
2011-10-02 13:35:27 +04:00
|
|
|
<input type="checkbox" id="enable_utp_checkbox"/>
|
|
|
|
<label for="enable_utp_checkbox">_(Enable bandwidth management (uTP))</label><br/>
|
|
|
|
<input type="checkbox" id="limit_utp_rate_checkbox"/>
|
|
|
|
<label for="limit_utp_rate_checkbox">_(Apply rate limit to uTP connections)</label><br/>
|
|
|
|
<input type="checkbox" id="limit_tcp_overhead_checkbox"/>
|
|
|
|
<label for="limit_tcp_overhead_checkbox">_(Apply rate limit to transport overhead)</label><br/>
|
2011-06-05 20:08:30 +04:00
|
|
|
</fieldset>
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
</fieldset>
|
2011-10-19 20:55:11 +04:00
|
|
|
<fieldset class="settings">
|
|
|
|
<legend>_(Alternative Global Rate Limits)</legend>
|
|
|
|
<table>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
_(Upload:)
|
|
|
|
</td>
|
|
|
|
<td><input type="text" id="alt_up_limit_value" style="width: 4em;"/> _(KiB/s)</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
_(Download:)
|
|
|
|
</td>
|
|
|
|
<td><input type="text" id="alt_dl_limit_value" style="width: 4em;"/> _(KiB/s)</td>
|
|
|
|
</tr>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<fieldset class="settings">
|
|
|
|
<legend><input type="checkbox" id="limit_sheduling_checkbox" onClick="updateSchedulingEnabled();"/>
|
|
|
|
<label for="limit_sheduling_checkbox">_(Schedule the use of alternative rate limits)</label></legend>
|
|
|
|
_(from)
|
|
|
|
<input type="text" id="schedule_from_hour" style="width: 1.5em;"/>:<input type="text" id="schedule_from_min" style="width: 1.5em;"/>
|
|
|
|
_(to)
|
|
|
|
<input type="text" id="schedule_to_hour" style="width: 1.5em;"/>:<input type="text" id="schedule_to_min" style="width: 1.5em;"/>
|
|
|
|
<br/>
|
|
|
|
_(When:)
|
|
|
|
<select id="schedule_freq_select">
|
|
|
|
<option value="0">_(Every day)</option>
|
|
|
|
<option value="1">_(Week days)</option>
|
|
|
|
<option value="2">_(Week ends)</option>
|
|
|
|
<option value="3">_(Monday)</option>
|
|
|
|
<option value="4">_(Tuesday)</option>
|
|
|
|
<option value="5">_(Wednesday)</option>
|
|
|
|
<option value="6">_(Thursday)</option>
|
|
|
|
<option value="7">_(Friday)</option>
|
|
|
|
<option value="8">_(Saturday)</option>
|
|
|
|
<option value="9">_(Sunday)</option>
|
|
|
|
</select>
|
|
|
|
</br/>
|
|
|
|
</fieldset>
|
|
|
|
</fieldset>
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="BittorrentTab" class="PrefTab invisible">
|
2011-09-20 21:35:33 +04:00
|
|
|
<fieldset class="settings">
|
|
|
|
<legend>_(Privacy)</legend>
|
2011-10-02 13:35:27 +04:00
|
|
|
<input type="checkbox" id="dht_checkbox"/>
|
|
|
|
<label for="dht_checkbox">_(Enable DHT (decentralized network) to find more peers)</label><br/>
|
|
|
|
<input type="checkbox" id="DHTPortDiffThanBT_checkbox" onclick="updateDHTPortSettings();"/>
|
|
|
|
<label for="DHTPortDiffThanBT_checkbox">_(Use a different port for DHT and BitTorrent)</label><br/>
|
|
|
|
<label for="DHTPort_txt" style="margin-left: 20px;">_(DHT port:)</label>
|
|
|
|
<input type="text" id="DHTPort_txt" value="6881"/><br/>
|
|
|
|
<input type="checkbox" id="pex_checkbox"/>
|
|
|
|
<label for="pex_checkbox">_(Enable Peer Exchange (PeX) to find more peers)</label><br/>
|
|
|
|
<input type="checkbox" id="lsd_checkbox"/>
|
|
|
|
<label for="lsd_checkbox">_(Enable Local Peer Discovery to find more peers)</label><br/>
|
|
|
|
|
|
|
|
<label for="encryption_select">_(Encryption mode:)</label>
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
<select id="encryption_select">
|
2010-12-06 13:16:10 +03:00
|
|
|
<option value="0">_(Prefer encryption)</option>
|
|
|
|
<option value="1">_(Require encryption)</option>
|
|
|
|
<option value="2">_(Disable encryption)</option>
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
</select><br/>
|
2011-10-02 13:35:27 +04:00
|
|
|
<input type="checkbox" id="anonymous_mode_checkbox" onClick="toggleAnonymousMode()"/>
|
2013-11-17 23:17:48 +04:00
|
|
|
<label for="anonymous_mode_checkbox">_(Enable anonymous mode) (<a href="https://github.com/qbittorrent/qBittorrent/wiki/Anonymous-Mode">More information</a>)</label><br/>
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
</fieldset>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="DownloadsTab" class="PrefTab invisible">
|
2011-09-20 21:35:33 +04:00
|
|
|
<fieldset class="settings">
|
|
|
|
<legend>_(Hard Disk)</legend>
|
2011-10-02 13:35:27 +04:00
|
|
|
<div class="formRow">
|
|
|
|
<label for="savepath_text" class="leftLabelLarge">_(Save files to location:)</label>
|
|
|
|
<input type="text" id="savepath_text"/>
|
|
|
|
</div>
|
|
|
|
<div class="formRow">
|
|
|
|
<input type="checkbox" id="temppath_checkbox" onclick="updateTempDirEnabled();"/>
|
|
|
|
<label for="temppath_checkbox">_(Keep incomplete torrents in:)</label>
|
|
|
|
<input type="text" id="temppath_text"/>
|
|
|
|
</div>
|
|
|
|
<br/>
|
|
|
|
_(Automatically add torrents from:)<br/>
|
|
|
|
<table border="1" id="watched_folders_tab">
|
2010-06-29 12:44:56 +04:00
|
|
|
<thead><tr><th>_(Watched Folder)</th><th>_(Download here)</th></tr></thead>
|
2010-03-18 22:25:16 +03:00
|
|
|
<tbody></tbody>
|
2010-12-13 21:22:19 +03:00
|
|
|
<tfoot><tr><td style="padding-top:4px;"><input type="text" id="new_watch_folder_txt"/></td><td style="padding-top:4px;"><input type="checkbox" id="new_watch_folder_dl" style="padding-left:18px;"/><img src="theme/list-add" alt="Add" style="padding-left:2px;width:16px;cursor:pointer;margin-right:-18px;" onclick="javascript:addWatchFolder();"/></td></tr></tfoot>
|
2011-10-02 13:35:27 +04:00
|
|
|
</table><br/>
|
|
|
|
|
|
|
|
<input type="checkbox" id="exportdir_checkbox" onclick="updateExportDirEnabled();"/>
|
|
|
|
<label for="exportdir_checkbox">_(Copy .torrent files to:)</label>
|
|
|
|
<input type="text" id="exportdir_text"/><br/>
|
|
|
|
<span id="appendexttr">
|
|
|
|
<input type="checkbox" id="appendext_checkbox"/>
|
|
|
|
<label for="appendext_checkbox">_(Append .!qB extension to incomplete files)</label><br/>
|
|
|
|
</span>
|
|
|
|
|
|
|
|
<input type="checkbox" id="preallocateall_checkbox"/>
|
|
|
|
<label for="preallocateall_checkbox">_(Pre-allocate disk space for all files)</label><br/>
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
</fieldset>
|
2011-10-02 13:35:27 +04:00
|
|
|
|
2011-09-20 21:35:33 +04:00
|
|
|
<fieldset class="settings">
|
|
|
|
<legend>_(Email notification upon download completion)</legend>
|
2011-10-02 13:35:27 +04:00
|
|
|
<input type="checkbox" id="mail_notification_checkbox" onclick="updateMailNotification();"/>
|
|
|
|
<label for="mail_notification_checkbox">_(Email notification upon download completion)</label><br/>
|
|
|
|
<div class="formRow">
|
|
|
|
<label for="dest_email_txt" class="leftLabelLarge">_(Destination email:)</label><input type="text" id="dest_email_txt"/>
|
|
|
|
</div>
|
|
|
|
<div class="formRow">
|
|
|
|
<label for="smtp_server_txt" class="leftLabelLarge">_(SMTP server:)</label><input type="text" id="smtp_server_txt"/>
|
|
|
|
</div>
|
|
|
|
<div class="formRow">
|
|
|
|
<input type="checkbox" id="mail_ssl_checkbox"/><label for="mail_ssl_checkbox">_(This server requires a secure connection (SSL))</label>
|
|
|
|
</div>
|
|
|
|
<input type="checkbox" id="mail_auth_checkbox" onclick="updateMailAuthSettings();"/><label for="mail_auth_checkbox">_(Authentication)</label><br/>
|
|
|
|
<div class="formRow">
|
|
|
|
<label for="mail_username_text" class="leftLabelLarge">_(Username:)</label><input type="text" id="mail_username_text"/>
|
|
|
|
</div>
|
|
|
|
<div class="formRow">
|
|
|
|
<label for="mail_password_text" class="leftLabelLarge">_(Password:)</label><input type="password" id="mail_password_text"/>
|
|
|
|
</div>
|
2010-08-19 23:10:46 +04:00
|
|
|
</fieldset>
|
2011-10-02 13:35:27 +04:00
|
|
|
|
2011-09-20 21:35:33 +04:00
|
|
|
<fieldset class="settings">
|
|
|
|
<legend>_(Run an external program on torrent completion)</legend>
|
2011-10-02 13:35:27 +04:00
|
|
|
<input type="checkbox" id="autorun_checkbox" onclick="updateAutoRun();"/>
|
|
|
|
<label for="autorun_checkbox">_(Run an external program on torrent completion)</label><br/>
|
2010-08-20 18:02:40 +04:00
|
|
|
<input type="text" id="autorunProg_txt" style="width: 400px;"/><br/>
|
2011-05-03 20:45:20 +04:00
|
|
|
<i>_(The following parameters are supported:)
|
2011-04-18 20:58:13 +04:00
|
|
|
<ul>
|
2011-05-02 20:06:26 +04:00
|
|
|
<li>%f: _(Torrent path)</li>
|
|
|
|
<li>%n: _(Torrent name)</li>
|
2011-04-18 20:58:13 +04:00
|
|
|
</ul></i>
|
2010-08-20 18:02:40 +04:00
|
|
|
</fieldset>
|
2011-10-02 13:35:27 +04:00
|
|
|
|
2011-09-20 21:35:33 +04:00
|
|
|
<fieldset class="settings">
|
|
|
|
<legend>_(Torrent Queueing)</legend>
|
2012-06-19 03:29:04 +04:00
|
|
|
<input type="checkbox" id="queueing_checkbox" onclick="updateQueueingSystem();"/>
|
2011-10-02 13:35:27 +04:00
|
|
|
<label for="queueing_checkbox">_(Torrent Queueing)</label><br/>
|
|
|
|
<div class="formRow">
|
|
|
|
<label for="max_active_dl_value" style="margin-left: 20px;" class="leftLabelLarge">_(Maximum active downloads:)</label>
|
|
|
|
<input type="text" id="max_active_dl_value" style="width: 4em;"/>
|
|
|
|
</div>
|
|
|
|
<div class="formRow">
|
|
|
|
<label for="max_active_up_value" style="margin-left: 20px;" class="leftLabelLarge">_(Maximum active uploads:)</label>
|
|
|
|
<input type="text" id="max_active_up_value" style="width: 4em;"/>
|
|
|
|
</div>
|
|
|
|
<div class="formRow">
|
|
|
|
<label for="max_active_to_value" style="margin-left: 20px;" class="leftLabelLarge">_(Maximum active torrents:)</label>
|
|
|
|
<input type="text" id="max_active_to_value" style="width: 4em;"/>
|
|
|
|
</div>
|
|
|
|
<div class="formRow">
|
|
|
|
<input type="checkbox" id="dont_count_slow_torrents_checkbox"/>
|
|
|
|
<label for="dont_count_slow_torrents_checkbox">_(Do not count slow torrents in these limits)</label>
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
</div>
|
|
|
|
</fieldset>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="FilterTab" class="PrefTab invisible">
|
2011-09-20 21:35:33 +04:00
|
|
|
<fieldset class="settings">
|
|
|
|
<legend>_(IP Filtering)</legend>
|
2011-10-02 13:35:27 +04:00
|
|
|
<input type="checkbox" id="ipfilter_enabled_checkbox" onclick="updateFilterSettings();"/>
|
|
|
|
<label for="ipfilter_enabled_checkbox">_(IP Filtering)</label><br/>
|
|
|
|
<label for="ipfilter_text">_(Filter path (.dat, .p2p, .p2b):)</label>
|
|
|
|
<input type="text" id="ipfilter_text"/>
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
</fieldset>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="ProxyTab" class="PrefTab invisible">
|
2011-09-20 21:35:33 +04:00
|
|
|
<fieldset class="settings">
|
|
|
|
<legend>_(Proxy Server)</legend>
|
2011-10-02 13:35:27 +04:00
|
|
|
<div class="formRow">
|
|
|
|
<label for="peer_proxy_type_select" class="leftLabelSmall">_(Type:)</label>
|
|
|
|
<select id ="peer_proxy_type_select" onchange="updatePeerProxySettings();">
|
2009-12-30 18:07:51 +03:00
|
|
|
<option value="none">_((None))</option>
|
|
|
|
<option value="socks4">_(SOCKS4)</option>
|
|
|
|
<option value="socks5">_(SOCKS5)</option>
|
2010-01-15 19:41:39 +03:00
|
|
|
<option value="http">_(HTTP)</option>
|
2011-10-02 13:35:27 +04:00
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
<div class="formRow">
|
|
|
|
<label for="peer_proxy_host_text" class="leftLabelSmall">_(Host:)</label>
|
|
|
|
<input type="text" id="peer_proxy_host_text" />
|
|
|
|
</div>
|
|
|
|
<div class="formRow">
|
|
|
|
<label for="peer_proxy_port_value" class="leftLabelSmall">_(Port:)</label>
|
|
|
|
<input type="text" id="peer_proxy_port_value" style="width: 4em;"/>
|
|
|
|
</div>
|
|
|
|
<div class="formRow">
|
|
|
|
<input type="checkbox" id="use_peer_proxy_checkbox"/>
|
|
|
|
<label for="use_peer_proxy_checkbox">_(Use proxy for peer connections)</label>
|
|
|
|
</div>
|
|
|
|
<input type="checkbox" id="peer_proxy_auth_checkbox" onclick="updatePeerProxyAuthSettings();"/>
|
|
|
|
<label for="peer_proxy_auth_checkbox">_(Authentication)</label><br/>
|
|
|
|
|
|
|
|
<div class="formRow">
|
|
|
|
<label for="peer_proxy_username_text" style="margin-left: 20px;" class="leftLabelSmall">_(Username:)</label>
|
|
|
|
<input type="text" id="peer_proxy_username_text" />
|
|
|
|
</div>
|
|
|
|
<div class="formRow">
|
|
|
|
<label for="peer_proxy_password_text" style="margin-left: 20px;" class="leftLabelSmall">_(Password:)</label>
|
|
|
|
<input type="password" id="peer_proxy_password_text" />
|
|
|
|
</div>
|
2009-12-30 18:07:51 +03:00
|
|
|
</fieldset>
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="WebUITab" class="PrefTab invisible">
|
2011-09-20 21:35:33 +04:00
|
|
|
<fieldset class="settings">
|
|
|
|
<legend>_(Language)</legend>
|
2011-10-02 13:35:27 +04:00
|
|
|
<label for="locale_select">_(User Interface Language:)</label>
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
<select id="locale_select">
|
2013-10-20 20:31:01 +04:00
|
|
|
<option value="en">English</option>
|
|
|
|
<option value="en_AU">English(Australia)</option>
|
|
|
|
<option value="en_GB">English(United Kingdom)</option>
|
2011-01-12 18:47:50 +03:00
|
|
|
<option value="fr_FR">Français</option>
|
|
|
|
<option value="de_DE">Deutsch</option>
|
|
|
|
<option value="hu_HU">Magyar</option>
|
|
|
|
<option value="it_IT">Italiano</option>
|
|
|
|
<option value="nl_NL">Nederlands</option>
|
|
|
|
<option value="es_ES">Español</option>
|
|
|
|
<option value="ca_ES">Català</option>
|
|
|
|
<option value="gl_ES">Galego</option>
|
|
|
|
<option value="pt_BR">Português brasileiro</option>
|
2013-10-13 23:17:11 +04:00
|
|
|
<option value="pt_PT">Português</option>
|
2011-01-12 18:47:50 +03:00
|
|
|
<option value="pl_PL">Polski</option>
|
2011-02-07 21:56:17 +03:00
|
|
|
<option value="lt_LT">Lietuvių</option>
|
2013-10-13 23:17:11 +04:00
|
|
|
<option value="cs_CZ">Čeština</option>
|
2011-01-12 18:47:50 +03:00
|
|
|
<option value="sk_SK">Slovenčina</option>
|
|
|
|
<option value="sr_CS">Српски</option>
|
2013-10-13 23:17:11 +04:00
|
|
|
<option value="hr_HR">Hrvatski</option>
|
2011-01-12 18:47:50 +03:00
|
|
|
<option value="hy_AM">Հայերեն</option>
|
|
|
|
<option value="ro_RO">Română</option>
|
|
|
|
<option value="tr_TR">Türkçe</option>
|
|
|
|
<option value="el_GR">Ελληνικά</option>
|
|
|
|
<option value="sv_SE">Svenska</option>
|
|
|
|
<option value="fi_FI">Suomi</option>
|
|
|
|
<option value="nb_NO">Norsk</option>
|
|
|
|
<option value="da_DK">Dansk</option>
|
|
|
|
<option value="bg_BG">Български</option>
|
|
|
|
<option value="uk_UA">Українська</option>
|
|
|
|
<option value="ru_RU">Русский</option>
|
|
|
|
<option value="ja_JP">日本語</option>
|
2013-10-13 23:17:11 +04:00
|
|
|
<option value="he_IL">עברית</option>
|
|
|
|
<option value="ar_AE">عربي</option>
|
|
|
|
<option value="ka_GE">ქართული</option>
|
|
|
|
<option value="be_BY">Беларуская</option>
|
|
|
|
<option value="eu_ES">Euskara</option>
|
|
|
|
<option value="vi_VN">tiếng Việt</option>
|
2011-01-12 18:47:50 +03:00
|
|
|
<option value="zh_CN">中文 (简体)</option>
|
|
|
|
<option value="zh_TW">中文 (繁體)</option>
|
|
|
|
<option value="ko_KR">한글</option>
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
</select>
|
|
|
|
</fieldset>
|
|
|
|
|
2011-09-20 21:35:33 +04:00
|
|
|
<fieldset class="settings">
|
|
|
|
<legend>_(HTTP Server)</legend>
|
2011-10-02 13:35:27 +04:00
|
|
|
<label for="webui_port_value">_(Port:)</label><input type="text" id="webui_port_value" style="width: 4em;"/><br/>
|
|
|
|
|
|
|
|
<input type="checkbox" id="use_https_checkbox" onclick="updateHttpsSettings();" />
|
|
|
|
<label for="use_https_checkbox">_(Use HTTPS instead of HTTP)</label><br/>
|
|
|
|
<div class="formRow">
|
|
|
|
<label for="ssl_key_textarea" style="margin-left: 20px;" class="leftLabelSmall">_(Key:)</label>
|
|
|
|
<textarea id="ssl_key_textarea" rows="5" cols="70"></textarea>
|
|
|
|
</div>
|
|
|
|
<div class="formRow">
|
|
|
|
<label for="ssl_cert_textarea" style="margin-left: 20px;" class="leftLabelSmall">_(Certificate:)</label>
|
|
|
|
<textarea id="ssl_cert_textarea" rows="5" cols="70"></textarea>
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
</div>
|
2012-09-23 13:22:18 +04:00
|
|
|
<div style="padding-left: 10px;"><a href=http://httpd.apache.org/docs/2.2/ssl/ssl_faq.html#aboutcerts>Information about certificates</a></div>
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
</fieldset>
|
2011-10-02 13:35:27 +04:00
|
|
|
|
2011-09-20 21:35:33 +04:00
|
|
|
<fieldset class="settings">
|
|
|
|
<legend>_(Authentication)</legend>
|
2011-10-02 13:35:27 +04:00
|
|
|
<div class="formRow">
|
|
|
|
<label for="webui_username_text" class="leftLabelSmall">_(Username:)</label><input type="text" id="webui_username_text" />
|
2011-06-05 20:08:30 +04:00
|
|
|
</div>
|
2011-10-02 13:35:27 +04:00
|
|
|
<div class="formRow">
|
|
|
|
<label for="webui_password_text" class="leftLabelSmall">_(Password:)</label><input type="password" id="webui_password_text" />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<input type="checkbox" id="bypass_local_auth_checkbox" />
|
|
|
|
<label for="bypass_local_auth_checkbox">_(Bypass authentication for localhost)</label>
|
2011-06-05 20:08:30 +04:00
|
|
|
</fieldset>
|
2011-10-02 13:35:27 +04:00
|
|
|
|
2011-09-20 21:35:33 +04:00
|
|
|
<fieldset class="settings">
|
2011-10-02 13:35:27 +04:00
|
|
|
<legend><input type="checkbox" id="use_dyndns_checkbox" onclick="updateDynDnsSettings();" />
|
|
|
|
<label for="use_dyndns_checkbox">_(Update my dynamic domain name)</label></legend>
|
2011-06-05 20:08:30 +04:00
|
|
|
<select id="dyndns_select">
|
|
|
|
<option value="0">DynDNS</option>
|
|
|
|
<option value="1">NO-IP</option>
|
|
|
|
</select>
|
2011-10-02 13:35:27 +04:00
|
|
|
<input type="button" value="_(Register)" onclick="registerDynDns();"/><br/><br/>
|
|
|
|
<div class="formRow">
|
|
|
|
<label for="dyndns_domain_text" class="leftLabelSmall">_(Domain name:)</label><input type="text" id="dyndns_domain_text"/>
|
|
|
|
</div>
|
|
|
|
<div class="formRow">
|
|
|
|
<label for="dyndns_username_text" class="leftLabelSmall">_(Username:)</label><input type="text" id="dyndns_username_text"/>
|
|
|
|
</div>
|
|
|
|
<div class="formRow">
|
|
|
|
<label for="dyndns_password_text" class="leftLabelSmall">_(Password:)</label><input type="password" id="dyndns_password_text"/>
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
</div>
|
|
|
|
</fieldset>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<br/>
|
2011-01-14 21:57:15 +03:00
|
|
|
<center><input type="button" value="_(Save)" onclick="applyPreferences();"/></center>
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
|
|
|
|
<script type="text/javascript">
|
2010-03-18 22:25:16 +03:00
|
|
|
var WatchedFoldersTable = new HtmlTable($("watched_folders_tab"));
|
|
|
|
|
2011-09-20 21:15:47 +04:00
|
|
|
toggleAnonymousMode = function() {
|
|
|
|
if($('anonymous_mode_checkbox').getProperty('checked')) {
|
|
|
|
$('dht_checkbox').setProperty('disabled', true);
|
|
|
|
$('DHTPortDiffThanBT_checkbox').setProperty('disabled', true);
|
|
|
|
$('dht_checkbox').setProperty('checked', false);
|
|
|
|
$('lsd_checkbox').setProperty('disabled', true);
|
|
|
|
$('lsd_checkbox').setProperty('checked', false);
|
|
|
|
$('upnp_checkbox').setProperty('disabled', true);
|
|
|
|
$('upnp_checkbox').setProperty('checked', false);
|
|
|
|
} else {
|
|
|
|
$('dht_checkbox').setProperty('disabled', false);
|
|
|
|
$('DHTPortDiffThanBT_checkbox').setProperty('disabled', false);
|
|
|
|
$('lsd_checkbox').setProperty('disabled', false);
|
|
|
|
$('upnp_checkbox').setProperty('disabled', false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-06-05 20:08:30 +04:00
|
|
|
updateDlLimitEnabled = function() {
|
|
|
|
if($('dl_limit_checkbox').getProperty('checked')) {
|
|
|
|
$('dl_limit_value').setProperty('disabled', false);
|
2009-12-30 18:07:51 +03:00
|
|
|
} else {
|
2011-06-05 20:08:30 +04:00
|
|
|
$('dl_limit_value').setProperty('disabled', true);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
}
|
2011-06-05 20:08:30 +04:00
|
|
|
}
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
|
2011-10-19 20:55:11 +04:00
|
|
|
updateSchedulingEnabled = function() {
|
|
|
|
if($('limit_sheduling_checkbox').getProperty('checked')) {
|
|
|
|
$('schedule_from_hour').setProperty('disabled', false);
|
|
|
|
$('schedule_from_min').setProperty('disabled', false);
|
|
|
|
$('schedule_to_hour').setProperty('disabled', false);
|
|
|
|
$('schedule_to_min').setProperty('disabled', false);
|
|
|
|
$('schedule_freq_select').setProperty('disabled', false);
|
|
|
|
} else {
|
|
|
|
$('schedule_from_hour').setProperty('disabled', true);
|
|
|
|
$('schedule_from_min').setProperty('disabled', true);
|
|
|
|
$('schedule_to_hour').setProperty('disabled', true);
|
|
|
|
$('schedule_to_min').setProperty('disabled', true);
|
|
|
|
$('schedule_freq_select').setProperty('disabled', true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-06-05 20:08:30 +04:00
|
|
|
updateUpLimitEnabled = function() {
|
|
|
|
if($('up_limit_checkbox').getProperty('checked')) {
|
|
|
|
$('up_limit_value').setProperty('disabled', false);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
} else {
|
2011-06-05 20:08:30 +04:00
|
|
|
$('up_limit_value').setProperty('disabled', true);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-06-05 20:08:30 +04:00
|
|
|
setuTPSettingsVisible = function(visible) {
|
|
|
|
if(visible) {
|
|
|
|
$('enable_utp_checkbox').removeClass('invisible');
|
|
|
|
$('limit_utp_rate_checkbox').removeClass('invisible');
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
} else {
|
2011-06-05 20:08:30 +04:00
|
|
|
$('enable_utp_checkbox').addClass('invisible');
|
|
|
|
$('limit_utp_rate_checkbox').addClass('invisible');
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
updateMaxConnecEnabled = function() {
|
2011-06-05 20:08:30 +04:00
|
|
|
if($('max_connec_checkbox').getProperty('checked')) {
|
|
|
|
$('max_connec_value').setProperty('disabled', false);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
} else {
|
2011-06-05 20:08:30 +04:00
|
|
|
$('max_connec_value').setProperty('disabled', true);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
updateMaxConnecPerTorrentEnabled = function() {
|
2011-06-05 20:08:30 +04:00
|
|
|
if($('max_connec_per_torrent_checkbox').getProperty('checked')) {
|
|
|
|
$('max_connec_per_torrent_value').setProperty('disabled', false);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
} else {
|
2011-06-05 20:08:30 +04:00
|
|
|
$('max_connec_per_torrent_value').setProperty('disabled', true);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
updateMaxUploadsPerTorrentEnabled = function() {
|
2011-06-05 20:08:30 +04:00
|
|
|
if($('max_uploads_per_torrent_checkbox').getProperty('checked')) {
|
|
|
|
$('max_uploads_per_torrent_value').setProperty('disabled', false);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
} else {
|
2011-06-05 20:08:30 +04:00
|
|
|
$('max_uploads_per_torrent_value').setProperty('disabled', true);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
updateTempDirEnabled = function() {
|
2011-06-05 20:08:30 +04:00
|
|
|
if($('temppath_checkbox').getProperty('checked')) {
|
|
|
|
$('temppath_text').setProperty('disabled', false);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
} else {
|
2011-06-05 20:08:30 +04:00
|
|
|
$('temppath_text').setProperty('disabled', true);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-06-05 20:08:30 +04:00
|
|
|
updateHttpsSettings = function() {
|
|
|
|
if($('use_https_checkbox').getProperty('checked')) {
|
|
|
|
$('ssl_key_textarea').setProperty('disabled', false);
|
|
|
|
$('ssl_cert_textarea').setProperty('disabled', false);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
} else {
|
2011-06-05 20:08:30 +04:00
|
|
|
$('ssl_key_textarea').setProperty('disabled', true);
|
|
|
|
$('ssl_cert_textarea').setProperty('disabled', true);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
}
|
2011-06-05 20:08:30 +04:00
|
|
|
}
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
|
2010-01-31 16:47:57 +03:00
|
|
|
updateExportDirEnabled = function() {
|
2011-06-05 20:08:30 +04:00
|
|
|
if($('exportdir_checkbox').getProperty('checked')) {
|
|
|
|
$('exportdir_text').setProperty('disabled', false);
|
2010-01-31 16:47:57 +03:00
|
|
|
} else {
|
2011-06-05 20:08:30 +04:00
|
|
|
$('exportdir_text').setProperty('disabled', true);
|
2010-01-31 16:47:57 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
updateQueueingSystem = function() {
|
2011-06-05 20:08:30 +04:00
|
|
|
if($('queueing_checkbox').getProperty('checked')) {
|
|
|
|
$('max_active_dl_value').setProperty('disabled', false);
|
|
|
|
$('max_active_up_value').setProperty('disabled', false);
|
|
|
|
$('max_active_to_value').setProperty('disabled', false);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
} else {
|
2011-06-05 20:08:30 +04:00
|
|
|
$('max_active_dl_value').setProperty('disabled', true);
|
|
|
|
$('max_active_up_value').setProperty('disabled', true);
|
|
|
|
$('max_active_to_value').setProperty('disabled', true);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-08-19 23:10:46 +04:00
|
|
|
updateMailNotification = function() {
|
2011-06-05 20:08:30 +04:00
|
|
|
if($('mail_notification_checkbox').getProperty('checked')) {
|
|
|
|
$('dest_email_txt').setProperty('disabled', false);
|
|
|
|
$('smtp_server_txt').setProperty('disabled', false);
|
|
|
|
$('mail_auth_checkbox').setProperty('disabled', false);
|
|
|
|
$('mail_ssl_checkbox').setProperty('disabled', false);
|
2010-08-19 23:10:46 +04:00
|
|
|
} else {
|
2011-06-05 20:08:30 +04:00
|
|
|
$('dest_email_txt').setProperty('disabled', true);
|
|
|
|
$('smtp_server_txt').setProperty('disabled', true);
|
|
|
|
$('mail_ssl_checkbox').setProperty('disabled', true);
|
|
|
|
$('mail_auth_checkbox').setProperty('disabled', true);
|
|
|
|
$('mail_auth_checkbox').setProperty('checked', false);
|
|
|
|
updateMailAuthSettings();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
updateMailAuthSettings = function() {
|
|
|
|
if($('mail_auth_checkbox').getProperty('checked')) {
|
|
|
|
$('mail_username_text').setProperty('disabled', false);
|
|
|
|
$('mail_password_text').setProperty('disabled', false);
|
|
|
|
} else {
|
|
|
|
$('mail_username_text').setProperty('disabled', true);
|
|
|
|
$('mail_password_text').setProperty('disabled', true);
|
2010-08-19 23:10:46 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-08-20 18:02:40 +04:00
|
|
|
updateAutoRun = function() {
|
2011-06-05 20:08:30 +04:00
|
|
|
if($('autorun_checkbox').getProperty('checked')) {
|
|
|
|
$('autorunProg_txt').setProperty('disabled', false);
|
2010-08-20 18:02:40 +04:00
|
|
|
} else {
|
2011-06-05 20:08:30 +04:00
|
|
|
$('autorunProg_txt').setProperty('disabled', true);
|
2010-08-20 18:02:40 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
updateFilterSettings = function() {
|
2011-06-05 20:08:30 +04:00
|
|
|
if($('ipfilter_enabled_checkbox').getProperty('checked')) {
|
|
|
|
$('ipfilter_text').setProperty('disabled', false);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
} else {
|
2011-06-05 20:08:30 +04:00
|
|
|
$('ipfilter_text').setProperty('disabled', true);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-03-22 23:34:12 +03:00
|
|
|
updateDHTPortSettings = function() {
|
2011-06-05 20:08:30 +04:00
|
|
|
if($('DHTPortDiffThanBT_checkbox').getProperty('checked')) {
|
|
|
|
$('DHTPort_txt').setProperty('disabled', false);
|
2010-03-22 23:34:12 +03:00
|
|
|
} else {
|
2011-06-05 20:08:30 +04:00
|
|
|
$('DHTPort_txt').setProperty('disabled', true);
|
2010-03-22 23:34:12 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-12-30 18:07:51 +03:00
|
|
|
updatePeerProxySettings = function() {
|
2011-06-05 20:08:30 +04:00
|
|
|
if($('peer_proxy_type_select').getProperty('value') != "none") {
|
|
|
|
$('peer_proxy_host_text').setProperty('disabled', false);
|
|
|
|
$('peer_proxy_port_value').setProperty('disabled', false);
|
|
|
|
$('use_peer_proxy_checkbox').setProperty('disabled', false);
|
|
|
|
if($('peer_proxy_type_select').getProperty('value') != "socks5") {
|
|
|
|
$('peer_proxy_auth_checkbox').setProperty('checked', false);
|
|
|
|
$('peer_proxy_auth_checkbox').setProperty('disabled', true);
|
2009-12-30 18:07:51 +03:00
|
|
|
updatePeerProxyAuthSettings();
|
|
|
|
} else {
|
2011-06-05 20:08:30 +04:00
|
|
|
$('peer_proxy_auth_checkbox').setProperty('disabled', false);
|
2009-12-30 18:07:51 +03:00
|
|
|
}
|
|
|
|
} else {
|
2011-06-05 20:08:30 +04:00
|
|
|
$('peer_proxy_host_text').setProperty('disabled', true);
|
|
|
|
$('peer_proxy_port_value').setProperty('disabled', true);
|
|
|
|
$('use_peer_proxy_checkbox').setProperty('disabled', true);
|
|
|
|
$('peer_proxy_auth_checkbox').setProperty('disabled', true);
|
|
|
|
$('peer_proxy_auth_checkbox').setProperty('checked', false);
|
2009-12-30 18:07:51 +03:00
|
|
|
updatePeerProxyAuthSettings();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
updatePeerProxyAuthSettings = function() {
|
2011-06-05 20:08:30 +04:00
|
|
|
if($('peer_proxy_auth_checkbox').getProperty('checked')) {
|
|
|
|
$('peer_proxy_username_text').setProperty('disabled', false);
|
|
|
|
$('peer_proxy_password_text').setProperty('disabled', false);
|
2009-12-30 18:07:51 +03:00
|
|
|
} else {
|
2011-06-05 20:08:30 +04:00
|
|
|
$('peer_proxy_username_text').setProperty('disabled', true);
|
|
|
|
$('peer_proxy_password_text').setProperty('disabled', true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
updateDynDnsSettings = function() {
|
|
|
|
if($('use_dyndns_checkbox').getProperty('checked')) {
|
|
|
|
$('dyndns_select').setProperty('disabled', false);
|
|
|
|
$('dyndns_domain_text').setProperty('disabled', false);
|
|
|
|
$('dyndns_username_text').setProperty('disabled', false);
|
|
|
|
$('dyndns_password_text').setProperty('disabled', false);
|
|
|
|
} else {
|
|
|
|
$('dyndns_select').setProperty('disabled', true);
|
|
|
|
$('dyndns_domain_text').setProperty('disabled', true);
|
|
|
|
$('dyndns_username_text').setProperty('disabled', true);
|
|
|
|
$('dyndns_password_text').setProperty('disabled', true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
registerDynDns = function() {
|
|
|
|
if($('dyndns_select').getProperty('value').toInt() == 1) {
|
|
|
|
window.open("http://www.no-ip.com/services/managed_dns/free_dynamic_dns.html", "NO-IP Registration");
|
|
|
|
} else {
|
|
|
|
window.open("https://www.dyndns.com/account/services/hosts/add.html", "DynDNS Registration");
|
2009-12-30 18:07:51 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2010-03-18 22:25:16 +03:00
|
|
|
getWatchedFolders = function() {
|
|
|
|
var nb_folders = $("watched_folders_tab").getChildren("tbody")[0].getChildren("tr").length;
|
|
|
|
var folders = Array();
|
|
|
|
var download_in_place = Array();
|
|
|
|
for(var i=0; i<nb_folders; i+=1) {
|
2011-06-05 20:08:30 +04:00
|
|
|
var folder_path = $('text_watch_'+i).getProperty('value').trim();
|
2010-03-18 22:25:16 +03:00
|
|
|
if(folder_path.length > 0) {
|
|
|
|
folders[folders.length] = folder_path;
|
2011-06-05 20:08:30 +04:00
|
|
|
if($("cb_watch_"+i).getProperty('checked')) {
|
2010-03-18 22:25:16 +03:00
|
|
|
download_in_place[download_in_place.length] = 1;
|
|
|
|
} else {
|
|
|
|
download_in_place[download_in_place.length] = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return [folders, download_in_place];
|
|
|
|
}
|
|
|
|
|
|
|
|
addWatchFolder = function() {
|
2011-06-05 20:08:30 +04:00
|
|
|
var new_folder = $('new_watch_folder_txt').getProperty('value').trim();
|
2010-03-18 22:25:16 +03:00
|
|
|
if(new_folder.length <= 0) return;
|
2011-06-05 20:08:30 +04:00
|
|
|
|
|
|
|
var download_here = $('new_watch_folder_dl').getProperty('checked');
|
|
|
|
var myinput = new Element('input');
|
|
|
|
var i = $('watched_folders_tab').getChildren('tbody')[0].getChildren('tr').length;
|
|
|
|
myinput.setProperty('id', 'text_watch_'+i);
|
|
|
|
myinput.setProperty('type', 'text');
|
|
|
|
myinput.setProperty('value', new_folder);
|
|
|
|
|
|
|
|
var mycb = new Element('input');
|
|
|
|
mycb.setProperty('type', 'checkbox');
|
|
|
|
mycb.setProperty('id', 'cb_watch_'+i);
|
|
|
|
mycb.setProperty('checked', download_here);
|
2010-03-18 22:25:16 +03:00
|
|
|
WatchedFoldersTable.push([myinput, mycb]);
|
2011-06-05 20:08:30 +04:00
|
|
|
|
2010-03-18 22:25:16 +03:00
|
|
|
// Clear fields
|
2011-06-05 20:08:30 +04:00
|
|
|
$('new_watch_folder_txt').setProperty('value', '');
|
|
|
|
$('new_watch_folder_dl').setProperty('checked', false);
|
2010-03-18 22:25:16 +03:00
|
|
|
}
|
|
|
|
|
2011-10-19 20:55:11 +04:00
|
|
|
time_padding = function(val) {
|
|
|
|
ret = val.toString();
|
|
|
|
if(ret.length == 1)
|
|
|
|
ret = '0' + ret
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
loadPreferences = function() {
|
|
|
|
var url = 'json/preferences';
|
|
|
|
var request = new Request.JSON({
|
|
|
|
url: url,
|
|
|
|
method: 'get',
|
|
|
|
noCache: true,
|
|
|
|
onFailure: function() {
|
|
|
|
alert("Could not contact qBittorrent");
|
|
|
|
},
|
|
|
|
onSuccess: function(pref) {
|
|
|
|
if(pref){
|
|
|
|
// Connection
|
2011-09-18 20:43:33 +04:00
|
|
|
$('port_value').setProperty('value', pref.listen_port.toInt());
|
|
|
|
$('upnp_checkbox').setProperty('checked', pref.upnp);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
|
|
|
|
var dl_limit = pref.dl_limit.toInt();
|
|
|
|
if(dl_limit <= 0) {
|
2011-06-05 20:08:30 +04:00
|
|
|
$('dl_limit_checkbox').setProperty('checked', false);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
} else {
|
2011-06-05 20:08:30 +04:00
|
|
|
$('dl_limit_checkbox').setProperty('checked', true);
|
|
|
|
$('dl_limit_value').setProperty('value', dl_limit);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
}
|
|
|
|
updateDlLimitEnabled();
|
|
|
|
var up_limit = pref.up_limit.toInt();
|
|
|
|
if(up_limit <= 0) {
|
2011-06-05 20:08:30 +04:00
|
|
|
$('up_limit_checkbox').setProperty('checked', false);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
} else {
|
2011-06-05 20:08:30 +04:00
|
|
|
$('up_limit_checkbox').setProperty('checked', true);
|
|
|
|
$('up_limit_value').setProperty('value', up_limit);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
}
|
|
|
|
updateUpLimitEnabled();
|
2011-10-19 20:55:11 +04:00
|
|
|
// Alternative limits
|
|
|
|
$('alt_dl_limit_value').setProperty('value', pref.alt_dl_limit.toInt());
|
|
|
|
$('alt_up_limit_value').setProperty('value', pref.alt_up_limit.toInt());
|
|
|
|
// Scheduling
|
|
|
|
$('limit_sheduling_checkbox').setProperty('checked', pref.scheduler_enabled);
|
|
|
|
$('schedule_from_hour').setProperty('value', time_padding(pref.schedule_from_hour));
|
|
|
|
$('schedule_from_min').setProperty('value', time_padding(pref.schedule_from_min));
|
|
|
|
$('schedule_to_hour').setProperty('value', time_padding(pref.schedule_to_hour));
|
|
|
|
$('schedule_to_min').setProperty('value', time_padding(pref.schedule_to_min));
|
|
|
|
$('schedule_freq_select').setProperty('value', pref.scheduler_days);
|
|
|
|
updateSchedulingEnabled();
|
|
|
|
|
|
|
|
// uTP
|
|
|
|
utp_supported = $defined(pref.enable_utp);
|
|
|
|
setuTPSettingsVisible(utp_supported);
|
|
|
|
if(utp_supported) {
|
|
|
|
$('enable_utp_checkbox').setProperty('checked', pref.enable_utp);
|
|
|
|
$('limit_utp_rate_checkbox').setProperty('checked', pref.limit_utp_rate);
|
|
|
|
}
|
|
|
|
$('limit_tcp_overhead_checkbox').setProperty('checked', pref.limit_tcp_overhead);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
var max_connec = pref.max_connec.toInt();
|
|
|
|
if(max_connec <= 0) {
|
2011-06-05 20:08:30 +04:00
|
|
|
$('max_connec_checkbox').setProperty('checked', false);
|
|
|
|
$('max_connec_value').setProperty('value', 500);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
} else {
|
2011-06-05 20:08:30 +04:00
|
|
|
$('max_connec_checkbox').setProperty('checked', true);
|
|
|
|
$('max_connec_value').setProperty('value', max_connec);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
}
|
|
|
|
updateMaxConnecEnabled();
|
|
|
|
var max_connec_per_torrent = pref.max_connec_per_torrent.toInt();
|
|
|
|
if(max_connec_per_torrent <= 0) {
|
2011-06-05 20:08:30 +04:00
|
|
|
$('max_connec_per_torrent_checkbox').setProperty('checked', false);
|
|
|
|
$('max_connec_per_torrent_value').setProperty('value', 100);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
} else {
|
2011-06-05 20:08:30 +04:00
|
|
|
$('max_connec_per_torrent_checkbox').setProperty('checked', true);
|
|
|
|
$('max_connec_per_torrent_value').setProperty('value', max_connec_per_torrent);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
}
|
|
|
|
updateMaxConnecPerTorrentEnabled();
|
|
|
|
var max_uploads_per_torrent = pref.max_uploads_per_torrent.toInt();
|
|
|
|
if(max_uploads_per_torrent <= 0) {
|
2011-06-05 20:08:30 +04:00
|
|
|
$('max_uploads_per_torrent_checkbox').setProperty('checked', false);
|
|
|
|
$('max_uploads_per_torrent_value').setProperty('value', 4);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
} else {
|
2011-06-05 20:08:30 +04:00
|
|
|
$('max_uploads_per_torrent_checkbox').setProperty('checked', true);
|
|
|
|
$('max_uploads_per_torrent_value').setProperty('value', max_uploads_per_torrent);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
}
|
|
|
|
updateMaxUploadsPerTorrentEnabled();
|
|
|
|
// Bittorrent
|
2011-09-18 20:43:33 +04:00
|
|
|
$('dht_checkbox').setProperty('checked', pref.dht);
|
|
|
|
$('DHTPortDiffThanBT_checkbox').setProperty('checked', !pref.dhtSameAsBT);
|
2011-06-05 20:08:30 +04:00
|
|
|
$('DHTPort_txt').setProperty('value', pref.dht_port);
|
2010-03-22 23:34:12 +03:00
|
|
|
updateDHTPortSettings();
|
2011-09-18 20:43:33 +04:00
|
|
|
$('pex_checkbox').setProperty('checked', pref.pex);
|
|
|
|
$('lsd_checkbox').setProperty('checked', pref.lsd);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
var encryption = pref.encryption.toInt();
|
|
|
|
$('encryption_select').getChildren('option')[encryption].setAttribute('selected', '');
|
2011-09-25 13:05:33 +04:00
|
|
|
if($defined(pref.anonymous_mode)) {
|
|
|
|
$('anonymous_mode_checkbox').setProperty('checked', pref.anonymous_mode);
|
|
|
|
} else {
|
|
|
|
$('anonymous_mode_checkbox').addClass('invisible');
|
2011-09-20 21:15:47 +04:00
|
|
|
}
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
// Downloads
|
2011-09-18 20:43:33 +04:00
|
|
|
$("savepath_text").setProperty('value', pref.save_path);
|
|
|
|
$('temppath_checkbox').setProperty('checked', pref.temp_path_enabled);
|
|
|
|
$('temppath_text').setProperty('value', pref.temp_path);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
updateTempDirEnabled();
|
2011-09-18 20:43:33 +04:00
|
|
|
var i;
|
2010-03-18 22:25:16 +03:00
|
|
|
for(i=0; i<pref.scan_dirs.length; i+=1) {
|
2011-06-05 20:08:30 +04:00
|
|
|
var myinput = new Element('input');
|
|
|
|
myinput.setProperty('id', 'text_watch_'+i);
|
|
|
|
myinput.setProperty('type', 'text');
|
|
|
|
myinput.setProperty('value', pref.scan_dirs[i]);
|
|
|
|
var mycb = new Element('input');
|
|
|
|
mycb.setProperty('type', 'checkbox');
|
|
|
|
mycb.setProperty('id', 'cb_watch_'+i);
|
|
|
|
mycb.setProperty('checked', pref.download_in_scan_dirs[i]);
|
2010-03-18 22:25:16 +03:00
|
|
|
WatchedFoldersTable.push([myinput, mycb]);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
}
|
2010-03-18 22:25:16 +03:00
|
|
|
|
2011-09-18 20:43:33 +04:00
|
|
|
if(pref.export_dir_enabled) {
|
2011-06-05 20:08:30 +04:00
|
|
|
$('exportdir_text').setProperty('value', pref.export_dir);
|
|
|
|
$('exportdir_checkbox').setProperty('checked', true);
|
2010-01-31 16:47:57 +03:00
|
|
|
} else {
|
2011-06-05 20:08:30 +04:00
|
|
|
$('exportdir_text').setProperty('value', '');
|
|
|
|
$('exportdir_checkbox').setProperty('checked', false);
|
2010-01-31 16:47:57 +03:00
|
|
|
}
|
|
|
|
updateExportDirEnabled();
|
2011-09-18 20:43:33 +04:00
|
|
|
$('mail_notification_checkbox').setProperty('checked', pref.mail_notification_enabled);
|
2011-06-05 20:08:30 +04:00
|
|
|
$('dest_email_txt').setProperty('value', pref.mail_notification_email);
|
|
|
|
$('smtp_server_txt').setProperty('value', pref.mail_notification_smtp);
|
2011-09-18 20:43:33 +04:00
|
|
|
$('mail_ssl_checkbox').setProperty('checked', pref.mail_notification_ssl_enabled);
|
|
|
|
$('mail_auth_checkbox').setProperty('checked', pref.mail_notification_auth_enabled);
|
2011-06-05 20:08:30 +04:00
|
|
|
$('mail_username_text').setProperty('value', pref.mail_notification_username);
|
|
|
|
$('mail_password_text').setProperty('value', pref.mail_notification_password);
|
2010-08-19 23:10:46 +04:00
|
|
|
updateMailNotification();
|
2011-06-05 20:08:30 +04:00
|
|
|
updateMailAuthSettings();
|
2011-09-18 20:43:33 +04:00
|
|
|
$('autorun_checkbox').setProperty('checked', pref.autorun_enabled);
|
2011-06-05 20:08:30 +04:00
|
|
|
$('autorunProg_txt').setProperty('value', pref.autorun_program);
|
2010-08-20 18:02:40 +04:00
|
|
|
updateAutoRun();
|
2011-09-18 20:43:33 +04:00
|
|
|
$('preallocateall_checkbox').setProperty('checked', pref.preallocate_all);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
if($defined(pref.incomplete_files_ext)) {
|
|
|
|
$('appendexttr').removeClass('invisible');
|
2011-09-18 20:43:33 +04:00
|
|
|
$('appendext_checkbox').setProperty('checked', pref.incomplete_files_ext);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
} else {
|
|
|
|
$('appendexttr').addClass('invisible');
|
|
|
|
}
|
2011-09-18 20:43:33 +04:00
|
|
|
$('queueing_checkbox').setProperty('checked', pref.queueing_enabled);
|
2011-06-05 20:08:30 +04:00
|
|
|
$('max_active_dl_value').setProperty('value', pref.max_active_downloads.toInt());
|
|
|
|
$('max_active_up_value').setProperty('value', pref.max_active_uploads.toInt());
|
|
|
|
$('max_active_to_value').setProperty('value', pref.max_active_torrents.toInt());
|
2011-09-18 20:34:29 +04:00
|
|
|
$('dont_count_slow_torrents_checkbox').setProperty('checked', pref.dont_count_slow_torrents);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
updateQueueingSystem();
|
|
|
|
// IP Filter
|
2011-09-18 20:43:33 +04:00
|
|
|
$('ipfilter_enabled_checkbox').setProperty('checked', pref.ip_filter_enabled);
|
2011-06-05 20:08:30 +04:00
|
|
|
$('ipfilter_text').setProperty('value', pref.ip_filter_path);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
updateFilterSettings();
|
2009-12-30 18:07:51 +03:00
|
|
|
// PEER Proxy
|
|
|
|
switch(pref.proxy_type.toInt()) {
|
|
|
|
case 5: //SOCKS4
|
2011-06-05 20:08:30 +04:00
|
|
|
$('peer_proxy_type_select').setProperty('value', 'socks4');
|
2009-12-30 18:07:51 +03:00
|
|
|
break;
|
|
|
|
case 2: // SOCKS5
|
|
|
|
case 4: // SOCKS5_PW
|
2011-06-05 20:08:30 +04:00
|
|
|
$('peer_proxy_type_select').setProperty('value', 'socks5');
|
2009-12-30 18:07:51 +03:00
|
|
|
break;
|
2010-01-15 19:41:39 +03:00
|
|
|
case 1: // HTTP
|
|
|
|
case 3: // HTTP_PW
|
2011-06-05 20:08:30 +04:00
|
|
|
$('peer_proxy_type_select').setProperty('value', 'http');
|
2010-01-15 19:41:39 +03:00
|
|
|
break;
|
2009-12-30 18:07:51 +03:00
|
|
|
default: // NONE
|
2011-06-05 20:08:30 +04:00
|
|
|
$('peer_proxy_type_select').setProperty('value', 'none');
|
2009-12-30 18:07:51 +03:00
|
|
|
}
|
|
|
|
updatePeerProxySettings();
|
2011-06-05 20:08:30 +04:00
|
|
|
$('peer_proxy_host_text').setProperty('value', pref.proxy_ip);
|
|
|
|
$('peer_proxy_port_value').setProperty('value', pref.proxy_port);
|
2011-09-18 20:43:33 +04:00
|
|
|
$('use_peer_proxy_checkbox').setProperty('checked', pref.proxy_peer_connections);
|
|
|
|
$('peer_proxy_auth_checkbox').setProperty('checked', pref.proxy_auth_enabled);
|
2009-12-30 18:07:51 +03:00
|
|
|
updatePeerProxyAuthSettings();
|
2011-06-05 20:08:30 +04:00
|
|
|
$('peer_proxy_username_text').setProperty('value', pref.proxy_username);
|
|
|
|
$('peer_proxy_password_text').setProperty('value', pref.proxy_password);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
// Web UI
|
2011-06-05 20:08:30 +04:00
|
|
|
$('webui_port_value').setProperty('value', pref.web_ui_port);
|
|
|
|
$('webui_username_text').setProperty('value', pref.web_ui_username);
|
|
|
|
$('webui_password_text').setProperty('value', pref.web_ui_password);
|
2011-09-18 20:43:33 +04:00
|
|
|
$('bypass_local_auth_checkbox').setProperty('checked', pref.bypass_local_auth);
|
|
|
|
$('use_https_checkbox').setProperty('checked', pref.use_https);
|
2011-06-05 20:08:30 +04:00
|
|
|
updateHttpsSettings();
|
|
|
|
$('ssl_key_textarea').setProperty('value', pref.ssl_key);
|
|
|
|
$('ssl_cert_textarea').setProperty('value', pref.ssl_cert);
|
|
|
|
$('locale_select').setProperty('value', pref.locale);
|
2011-10-19 20:55:11 +04:00
|
|
|
// Dyndns
|
|
|
|
$('use_dyndns_checkbox').setProperty('checked', pref.dyndns_enabled);
|
|
|
|
updateDynDnsSettings();
|
|
|
|
$('dyndns_select').setProperty('value', pref.dyndns_service);
|
|
|
|
$('dyndns_domain_text').setProperty('value', pref.dyndns_domain);
|
|
|
|
$('dyndns_username_text').setProperty('value', pref.dyndns_username);
|
|
|
|
$('dyndns_password_text').setProperty('value', pref.dyndns_password);
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}).send();
|
|
|
|
}
|
|
|
|
|
2011-06-05 20:08:30 +04:00
|
|
|
applyPreferences = function() {
|
|
|
|
var settings = new Hash();
|
|
|
|
// Validate form data
|
|
|
|
// Connection
|
|
|
|
var listen_port = $('port_value').getProperty('value').toInt();
|
|
|
|
if(listen_port <= 1024 || listen_port > 65535) {
|
|
|
|
alert("_(The port used for incoming connections must be greater than 1024 and less than 65535.)");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
settings.set('listen_port', listen_port);
|
|
|
|
|
|
|
|
settings.set('upnp', $('upnp_checkbox').getProperty('checked'));
|
|
|
|
|
|
|
|
var dl_limit = -1;
|
|
|
|
if($('dl_limit_checkbox').getProperty('checked')) {
|
|
|
|
dl_limit = $('dl_limit_value').getProperty('value').toInt();
|
|
|
|
if(dl_limit <= 0) {
|
|
|
|
alert("_(Download rate limit must be greater than 0 or disabled.)");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
settings.set('dl_limit', dl_limit);
|
|
|
|
|
|
|
|
var up_limit = -1;
|
|
|
|
if($('up_limit_checkbox').getProperty('checked')) {
|
|
|
|
up_limit = $('up_limit_value').getProperty('value').toInt();
|
|
|
|
if(up_limit <= 0) {
|
|
|
|
alert("_(Upload rate limit must be greater than 0 or disabled.)");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
settings.set('up_limit', up_limit);
|
|
|
|
|
|
|
|
if(!$('enable_utp_checkbox').hasClass('invisible')) {
|
|
|
|
settings.set('enable_utp', $('enable_utp_checkbox').getProperty('checked'));
|
|
|
|
settings.set('limit_utp_rate', $('limit_utp_rate_checkbox').getProperty('checked'));
|
|
|
|
}
|
|
|
|
|
|
|
|
settings.set('limit_tcp_overhead', $('limit_tcp_overhead_checkbox').getProperty('checked'));
|
|
|
|
|
|
|
|
var max_connec = -1;
|
|
|
|
if($('max_connec_checkbox').getProperty('checked')) {
|
|
|
|
max_connec = $('max_connec_value').getProperty('value').toInt();
|
|
|
|
if(max_connec <= 0) {
|
|
|
|
alert("_(Maximum number of connections limit must be greater than 0 or disabled.)");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
settings.set('max_connec', max_connec);
|
|
|
|
|
|
|
|
var max_connec_per_torrent = -1;
|
|
|
|
if($('max_connec_per_torrent_checkbox').getProperty('checked')) {
|
|
|
|
max_connec_per_torrent = $('max_connec_per_torrent_value').getProperty('value').toInt();
|
|
|
|
if(max_connec_per_torrent <= 0) {
|
|
|
|
alert("_(Maximum number of connections per torrent limit must be greater than 0 or disabled.)");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
settings.set('max_connec_per_torrent', max_connec_per_torrent);
|
|
|
|
|
|
|
|
var max_uploads_per_torrent = -1;
|
|
|
|
if($('max_uploads_per_torrent_checkbox').getProperty('checked')) {
|
|
|
|
max_uploads_per_torrent = $('max_uploads_per_torrent_value').getProperty('value').toInt();
|
|
|
|
if(max_uploads_per_torrent <= 0) {
|
|
|
|
alert("_(Maximum number of upload slots per torrent limit must be greater than 0 or disabled.)");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
settings.set('max_uploads_per_torrent', max_uploads_per_torrent);
|
2011-10-19 20:55:11 +04:00
|
|
|
|
|
|
|
// Alternative speed limits
|
|
|
|
var alt_dl_limit = $('alt_dl_limit_value').getProperty('value').toInt();
|
|
|
|
if(alt_dl_limit <= 0) {
|
|
|
|
alert("_(Download rate limit must be greater than 0 or disabled.)");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
settings.set('alt_dl_limit', alt_dl_limit);
|
2011-06-05 20:08:30 +04:00
|
|
|
|
2011-10-19 20:55:11 +04:00
|
|
|
var alt_up_limit = $('alt_up_limit_value').getProperty('value').toInt();
|
|
|
|
if(alt_up_limit <= 0) {
|
|
|
|
alert("_(Upload rate limit must be greater than 0 or disabled.)");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
settings.set('alt_up_limit', alt_up_limit);
|
|
|
|
|
|
|
|
// Scheduler
|
|
|
|
var scheduling_enabled = $('limit_sheduling_checkbox').getProperty('checked');
|
|
|
|
settings.set('scheduler_enabled', scheduling_enabled);
|
|
|
|
if (scheduling_enabled) {
|
|
|
|
settings.set('schedule_from_hour', $('schedule_from_hour').getProperty('value').toInt());
|
|
|
|
settings.set('schedule_from_min', $('schedule_from_min').getProperty('value').toInt());
|
|
|
|
settings.set('schedule_to_hour', $('schedule_to_hour').getProperty('value').toInt());
|
|
|
|
settings.set('schedule_to_min', $('schedule_to_min').getProperty('value').toInt());
|
|
|
|
settings.set('scheduler_days', $('schedule_freq_select').getProperty('value').toInt());
|
|
|
|
}
|
2011-06-05 20:08:30 +04:00
|
|
|
// Bittorrent
|
|
|
|
settings.set('dht', $('dht_checkbox').getProperty('checked'));
|
2012-03-12 22:54:33 +04:00
|
|
|
settings.set('dhtSameAsBT', !$('DHTPortDiffThanBT_checkbox').getProperty('checked'));
|
2011-06-05 20:08:30 +04:00
|
|
|
settings.set('dht_port', $('DHTPort_txt').getProperty('value').toInt());
|
|
|
|
settings.set('pex', $('pex_checkbox').getProperty('checked'));
|
|
|
|
settings.set('lsd', $('lsd_checkbox').getProperty('checked'));
|
2011-08-13 12:14:29 +04:00
|
|
|
settings.set('encryption', $('encryption_select').getSelected()[0].getProperty('value'));
|
2011-09-20 21:15:47 +04:00
|
|
|
if(!$('anonymous_mode_checkbox').hasClass('invisible')) {
|
|
|
|
settings.set('anonymous_mode', $('anonymous_mode_checkbox').getProperty('checked'));
|
|
|
|
}
|
2011-06-05 20:08:30 +04:00
|
|
|
|
|
|
|
// Downloads
|
|
|
|
settings.set('save_path', $('savepath_text').getProperty('value'));
|
|
|
|
settings.set('temp_path_enabled', $('temppath_checkbox').getProperty('checked'));
|
|
|
|
settings.set('temp_path', $('temppath_text').getProperty('value'));
|
|
|
|
|
|
|
|
var watched_folders = getWatchedFolders();
|
|
|
|
settings.set('scan_dirs', watched_folders[0]);
|
|
|
|
settings.set('download_in_scan_dirs', watched_folders[1]);
|
|
|
|
|
2011-08-13 12:22:28 +04:00
|
|
|
if($('exportdir_checkbox').getProperty('checked'))
|
|
|
|
settings.set('export_dir', $('exportdir_text').getProperty('value'));
|
|
|
|
else
|
|
|
|
settings.set('export_dir', '');
|
2011-06-05 20:08:30 +04:00
|
|
|
settings.set('preallocate_all', $('preallocateall_checkbox').getProperty('checked'));
|
|
|
|
if(!$('appendexttr').hasClass('invisible')) {
|
|
|
|
settings.set('incomplete_files_ext', $('appendext_checkbox').getProperty('checked'));
|
|
|
|
}
|
|
|
|
settings.set('queueing_enabled', $('queueing_checkbox').getProperty('checked'));
|
|
|
|
settings.set('max_active_downloads', $('max_active_dl_value').getProperty('value').toInt());
|
|
|
|
settings.set('max_active_uploads', $('max_active_up_value').getProperty('value').toInt());
|
|
|
|
settings.set('max_active_torrents', $('max_active_to_value').getProperty('value').toInt());
|
2011-09-18 20:34:29 +04:00
|
|
|
settings.set('dont_count_slow_torrents', $('dont_count_slow_torrents_checkbox').getProperty('checked'));
|
2011-06-05 20:08:30 +04:00
|
|
|
|
|
|
|
settings.set('mail_notification_enabled', $('mail_notification_checkbox').getProperty('checked'));
|
|
|
|
settings.set('mail_notification_email', $('dest_email_txt').getProperty('value'));
|
|
|
|
settings.set('mail_notification_smtp', $('smtp_server_txt').getProperty('value'));
|
|
|
|
settings.set('mail_notification_ssl_enabled', $('mail_ssl_checkbox').getProperty('checked'));
|
|
|
|
settings.set('mail_notification_auth_enabled', $('mail_auth_checkbox').getProperty('checked'));
|
|
|
|
settings.set('mail_notification_username', $('mail_username_text').getProperty('value'));
|
|
|
|
settings.set('mail_notification_password', $('mail_password_text').getProperty('value'));
|
|
|
|
|
|
|
|
settings.set('autorun_enabled', $('autorun_checkbox').getProperty('checked'));
|
|
|
|
settings.set('autorun_program', $('autorunProg_txt').getProperty('value'));
|
|
|
|
|
|
|
|
// IP Filter
|
|
|
|
settings.set('ip_filter_enabled', $('ipfilter_enabled_checkbox').getProperty('checked'));
|
|
|
|
settings.set('ip_filter_path', $('ipfilter_text').getProperty('value'));
|
|
|
|
|
|
|
|
// Peer Proxy
|
|
|
|
var proxy_type_str = $('peer_proxy_type_select').getProperty('value');
|
|
|
|
var proxy_type = -1;
|
|
|
|
var proxy_auth_enabled = false;
|
|
|
|
if(proxy_type_str == "socks5") {
|
|
|
|
if($('peer_proxy_auth_checkbox').getProperty('checked')) {
|
|
|
|
proxy_type = 4;
|
|
|
|
proxy_auth_enabled = true;
|
|
|
|
} else {
|
|
|
|
proxy_type = 2;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if(proxy_type_str == "socks4") {
|
|
|
|
proxy_type = 5;
|
|
|
|
} else {
|
|
|
|
if(proxy_type_str == "http") {
|
|
|
|
if($('peer_proxy_auth_checkbox').getProperty('checked')) {
|
|
|
|
proxy_type = 3;
|
|
|
|
proxy_auth_enabled = true;
|
|
|
|
} else {
|
|
|
|
proxy_type = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
settings.set('proxy_type', proxy_type);
|
|
|
|
settings.set('proxy_auth_enabled', proxy_auth_enabled);
|
|
|
|
settings.set('proxy_ip', $('peer_proxy_host_text').getProperty('value'));
|
|
|
|
settings.set('proxy_port', $('peer_proxy_port_value').getProperty('value').toInt());
|
|
|
|
settings.set('proxy_peer_connections', $('use_peer_proxy_checkbox').getProperty('checked'));
|
|
|
|
settings.set('proxy_username', $('peer_proxy_username_text').getProperty('value'));
|
|
|
|
settings.set('proxy_password', $('peer_proxy_password_text').getProperty('value'));
|
|
|
|
|
|
|
|
// Web UI
|
|
|
|
var web_ui_port = $('webui_port_value').getProperty('value').toInt();
|
|
|
|
if(web_ui_port <= 1024 || web_ui_port > 65535) {
|
|
|
|
alert("_(The port used for the Web UI must be greater than 1024 and less than 65535.)");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
settings.set('web_ui_port', web_ui_port);
|
|
|
|
|
|
|
|
var web_ui_username = $('webui_username_text').getProperty('value');
|
|
|
|
var web_ui_password = $('webui_password_text').getProperty('value');
|
|
|
|
// Add some username/password length checking
|
|
|
|
if(web_ui_username.length < 3) {
|
|
|
|
alert("_(The Web UI username must be at least 3 characters long.)");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if(web_ui_password.length < 3) {
|
|
|
|
alert("_(The Web UI password must be at least 3 characters long.)");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
settings.set('web_ui_username', web_ui_username);
|
|
|
|
settings.set('web_ui_password', web_ui_password);
|
|
|
|
|
|
|
|
settings.set('bypass_local_auth', $('bypass_local_auth_checkbox').getProperty('checked'));
|
|
|
|
settings.set('use_https', $('use_https_checkbox').getProperty('checked'));
|
|
|
|
settings.set('ssl_key', $('ssl_key_textarea').getProperty('value'));
|
|
|
|
settings.set('ssl_cert', $('ssl_cert_textarea').getProperty('value'));
|
|
|
|
|
|
|
|
// Dyndns
|
|
|
|
settings.set('dyndns_enabled', $('use_dyndns_checkbox').getProperty('checked'));
|
|
|
|
settings.set('dyndns_service', $('dyndns_select').getProperty('value'));
|
|
|
|
settings.set('dyndns_domain', $('dyndns_domain_text').getProperty('value'));
|
|
|
|
settings.set('dyndns_username', $('dyndns_username_text').getProperty('value'));
|
|
|
|
settings.set('dyndns_password', $('dyndns_password_text').getProperty('value'));
|
|
|
|
|
|
|
|
// Locale
|
|
|
|
settings.set('locale', $('locale_select').getProperty('value'));
|
|
|
|
|
|
|
|
// Send it to qBT
|
|
|
|
var json_str = JSON.encode(settings);
|
|
|
|
|
2012-06-10 21:15:57 +04:00
|
|
|
new Request({url: 'command/setPreferences',
|
2011-06-05 20:08:30 +04:00
|
|
|
method: 'post',
|
|
|
|
data: {'json': json_str,
|
|
|
|
},
|
|
|
|
onFailure: function() {
|
|
|
|
alert("_(Unable to save program preferences, qBittorrent is probably unreachable.)");
|
|
|
|
window.parent.closeWindows();
|
|
|
|
},
|
|
|
|
onSuccess: function() {
|
|
|
|
// Close window
|
|
|
|
window.parent.location.reload();
|
|
|
|
window.parent.closeWindows();
|
|
|
|
}
|
|
|
|
}).send();
|
|
|
|
};
|
|
|
|
|
* Replace priority combo boxes by check boxes in Web UI as in Regular UI
* Prepare http server and preferences classes to add new settings to Web UI
* Tabified Program preferences in Web UI since there will be a lot of settings soon
* Started to add new settings to Web UI (PeX, LSD, Encryption, save path, temp path, scan dir, preallocateall, queueing, listen_port, upnp, nat-pmp, language, ip filter) -> Proxy is missing
* Added a command line parameter to change the web ui port
* Fix PeerGuardian .p2b binary filter support
2009-12-28 22:39:47 +03:00
|
|
|
loadPreferences();
|
2010-03-18 22:25:16 +03:00
|
|
|
</script>
|