Changeset 12806


Ignore:
Timestamp:
Aug 30, 2011, 9:31:10 PM (10 years ago)
Author:
jordan
Message:

setSelectedRow(), selectRow(), deselectRow(), selectAll(), deselectAll() -- use jQuery selectors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web/javascript/transmission.js

    r12805 r12806  
    391391
    392392        setSelectedRow: function(row) {
    393                 $.each(this.getSelectedRows(),function(i,r) {r.setSelected(false);});
     393                $(this._torrent_list).children('.selected').removeClass('selected');
    394394                this.selectRow(row);
    395395        },
    396396
    397397        selectRow: function(row) {
    398                 row.setSelected(true);
     398                $(row.getElement()).addClass('selected');
    399399                this.callSelectionChangedSoon();
    400400        },
    401401
    402402        deselectRow: function(row) {
    403                 row.setSelected(false);
     403                $(row.getElement()).removeClass('selected');
    404404                this.callSelectionChangedSoon();
    405405        },
    406406
    407407        selectAll: function() {
    408                 $.each(this._rows, function(i,r) {r.setSelected(true);});
     408                $(this._torrent_list).children().addClass('selected');
    409409                this.callSelectionChangedSoon();
    410410        },
    411411        deselectAll: function() {
    412                 $.each(this._rows, function(i,r) {r.setSelected(false);});
     412                $(this._torrent_list).children('.selected').removeClass('selected');
    413413                this.callSelectionChangedSoon();
    414414                delete this._last_torrent_clicked;
Note: See TracChangeset for help on using the changeset viewer.