(trunk web) #2758 "Transmission web interface is missing a compact view mode" -- revised patch

This commit is contained in:
Charles Kerr 2010-07-04 22:37:14 +00:00
parent d088b289dd
commit e35eaf06ac
2 changed files with 8 additions and 10 deletions

View File

@ -476,7 +476,7 @@ Torrent.prototype =
case Torrent._StatusSeeding:
if(compact_mode){
c += this.formatUL();
c = this.formatUL();
} else {
// 'Seeding to 13 of 22 peers - UL: 36.2 KiB/s'
c = 'Seeding to ';

View File

@ -224,6 +224,8 @@ Transmission.prototype =
if( !iPhone && this[Prefs._ShowInspector] )
this.showInspector( );
if( !iPhone && this[Prefs._CompactDisplayState] )
$('#compact_view').selectMenuItem();
},
/*
@ -1061,13 +1063,12 @@ Transmission.prototype =
tr.showStatsDialog( );
}
else if ($element[0].id == 'compact_view') {
this[Prefs._CompactDisplayState] = !this[Prefs._CompactDisplayState];
this.setPref( Prefs._CompactDisplayState, !this[Prefs._CompactDisplayState])
if(this[Prefs._CompactDisplayState])
$element.selectMenuItem();
else
$element.deselectMenuItem();
this.setDisplayMode( this[Prefs._CompactDisplayState] );
// Redraw html here
this.refreshDisplay( );
}
break;
@ -1670,14 +1671,11 @@ Transmission.prototype =
return removedAny;
},
setDisplayMode: function( iscompact )
refreshDisplay: function( )
{
var torrents = this.getAllTorrents();
var torrents = this.getVisibleTorrents();
for( var i=0; torrents[i]; ++i )
{
torrents[i].setListDisplayElements(this[Prefs._CompactDisplayState]);
}
torrents[i].refreshHTML();
},
/*