diff options
author | Damien Churchill <damoxc@gmail.com> | 2011-10-03 21:58:16 +0100 |
---|---|---|
committer | Damien Churchill <damoxc@gmail.com> | 2011-10-05 01:36:57 +0100 |
commit | 08e774bbda0d15b04d26238277d07427e4ccca69 (patch) | |
tree | 561318a8fa77f4aaf0d8ac66eed0bb582a2e75ca | |
parent | 43cb787b444e62bae0f60284ce01b7afce50ba54 (diff) | |
download | deluge-08e774bbda0d15b04d26238277d07427e4ccca69.tar.gz deluge-08e774bbda0d15b04d26238277d07427e4ccca69.tar.bz2 deluge-08e774bbda0d15b04d26238277d07427e4ccca69.zip |
webui: fix displaying the torrent context menu
The event name and arguments has changed, as well as the response
from getPoint, nothing major.
-rw-r--r-- | deluge/ui/web/js/deluge-all/TorrentGrid.js | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/deluge/ui/web/js/deluge-all/TorrentGrid.js b/deluge/ui/web/js/deluge-all/TorrentGrid.js index f22286ace..2a468f0bc 100644 --- a/deluge/ui/web/js/deluge-all/TorrentGrid.js +++ b/deluge/ui/web/js/deluge-all/TorrentGrid.js @@ -256,14 +256,7 @@ Ext.define('Deluge.TorrentGrid', { deluge.events.on('torrentRemoved', this.onTorrentRemoved, this); deluge.events.on('disconnect', this.onDisconnect, this); - this.on('rowcontextmenu', function(grid, rowIndex, e) { - e.stopEvent(); - var selection = grid.getSelectionModel(); - if (!selection.hasSelection()) { - selection.selectRow(rowIndex); - } - deluge.menus.torrent.showAt(e.getPoint()); - }); + this.on('itemcontextmenu', this.onTorrentSelected, this); }, /** @@ -374,5 +367,15 @@ Ext.define('Deluge.TorrentGrid', { this.getStore().remove(record); delete this.torrents[torrentId]; }, this); + }, + + onTorrentSelected: function(grid, record, item, i, e, opts) { + e.stopEvent(); + var sm = grid.getSelectionModel(); + if (!sm.hasSelection()) { + sm.select(record); + } + var point = e.getPoint(); + deluge.menus.torrent.showAt(point.x, point.y); } }); |