mirror of
https://github.com/transmission/transmission
synced 2024-12-26 01:27:28 +00:00
(trunk web) fix striping in the file list, which I broke last night
This commit is contained in:
parent
09197ddc94
commit
d147d93d2a
2 changed files with 11 additions and 15 deletions
|
@ -655,7 +655,7 @@ TorrentFile.prototype = {
|
||||||
this.readAttributes(file_data);
|
this.readAttributes(file_data);
|
||||||
|
|
||||||
var li = document.createElement('li');
|
var li = document.createElement('li');
|
||||||
li.classNameConst = 'inspector_torrent_file_list_entry ' + ((this._index%2)?'odd':'event');
|
li.classNameConst = 'inspector_torrent_file_list_entry ' + ((this._index%2)?'odd':'even');
|
||||||
li.className = li.classNameConst;
|
li.className = li.classNameConst;
|
||||||
|
|
||||||
var wanted_div = document.createElement('div');
|
var wanted_div = document.createElement('div');
|
||||||
|
|
|
@ -132,9 +132,8 @@ Transmission.prototype =
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
loadImages: function() {
|
loadImages: function() {
|
||||||
for(var i = 0; i<arguments.length; i++) {
|
for( var i=0, row; row=arguments[i]; ++i )
|
||||||
jQuery("<img>").attr("src", arguments[i]);
|
jQuery("<img>").attr("src", row);
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -610,13 +609,13 @@ Transmission.prototype =
|
||||||
var tab_ids = $(tab).parent('#inspector_tabs').find('.inspector_tab').map(
|
var tab_ids = $(tab).parent('#inspector_tabs').find('.inspector_tab').map(
|
||||||
function() { return $(this).attr('id'); }
|
function() { return $(this).attr('id'); }
|
||||||
);
|
);
|
||||||
for( var i=0; i<tab_ids.length; ++i ) {
|
for( var i=0, row; row=tab_ids[i]; ++i ) {
|
||||||
if (tab.id == tab_ids[i]) {
|
if (tab.id == row) {
|
||||||
$('#' + tab_ids[i]).addClass('selected');
|
$('#'+row).addClass('selected');
|
||||||
$('#' + tab_ids[i] + '_container').show();
|
$('#'+row+'_container').show();
|
||||||
} else {
|
} else {
|
||||||
$('#' + tab_ids[i]).removeClass('selected');
|
$('#'+row).removeClass('selected');
|
||||||
$('#' + tab_ids[i] + '_container').hide();
|
$('#'+row+'_container').hide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.hideiPhoneAddressbar();
|
this.hideiPhoneAddressbar();
|
||||||
|
@ -1394,11 +1393,9 @@ Transmission.prototype =
|
||||||
// decide which torrents to keep showing
|
// decide which torrents to keep showing
|
||||||
var allTorrents = this.getAllTorrents( );
|
var allTorrents = this.getAllTorrents( );
|
||||||
var keep = [ ];
|
var keep = [ ];
|
||||||
for( var i=0, len=allTorrents.length; i<len; ++i ) {
|
for( var i=0, t; t=allTorrents[i]; ++i )
|
||||||
var t = allTorrents[i];
|
|
||||||
if( t.test( this[Prefs._FilterMode], this._current_search ) )
|
if( t.test( this[Prefs._FilterMode], this._current_search ) )
|
||||||
keep.push( t );
|
keep.push( t );
|
||||||
}
|
|
||||||
|
|
||||||
// sort the keepers
|
// sort the keepers
|
||||||
Torrent.sortTorrents( keep, this[Prefs._SortMethod],
|
Torrent.sortTorrents( keep, this[Prefs._SortMethod],
|
||||||
|
@ -1409,8 +1406,7 @@ Transmission.prototype =
|
||||||
this.deselectAll( );
|
this.deselectAll( );
|
||||||
|
|
||||||
// hide the ones we're not keeping
|
// hide the ones we're not keeping
|
||||||
for( var i=keep.length; i<this._rows.length; ++i ) {
|
for( var i=keep.length, e; e=this._rows[i]; ++i ) {
|
||||||
var e = this._rows[i];
|
|
||||||
delete e._torrent;
|
delete e._torrent;
|
||||||
e[0].style.display = 'none';
|
e[0].style.display = 'none';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue