|
|
@ -118,13 +118,25 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</fieldset> |
|
|
|
</fieldset> |
|
|
|
<fieldset> |
|
|
|
<fieldset> |
|
|
|
<legend><b>_(Torrent queueing)</b></legend> |
|
|
|
<legend><b>_(Email notification upon download completion)</b></legend> |
|
|
|
<div style="padding-left: 30px;"> |
|
|
|
<div style="padding-left: 30px;"> |
|
|
|
|
|
|
|
<input type="checkbox" id="mail_notification_checkbox" onclick="updateMailNotification();"/> _(Email notification upon download completion) |
|
|
|
<table> |
|
|
|
<table> |
|
|
|
<tr> |
|
|
|
<tr> |
|
|
|
<td style="vertical-align: bottom; text-align: right;"><input type="checkbox" id="queueing_checkbox" onclick="updateQueuingSystem();"/></td><td>_(Torrent queueing)</td> |
|
|
|
<td style="vertical-align: bottom; text-align: right;">_(Destination email:)</td><td><input type="text" id="dest_email_txt"/></td> |
|
|
|
</tr> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<tr> |
|
|
|
|
|
|
|
<td style="vertical-align: bottom; text-align: right;">_(SMTP server:)</td><td><input type="text" id="smtp_server_txt"/></td> |
|
|
|
|
|
|
|
</tr> |
|
|
|
|
|
|
|
</table> |
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
</fieldset> |
|
|
|
|
|
|
|
<fieldset> |
|
|
|
|
|
|
|
<legend><b>_(Torrent queueing)</b></legend> |
|
|
|
|
|
|
|
<div style="padding-left: 30px;"> |
|
|
|
|
|
|
|
<input type="checkbox" id="queueing_checkbox" onclick="updateQueuingSystem();"/> _(Torrent queueing) |
|
|
|
|
|
|
|
<table> |
|
|
|
|
|
|
|
<tr> |
|
|
|
<td style="vertical-align: bottom; text-align: right;">_(Maximum active downloads:)</td><td><input type="text" id="max_active_dl_value" style="width: 4em;"/></td> |
|
|
|
<td style="vertical-align: bottom; text-align: right;">_(Maximum active downloads:)</td><td><input type="text" id="max_active_dl_value" style="width: 4em;"/></td> |
|
|
|
</tr> |
|
|
|
</tr> |
|
|
|
<tr> |
|
|
|
<tr> |
|
|
@ -360,6 +372,11 @@ |
|
|
|
var max_active_downloads = $('max_active_dl_value').get('value'); |
|
|
|
var max_active_downloads = $('max_active_dl_value').get('value'); |
|
|
|
var max_active_uploads = $('max_active_up_value').get('value'); |
|
|
|
var max_active_uploads = $('max_active_up_value').get('value'); |
|
|
|
var max_active_torrents = $('max_active_to_value').get('value'); |
|
|
|
var max_active_torrents = $('max_active_to_value').get('value'); |
|
|
|
|
|
|
|
var mail_notification_enabled = 0; |
|
|
|
|
|
|
|
if($defined($('mail_notification_checkbox').get('checked')) && $('mail_notification_checkbox').get('checked')) |
|
|
|
|
|
|
|
mail_notification_enabled = 1; |
|
|
|
|
|
|
|
var mail_notification_email = $('dest_email_txt').get('value'); |
|
|
|
|
|
|
|
var mail_notification_smtp = $('smtp_server_txt').get('value'); |
|
|
|
// IP Filter |
|
|
|
// IP Filter |
|
|
|
var ip_filter_enabled = 0; |
|
|
|
var ip_filter_enabled = 0; |
|
|
|
if($defined($('ipfilter_enabled_checkbox').get('checked')) && $('ipfilter_enabled_checkbox').get('checked')) |
|
|
|
if($defined($('ipfilter_enabled_checkbox').get('checked')) && $('ipfilter_enabled_checkbox').get('checked')) |
|
|
@ -471,6 +488,9 @@ |
|
|
|
dict.set('max_active_uploads', max_active_uploads); |
|
|
|
dict.set('max_active_uploads', max_active_uploads); |
|
|
|
dict.set('max_active_downloads', max_active_downloads); |
|
|
|
dict.set('max_active_downloads', max_active_downloads); |
|
|
|
dict.set('max_active_torrents', max_active_torrents); |
|
|
|
dict.set('max_active_torrents', max_active_torrents); |
|
|
|
|
|
|
|
dict.set('mail_notification_enabled', mail_notification_enabled); |
|
|
|
|
|
|
|
dict.set('mail_notification_email', mail_notification_email); |
|
|
|
|
|
|
|
dict.set('mail_notification_smtp', mail_notification_smtp); |
|
|
|
// IP Filter |
|
|
|
// IP Filter |
|
|
|
dict.set('ip_filter_enabled', ip_filter_enabled); |
|
|
|
dict.set('ip_filter_enabled', ip_filter_enabled); |
|
|
|
dict.set('ip_filter_path', ip_filter_path); |
|
|
|
dict.set('ip_filter_path', ip_filter_path); |
|
|
@ -586,6 +606,16 @@ updateQueueingSystem = function() { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
updateMailNotification = function() { |
|
|
|
|
|
|
|
if($defined($('mail_notification_checkbox').get('checked')) && $('mail_notification_checkbox').get('checked')) { |
|
|
|
|
|
|
|
$('dest_email_txt').removeProperty('disabled'); |
|
|
|
|
|
|
|
$('smtp_server_txt').removeProperty('disabled'); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
$('dest_email_txt').set('disabled', 'true'); |
|
|
|
|
|
|
|
$('smtp_server_txt').set('disabled', 'true'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
updateFilterSettings = function() { |
|
|
|
updateFilterSettings = function() { |
|
|
|
if($defined($('ipfilter_enabled_checkbox').get('checked')) && $('ipfilter_enabled_checkbox').get('checked')) { |
|
|
|
if($defined($('ipfilter_enabled_checkbox').get('checked')) && $('ipfilter_enabled_checkbox').get('checked')) { |
|
|
|
$('ipfilter_text').removeProperty('disabled'); |
|
|
|
$('ipfilter_text').removeProperty('disabled'); |
|
|
@ -661,7 +691,6 @@ getWatchedFolders = function() { |
|
|
|
var download_in_place = Array(); |
|
|
|
var download_in_place = Array(); |
|
|
|
for(var i=0; i<nb_folders; i+=1) { |
|
|
|
for(var i=0; i<nb_folders; i+=1) { |
|
|
|
var folder_path = $('text_watch_'+i).get('value').trim(); |
|
|
|
var folder_path = $('text_watch_'+i).get('value').trim(); |
|
|
|
alert(folder_path); |
|
|
|
|
|
|
|
if(folder_path.length > 0) { |
|
|
|
if(folder_path.length > 0) { |
|
|
|
folders[folders.length] = folder_path; |
|
|
|
folders[folders.length] = folder_path; |
|
|
|
if($defined($("cb_watch_"+i).get('checked')) && $("cb_watch_"+i).get('checked')) { |
|
|
|
if($defined($("cb_watch_"+i).get('checked')) && $("cb_watch_"+i).get('checked')) { |
|
|
@ -834,6 +863,15 @@ loadPreferences = function() { |
|
|
|
$('exportdir_checkbox').removeProperty('checked'); |
|
|
|
$('exportdir_checkbox').removeProperty('checked'); |
|
|
|
} |
|
|
|
} |
|
|
|
updateExportDirEnabled(); |
|
|
|
updateExportDirEnabled(); |
|
|
|
|
|
|
|
var mail_notification_enabled = pref.mail_notification_enabled; |
|
|
|
|
|
|
|
if(mail_notification_enabled) { |
|
|
|
|
|
|
|
$('mail_notification_checkbox').set('checked', 'checked'); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
$('mail_notification_checkbox').removeProperty('checked'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
$('dest_email_txt').set('value', pref.mail_notification_email); |
|
|
|
|
|
|
|
$('smtp_server_txt').set('value', pref.mail_notification_smtp); |
|
|
|
|
|
|
|
updateMailNotification(); |
|
|
|
if(pref.preallocate_all) { |
|
|
|
if(pref.preallocate_all) { |
|
|
|
$('preallocateall_checkbox').set('checked', 'checked'); |
|
|
|
$('preallocateall_checkbox').set('checked', 'checked'); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|