webui: fix displaying the torrent context menu
The event name and arguments has changed, as well as the response from getPoint, nothing major.
This commit is contained in:
parent
43cb787b44
commit
08e774bbda
|
@ -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);
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue