From 652811502ac61e1e81fd1424818c73867c8191de Mon Sep 17 00:00:00 2001 From: Jordan Lee Date: Tue, 23 Aug 2011 15:32:52 +0000 Subject: [PATCH] (trunk web) #4436 "odd behavior and display" -- fixed. --- web/javascript/torrent-row.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/web/javascript/torrent-row.js b/web/javascript/torrent-row.js index c9493fac3..fb23b10d6 100644 --- a/web/javascript/torrent-row.js +++ b/web/javascript/torrent-row.js @@ -180,7 +180,7 @@ TorrentRendererFull.prototype = c = [ Transmission.fmt.size( sizeWhenDone ), ' of ', Transmission.fmt.size( t.getTotalSize() ), - ' (', t.getPercentDoneStr, '%)' ]; + ' (', t.getPercentDoneStr(), '%)' ]; // append UL stats: ', uploaded 8.59 GiB (Ratio: 12.3)' c.push( ', uploaded ', Transmission.fmt.size( t.getUploadedEver() ), @@ -251,7 +251,7 @@ TorrentRendererCompact.prototype = details.className = 'torrent_peer_details compact'; var name = document.createElement( 'div' ); - name.className = 'torrent_name'; + name.className = 'torrent_name compact'; var root = document.createElement( 'li' ); root.appendChild( progressbar.element ); @@ -343,11 +343,12 @@ TorrentRow.prototype = setTorrent: function( controller, t ) { if( this._torrent !== t ) { - var key = 'dataChanged.renderer'; - if( this._torrent ) - $(this).unbind(key); - if(( this._torrent = t )) - $(this).bind(key,this.render(controller)); + var row = this + var key = 'dataChanged.torrentRowListener'; + if(this._torrent) + $(this._torrent).unbind(key); + if((this._torrent = t)) + $(this._torrent).bind(key,function(){row.render(controller)}) } }, getTorrent: function() { -- 2.40.0