mirror of
https://github.com/transmission/transmission
synced 2025-03-04 02:28:03 +00:00
(web) #3456:Improve web client torrent list display
This commit is contained in:
parent
b5dabf2968
commit
222261cb64
4 changed files with 28 additions and 1 deletions
|
@ -8,6 +8,7 @@
|
|||
|
||||
var transmission;
|
||||
var dialog;
|
||||
var resizeTimer = null;
|
||||
// Test for a Webkit build that supports box-shadow: 521+ (release Safari 3 is
|
||||
// actually 523.10.3). We need 3.1 for CSS animation (dialog sheets) but as it
|
||||
// degrades gracefully let's not worry too much.
|
||||
|
@ -79,6 +80,13 @@ $(document).ready( function() {
|
|||
$('body div#torrent_container').css('min-height', '338px');
|
||||
$("label[for=torrent_upload_url]").text("URL: ");
|
||||
}
|
||||
|
||||
// Add resize event handler with a timeout to handle browsers that fire a
|
||||
// resize event for every pixel changed
|
||||
$(window).bind('resize', function() {
|
||||
if (resizeTimer) clearTimeout(resizeTimer);
|
||||
resizeTimer = setTimeout('transmission.refreshDisplay()', 50)
|
||||
});
|
||||
});
|
||||
|
||||
/*
|
||||
|
|
|
@ -662,6 +662,14 @@ Torrent.prototype =
|
|||
}
|
||||
setInnerHTML( root._progress_details_container, progress_details );
|
||||
|
||||
if( compact ){
|
||||
var width = root._progress_details_container.offsetLeft - root._name_container.offsetLeft;
|
||||
root._name_container.style.width = width + 'px';
|
||||
}
|
||||
else {
|
||||
root._name_container.style.width = '100%';
|
||||
}
|
||||
|
||||
// Update the peer details and pause/resume button
|
||||
e = root._pause_resume_button_image;
|
||||
if ( this.state() === Torrent._StatusPaused ) {
|
||||
|
|
|
@ -1532,6 +1532,7 @@ Transmission.prototype =
|
|||
|
||||
this.setPref( Prefs._ShowInspector, true );
|
||||
this.updateInspector( );
|
||||
this.refreshDisplay( );
|
||||
},
|
||||
|
||||
/*
|
||||
|
@ -1553,6 +1554,7 @@ Transmission.prototype =
|
|||
}
|
||||
|
||||
this.setPref( Prefs._ShowInspector, false );
|
||||
this.refreshDisplay( );
|
||||
},
|
||||
|
||||
/*
|
||||
|
@ -1961,6 +1963,7 @@ Transmission.prototype =
|
|||
this.setTorrentBgColors( );
|
||||
this.updateStatusbar( );
|
||||
this.selectionChanged( );
|
||||
this.refreshDisplay( );
|
||||
},
|
||||
|
||||
setEnabled: function( key, flag )
|
||||
|
|
|
@ -397,8 +397,9 @@ ul.torrent_list li.torrent.selected {
|
|||
ul.torrent_list li.torrent div.torrent_name {
|
||||
font-size: 1.3em;
|
||||
font-weight: bold;
|
||||
word-wrap: break-word;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: #222;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
|
@ -407,6 +408,9 @@ ul.torrent_list li.torrent div.torrent_name.compact {
|
|||
float: left;
|
||||
z-index: 1;
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
ul.torrent_list li.torrent.selected div.torrent_name {
|
||||
|
@ -415,7 +419,11 @@ ul.torrent_list li.torrent.selected div.torrent_name {
|
|||
|
||||
ul.torrent_list li.torrent div.torrent_progress_details,
|
||||
ul.torrent_list li.torrent div.torrent_peer_details {
|
||||
clear: left;
|
||||
font-size: 1em;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
ul.torrent_list li.torrent div.torrent_progress_details.error {
|
||||
|
|
Loading…
Add table
Reference in a new issue