mirror of
https://github.com/transmission/transmission.git
synced 2026-04-17 23:54:19 +01:00
setSelectedRow(), selectRow(), deselectRow(), selectAll(), deselectAll() -- use jQuery selectors
This commit is contained in:
@@ -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;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user