mirror of
https://github.com/transmission/transmission
synced 2025-02-20 13:16:53 +00:00
setSelectedRow(), selectRow(), deselectRow(), selectAll(), deselectAll() -- use jQuery selectors
This commit is contained in:
parent
0c221893d3
commit
e0ef0effc1
1 changed files with 5 additions and 5 deletions
|
@ -390,26 +390,26 @@ Transmission.prototype =
|
|||
},
|
||||
|
||||
setSelectedRow: function(row) {
|
||||
$.each(this.getSelectedRows(),function(i,r) {r.setSelected(false);});
|
||||
$(this._torrent_list).children('.selected').removeClass('selected');
|
||||
this.selectRow(row);
|
||||
},
|
||||
|
||||
selectRow: function(row) {
|
||||
row.setSelected(true);
|
||||
$(row.getElement()).addClass('selected');
|
||||
this.callSelectionChangedSoon();
|
||||
},
|
||||
|
||||
deselectRow: function(row) {
|
||||
row.setSelected(false);
|
||||
$(row.getElement()).removeClass('selected');
|
||||
this.callSelectionChangedSoon();
|
||||
},
|
||||
|
||||
selectAll: function() {
|
||||
$.each(this._rows, function(i,r) {r.setSelected(true);});
|
||||
$(this._torrent_list).children().addClass('selected');
|
||||
this.callSelectionChangedSoon();
|
||||
},
|
||||
deselectAll: function() {
|
||||
$.each(this._rows, function(i,r) {r.setSelected(false);});
|
||||
$(this._torrent_list).children('.selected').removeClass('selected');
|
||||
this.callSelectionChangedSoon();
|
||||
delete this._last_torrent_clicked;
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue