Ticket #2992: fixRatio.patch

File fixRatio.patch, 650 bytes (added by Longinus00, 13 years ago)

fixed tabbing

  • web/javascript/torrent.js

    ---
     web/javascript/torrent.js |    7 ++++++-
     1 files changed, 6 insertions(+), 1 deletions(-)
    
    diff --git web/javascript/torrent.js web/javascript/torrent.js
    index aefea65..ce09a08 100644
    Torrent.prototype = 
    551551                        c += ', uploaded ';
    552552                        c += Math.formatBytes( this._upload_total );
    553553                        c += ' (Ratio ';
    554                         c += Math.round(this._upload_ratio*100)/100;
     554                        if(this._upload_ratio > -1)
     555                                c += Math.round(this._upload_ratio*100)/100;
     556                        else if(this._upload_ratio == -2)
     557                                c += 'Inf';
     558                        else
     559                                c += '0';
    555560                        c += ')';
    556561                        progress_details = c;
    557562