mirror of
https://github.com/transmission/transmission.git
synced 2025-12-23 20:08:43 +00:00
(trunk web) enable the torrent inspector for iPhone / iPod.
Double tap the torrent to show the inspector for it. patch from r0ssar00
This commit is contained in:
@@ -85,7 +85,7 @@ Torrent.prototype =
|
||||
e.appendChild( image );
|
||||
top_e.appendChild( e );
|
||||
element._pause_resume_button_image = image;
|
||||
if (!iPhone) $(e).bind('click', {element: element}, this.clickPauseResumeButton);
|
||||
if (!iPhone) $(e).bind('click', function(e) { element._torrent.clickPauseResumeButton(e); });
|
||||
|
||||
// Create the 'peer details' <div>
|
||||
e = document.createElement( 'div' );
|
||||
@@ -94,7 +94,7 @@ Torrent.prototype =
|
||||
element._peer_details_container = e;
|
||||
|
||||
// Set the torrent click observer
|
||||
element.bind('click', {element: element}, this.clickTorrent);
|
||||
element.bind('click', function(e){ element._torrent.clickTorrent(e) });
|
||||
|
||||
// Safari hack - first torrent needs to be moved down for some reason. Seems to be ok when
|
||||
// using <li>'s in straight html, but adding through the DOM gets a bit odd.
|
||||
@@ -216,7 +216,7 @@ Torrent.prototype =
|
||||
// Prevents click carrying to parent element
|
||||
// which deselects all on click
|
||||
event.stopPropagation();
|
||||
var torrent = event.data.element._torrent;
|
||||
var torrent = this;
|
||||
|
||||
// 'Apple' button emulation on PC :
|
||||
// Need settable meta-key and ctrl-key variables for mac emulation
|
||||
@@ -229,6 +229,8 @@ Torrent.prototype =
|
||||
|
||||
// Shift-Click - Highlight a range between this torrent and the last-clicked torrent
|
||||
if (iPhone) {
|
||||
if ( torrent.isSelected() )
|
||||
torrent._controller.showInspector();
|
||||
torrent._controller.setSelectedTorrent( torrent, true );
|
||||
|
||||
} else if (event.shiftKey) {
|
||||
@@ -265,7 +267,7 @@ Torrent.prototype =
|
||||
event.stopPropagation();
|
||||
|
||||
// either stop or start the torrent
|
||||
var torrent = event.data.element._torrent;
|
||||
var torrent = this;
|
||||
if( torrent.isActive( ) )
|
||||
torrent._controller.stopTorrent( torrent );
|
||||
else
|
||||
|
||||
@@ -51,7 +51,7 @@ Transmission.prototype =
|
||||
$('.file_wanted_control').live('click', function(e){ tr.fileWantedClicked(e, this); });
|
||||
$('.file_priority_control').live('click', function(e){ tr.filePriorityClicked(e, this); });
|
||||
if (iPhone) {
|
||||
$('#torrent_inspector').bind('click', function(e){ tr.hideInspector(); });
|
||||
$('#inspector_close').bind('click', function(e){ tr.hideInspector(); });
|
||||
$('#preferences_link').bind('click', function(e){ tr.releaseClutchPreferencesButton(e); });
|
||||
} else {
|
||||
$(document).bind('keydown', function(e){ tr.keyDown(e); });
|
||||
@@ -192,8 +192,8 @@ Transmission.prototype =
|
||||
|
||||
if( this[Prefs._ShowFilter] )
|
||||
this.showFilter( );
|
||||
|
||||
if( this[Prefs._ShowInspector] )
|
||||
|
||||
if( !iPhone && this[Prefs._ShowInspector] )
|
||||
this.showInspector( );
|
||||
|
||||
},
|
||||
@@ -942,7 +942,7 @@ Transmission.prototype =
|
||||
var total_upload_speed = 0;
|
||||
var total_verified = 0;
|
||||
var na = 'N/A';
|
||||
var tab = this._inspector._info_tab;
|
||||
var tab = this._inspector._info_tab;
|
||||
|
||||
$("#torrent_inspector_size, .inspector_row div").css('color', '#222');
|
||||
|
||||
@@ -1085,6 +1085,7 @@ Transmission.prototype =
|
||||
$('#torrent_inspector').show();
|
||||
if (iPhone) {
|
||||
$('body').addClass('inspector_showing');
|
||||
$('#inspector_close').show();
|
||||
this.hideiPhoneAddressbar();
|
||||
} else {
|
||||
var w = $('#torrent_inspector').width() + 1 + 'px';
|
||||
@@ -1108,6 +1109,7 @@ Transmission.prototype =
|
||||
if (iPhone) {
|
||||
this.deselectAll( );
|
||||
$('body.inspector_showing').removeClass('inspector_showing');
|
||||
$('#inspector_close').hide();
|
||||
this.hideiPhoneAddressbar();
|
||||
} else {
|
||||
$('#torrent_filter_bar')[0].style.right = '0px';
|
||||
|
||||
Reference in New Issue
Block a user