Changeset 12816
- Timestamp:
- Aug 31, 2011, 4:39:24 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/web/javascript/transmission.js
r12813 r12816 1097 1097 onRowClicked: function(ev, row) 1098 1098 { 1099 // handle the per-row "torrent_resume" button 1100 if (ev.target.className === 'torrent_resume') { 1101 this.startTorrent(row.getTorrent()); 1102 return; 1103 } 1104 1105 // handle the per-row "torrent_pause" button 1106 if (ev.target.className === 'torrent_pause') { 1107 this.stopTorrent(row.getTorrent()); 1108 return; 1109 } 1110 1099 1111 // Prevents click carrying to parent element 1100 1112 // which deselects all on click … … 1342 1354 **** 1343 1355 ***/ 1344 1345 onToggleRunningClicked: function(ev)1346 {1347 var t, i, e;1348 e = $(ev.target).closest('.torrent')[0];1349 i = $('#torrent_list > li').index(e);1350 if ((0<=i) && (i<this._rows.length)) {1351 t = this._rows[i].getTorrent();1352 if (t.isStopped())1353 this.startTorrent(t);1354 else1355 this.stopTorrent(t);1356 }1357 },1358 1356 1359 1357 setEnabled: function(key, flag) … … 1927 1925 refilterSoon: function() 1928 1926 { 1929 if (!this.refilterTimer) 1930 this.refilterTimer = setTimeout($.proxy(this.refilter,this), 100); 1927 if (!this.refilterTimer) { 1928 var tr = this; 1929 this.refilterTimer = setTimeout(function(){tr.refilter(false);}, 100); 1930 } 1931 1931 }, 1932 1932 … … 2009 2009 row.getElement().row = row; 2010 2010 dirty_rows.push(row); 2011 if ((e = row.getToggleRunningButton()))2012 $(e).click($.proxy(this.onToggleRunningClicked,this));2013 2011 } 2014 2012 }
Note: See TracChangeset
for help on using the changeset viewer.