mirror of
https://github.com/transmission/transmission
synced 2025-02-08 15:34:44 +00:00
(trunk web) 'Start when added' checkbox when adding torrents. Patch from Grub (with fixes). Fixes #2295.
This commit is contained in:
parent
a53de0d430
commit
7132dfda94
4 changed files with 17 additions and 3 deletions
|
@ -322,6 +322,8 @@
|
|||
<input type="file" name="torrent_files[]" id="torrent_upload_file" multiple="multiple" />
|
||||
<label for="torrent_upload_url">Or enter a URL:</label>
|
||||
<input type="text" id="torrent_upload_url"/>
|
||||
<input type="checkbox" id="torrent_auto_start" />
|
||||
<label for="torrent_auto_start" id="auto_start_label">Start when added</label>
|
||||
</div>
|
||||
<a href="#upload" id="upload_confirm_button">Upload</a>
|
||||
<a href="#cancel" id="upload_cancel_button">Cancel</a>
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -205,7 +205,7 @@ TransmissionRemote.prototype =
|
|||
var o = {
|
||||
method: 'torrent-add',
|
||||
arguments: {
|
||||
paused: (options.paused ? 'true' : 'false'),
|
||||
paused: (options.paused),
|
||||
filename: url
|
||||
}
|
||||
};
|
||||
|
|
|
@ -894,6 +894,16 @@ div#upload_container div.dialog_window div.dialog_message input[type=text] {
|
|||
padding: 2px;
|
||||
}
|
||||
|
||||
div#upload_container div.dialog_window div.dialog_message input[type=checkbox] {
|
||||
margin: 15px 3px 0 0;
|
||||
display: inline;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
div#upload_container div.dialog_window div.dialog_message #auto_start_label {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
div.dialog_container div.dialog_window form {
|
||||
margin: 0;
|
||||
padding: 0px;
|
||||
|
|
Loading…
Reference in a new issue