(trunk web) 'Start when added' checkbox when adding torrents. Patch from Grub (with fixes). Fixes #2295.

This commit is contained in:
Kevin Glowacz
2009-12-06 03:21:16 +00:00
parent a53de0d430
commit 7132dfda94
4 changed files with 17 additions and 3 deletions

View File

@@ -1410,6 +1410,7 @@ Transmission.prototype =
if (! confirmed) {
$('input#torrent_upload_file').attr('value', '');
$('input#torrent_upload_url').attr('value', '');
$('input#torrent_auto_start').attr('checked', this[Prefs._AutoStart]);
$('#upload_container').show();
if (!iPhone && Safari3) {
setTimeout("$('div#upload_container div.dialog_window').css('top', '0px');",10);
@@ -1419,10 +1420,11 @@ Transmission.prototype =
} else {
var tr = this;
var args = { };
var paused = !$('#torrent_auto_start').is(':checked');
if ('' != $('#torrent_upload_url').val()) {
tr.remote.addTorrentByUrl($('#torrent_upload_url').val(), { paused: !this[Prefs._AutoStart] });
tr.remote.addTorrentByUrl($('#torrent_upload_url').val(), { paused: paused });
} else {
args.url = '/transmission/upload?paused=' + (this[Prefs._AutoStart] ? 'false' : 'true');
args.url = '/transmission/upload?paused=' + paused;
args.type = 'POST';
args.data = { 'X-Transmission-Session-Id' : tr.remote._token };
args.dataType = 'xml';

View File

@@ -205,7 +205,7 @@ TransmissionRemote.prototype =
var o = {
method: 'torrent-add',
arguments: {
paused: (options.paused ? 'true' : 'false'),
paused: (options.paused),
filename: url
}
};