Changeset 12811


Ignore:
Timestamp:
Aug 31, 2011, 1:12:04 AM (12 years ago)
Author:
jordan
Message:

(trunk web) #4452 "Pause / Resume buttons to the right of all torrents are nonfunctional" -- fixed.

File:
1 edited

Legend:

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

    r12809 r12811  
    13381338        onToggleRunningClicked: function(ev)
    13391339        {
    1340                 var torrent = ev.data.r.getTorrent();
    1341 
    1342                 if (torrent.isStopped())
    1343                         this.startTorrent(torrent);
    1344                 else
    1345                         this.stopTorrent(torrent);
     1340                var t, i, e;
     1341                e = $(ev.target).closest('.torrent')[0];
     1342                i = $('#torrent_list > li').index(e);
     1343                if ((0<=i) && (i<this._rows.length)) {
     1344                        t = this._rows[i].getTorrent();
     1345                        if (t.isStopped())
     1346                                this.startTorrent(t);
     1347                        else
     1348                                this.stopTorrent(t);
     1349                }
    13461350        },
    13471351
     
    19982002                                row.getElement().row = row;
    19992003                                dirty_rows.push(row);
     2004                                if ((e = row.getToggleRunningButton()))
     2005                                        $(e).click($.proxy(this.onToggleRunningClicked,this));
    20002006                        }
    20012007                }
Note: See TracChangeset for help on using the changeset viewer.