Changeset 12878


Ignore:
Timestamp:
Sep 15, 2011, 4:40:38 AM (10 years ago)
Author:
jordan
Message:

when no torrents are selected, have the inspector's piece info show 'N/A'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web/javascript/inspector.js

    r12877 r12878  
    121121        }
    122122
    123         setInnerHTML(e.pieces, (pieceSize==='Mixed') ? 'Mixed' : ''+pieceCount+' pieces @ '+pieceSize);
     123        if (!pieceCount)
     124            setInnerHTML(e.pieces, na);
     125        else if (pieceSize == 'Mixed')
     126            setInnerHTML(e.pieces, 'Mixed');
     127        else
     128            setInnerHTML(e.pieces, pieceCount + ' pieces @ ' + pieceSize);
     129
    124130        setInnerHTML(e.hash, hash || na);
    125131        setInnerHTML(e.secure, secure || na);
Note: See TracChangeset for help on using the changeset viewer.