mirror of
https://github.com/transmission/transmission
synced 2025-02-19 04:41:11 +00:00
#4455 'Action on N>1 torrents doesn't work properly in web interface' -- when right-clicking in the torrent list, don't change the selection if the row we're hovering over is already selected.
This commit is contained in:
parent
92babd4141
commit
2ef53ca5dd
1 changed files with 5 additions and 8 deletions
|
@ -289,14 +289,11 @@ Transmission.prototype =
|
|||
boundingElement: $('div#torrent_container'),
|
||||
boundingRightPad: 20,
|
||||
boundingBottomPad: 5,
|
||||
onContextMenu: function(e) {
|
||||
var closest_row = $(e.target).closest('.torrent')[0];
|
||||
for (var i=0, row; row = tr._rows[i]; ++i) {
|
||||
if (row.getElement() === closest_row) {
|
||||
tr.setSelectedRow(row);
|
||||
break;
|
||||
}
|
||||
}
|
||||
onContextMenu: function(ev) {
|
||||
var element = $(ev.target).closest('.torrent')[0];
|
||||
var i = $('#torrent_list > li').index(element);
|
||||
if ((i!==-1) && !tr._rows[i].isSelected())
|
||||
tr.setSelectedRow(tr._rows[i]);
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue