mirror of
https://github.com/transmission/transmission
synced 2025-02-20 21:26:53 +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'),
|
boundingElement: $('div#torrent_container'),
|
||||||
boundingRightPad: 20,
|
boundingRightPad: 20,
|
||||||
boundingBottomPad: 5,
|
boundingBottomPad: 5,
|
||||||
onContextMenu: function(e) {
|
onContextMenu: function(ev) {
|
||||||
var closest_row = $(e.target).closest('.torrent')[0];
|
var element = $(ev.target).closest('.torrent')[0];
|
||||||
for (var i=0, row; row = tr._rows[i]; ++i) {
|
var i = $('#torrent_list > li').index(element);
|
||||||
if (row.getElement() === closest_row) {
|
if ((i!==-1) && !tr._rows[i].isSelected())
|
||||||
tr.setSelectedRow(row);
|
tr.setSelectedRow(tr._rows[i]);
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue