1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-02 12:32:54 +00:00

(trunk web) add "Where" info to the inspector. Fixes #2246

This commit is contained in:
Kevin Glowacz 2009-06-26 03:03:17 +00:00
parent 1980bcc988
commit 8c812ca086
4 changed files with 29 additions and 8 deletions

View file

@ -109,6 +109,18 @@
<div id="torrent_inspector_creator_date">N/A</div>
</div>
</div><!-- class="inspector_group"-->
<div class="inspector_group">
<div class="inspector_group_label">Where</div>
<div class="inspector_row">
<div class="inspector_label">Download Dir:</div>
<div id="torrent_inspector_download_dir">N/A</div>
</div>
<div class="inspector_row">
<div class="inspector_label">Torrent File:</div>
<div id="torrent_inspector_torrent_file">N/A</div>
</div>
</div><!-- class="inspector_group"-->
</div><!-- id="inspector_tab_info_container" -->
<div style="display:none;" class="inspector_container" id="inspector_tab_activity_container">

View file

@ -308,6 +308,8 @@ Torrent.prototype =
this._total_leechers = Math.max( 0, data.leechers );
this._total_seeders = Math.max( 0, data.seeders );
this._state = data.status;
this._download_dir = data.downloadDir;
this._torrent_file = data.torrentFile;
if (data.fileStats)
this.refreshFileModel( data );

View file

@ -86,6 +86,8 @@ Transmission.prototype =
this._inspector._info_tab.comment = $(ti+'comment')[0];
this._inspector._info_tab.creator_date = $(ti+'creator_date')[0];
this._inspector._info_tab.creator = $(ti+'creator')[0];
this._inspector._info_tab.download_dir = $(ti+'download_dir')[0];
this._inspector._info_tab.torrent_file = $(ti+'torrent_file')[0];
this._inspector._info_tab.downloaded = $(ti+'downloaded')[0];
this._inspector._info_tab.download_from = $(ti+'download_from')[0];
this._inspector._info_tab.download_speed = $(ti+'download_speed')[0];
@ -918,6 +920,8 @@ Transmission.prototype =
var creator = 'N/A';
var comment = 'N/A';
var download_dir = 'N/A';
var torrent_file = 'N/A';
var date_created = 'N/A';
var error = '';
var hash = 'N/A';
@ -983,17 +987,16 @@ Transmission.prototype =
{
var t = torrents[0];
if( t._error_message )
{
error = t._error_message ;
}
if( t._comment)
{
comment = t._comment ;
}
if( t._creator )
{
creator = t._creator ;
}
if( t._download_dir)
download_dir = t._download_dir;
if( t._torrent_file )
torrent_file = t._torrent_file;
hash = t.hash();
date_created = Math.formatTimestamp( t._creator_date );
}
@ -1054,6 +1057,8 @@ Transmission.prototype =
setInnerHTML( tab.progress, torrents.length ? Math.ratio( sizeDone*100, sizeWhenDone ) + '%' : na );
setInnerHTML( tab.comment, comment.replace(/\//g, '/&#8203;') );
setInnerHTML( tab.creator, creator );
setInnerHTML( tab.download_dir, download_dir.replace(/([\/_\.])/g, "$1&#8203;") );
setInnerHTML( tab.torrent_file, torrent_file.replace(/([\/_\.])/g, "$1&#8203;") );
setInnerHTML( tab.error, error );
$(".inspector_row > div:contains('N/A')").css('color', '#666');

View file

@ -107,7 +107,8 @@ TransmissionRemote.prototype =
'isPrivate', 'leechers', 'leftUntilDone', 'name',
'peersConnected', 'peersGettingFromUs', 'peersSendingToUs',
'rateDownload', 'rateUpload', 'seeders', 'sizeWhenDone',
'status', 'swarmSpeed', 'totalSize', 'uploadedEver', 'files', 'fileStats' ]
'status', 'swarmSpeed', 'totalSize', 'uploadedEver',
'downloadDir', 'torrentFile', 'files', 'fileStats' ]
}
};
@ -126,7 +127,8 @@ TransmissionRemote.prototype =
'eta', 'haveUnchecked', 'haveValid', 'leechers', 'leftUntilDone',
'peersConnected', 'peersGettingFromUs', 'peersSendingToUs',
'rateDownload', 'rateUpload', 'recheckProgress', 'seeders',
'sizeWhenDone', 'status', 'swarmSpeed', 'uploadedEver' ]
'sizeWhenDone', 'status', 'swarmSpeed', 'uploadedEver',
'downloadDir' ]
}
};