mirror of
https://github.com/transmission/transmission
synced 2025-02-20 13:16:53 +00:00
(trunk web) apply the even/odd property to the row's class before adding the fragment, rather than after
This commit is contained in:
parent
6d2f186959
commit
07129ccd08
1 changed files with 1 additions and 10 deletions
|
@ -1669,15 +1669,6 @@ Transmission.prototype =
|
|||
}
|
||||
},
|
||||
|
||||
/*
|
||||
* Set the alternating background colors for torrents
|
||||
*/
|
||||
setTorrentBgColors: function()
|
||||
{
|
||||
for (var i=0, row; row=this._rows[i]; ++i)
|
||||
row.setEven((i+1) % 2 == 0);
|
||||
},
|
||||
|
||||
updateStatusbar: function()
|
||||
{
|
||||
this.refreshFilterButton();
|
||||
|
@ -2036,6 +2027,7 @@ Transmission.prototype =
|
|||
{
|
||||
var is_selected = sel.indexOf(tor) !== -1;
|
||||
var row = new TorrentRow(this.torrentRenderer, this, tor, is_selected);
|
||||
row.setEven((i+1) % 2 == 0);
|
||||
if (is_selected)
|
||||
new_sel_count++;
|
||||
if (!iPhone) {
|
||||
|
@ -2054,7 +2046,6 @@ Transmission.prototype =
|
|||
this._torrent_list.appendChild(fragment);
|
||||
|
||||
// sync gui
|
||||
this.setTorrentBgColors();
|
||||
this.updateStatusbar();
|
||||
if (sel.length !== new_sel_count)
|
||||
this.selectionChanged();
|
||||
|
|
Loading…
Reference in a new issue