Changeset 12805
- Timestamp:
- Aug 30, 2011, 9:27:30 PM (12 years ago)
- Location:
- trunk/web/javascript
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web/javascript/torrent-row.js
r12782 r12805 346 346 ****/ 347 347 348 function TorrentRow(view, controller, torrent , selected)349 { 350 this.initialize(view, controller, torrent , selected);348 function TorrentRow(view, controller, torrent) 349 { 350 this.initialize(view, controller, torrent); 351 351 } 352 352 TorrentRow.prototype = 353 353 { 354 initialize: function(view, controller, torrent , selected) {354 initialize: function(view, controller, torrent) { 355 355 this._view = view; 356 356 this._element = view.createRow(); 357 357 this.setTorrent(controller, torrent); 358 if (selected)359 this.setSelected(selected);360 358 this.render(controller); 361 359 -
trunk/web/javascript/transmission.js
r12803 r12805 1950 1950 refilter: function(rebuildEverything) 1951 1951 { 1952 var i, e, id, t, row, tmp, sel,rows, clean_rows, dirty_rows,1952 var i, e, id, t, row, tmp, rows, clean_rows, dirty_rows, 1953 1953 sort_mode = this[Prefs._SortMethod], 1954 1954 sort_direction = this[Prefs._SortDirection], … … 1957 1957 filter_tracker = this.filterTracker, 1958 1958 renderer = this.torrentRenderer, 1959 list = this._torrent_list; 1959 list = this._torrent_list, 1960 old_sel_count = $(list).children('.selected').length; 1961 1960 1962 1961 1963 clearTimeout(this.refilterTimer); 1962 1964 delete this.refilterTimer; 1963 1964 // build a temporary lookup table of selected torrent ids1965 sel = { };1966 for (i=0; row=this._rows[i]; ++i)1967 if (row.isSelected())1968 sel[row.getTorrentId()] = row;1969 1965 1970 1966 if (rebuildEverything) { … … 2008 2004 t = this._torrents[id]; 2009 2005 if (t && t.test(filter_mode, filter_text, filter_tracker)) { 2010 var s = t.getId() in sel; 2011 row = new TorrentRow(renderer, this, t, s); 2006 row = new TorrentRow(renderer, this, t); 2012 2007 row.getElement().row = row; 2013 2008 dirty_rows.push(row); … … 2064 2059 this.updateStatusbar(); 2065 2060 this.refreshFilterButton(); 2066 if ( Object.keys(sel).length !== this.getSelectedRows().length)2061 if (old_sel_count !== $(list).children('.selected').length) 2067 2062 this.selectionChanged(); 2068 2063 },
Note: See TracChangeset
for help on using the changeset viewer.