mirror of
https://github.com/codex-storage/deluge.git
synced 2025-02-25 09:35:16 +00:00
add a context menu for the files tree
This commit is contained in:
parent
63427a18cc
commit
8b76cd8a2a
BIN
deluge/ui/web/icons/expand_all.png
Normal file
BIN
deluge/ui/web/icons/expand_all.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 758 B |
@ -207,6 +207,12 @@ Deluge.Details.Files = {
|
||||
});
|
||||
},
|
||||
|
||||
onContextMenu: function(node, e) {
|
||||
e.stopEvent();
|
||||
node.select();
|
||||
Deluge.Menus.FilePriorities.showAt(e.getPoint());
|
||||
},
|
||||
|
||||
onRequestComplete: function(files, torrentId) {
|
||||
if (this.torrentId != torrentId) {
|
||||
this.clear();
|
||||
@ -390,7 +396,16 @@ Deluge.Details.Panel = new Ext.TabPanel({
|
||||
root: new Ext.tree.TreeNode({
|
||||
text: 'Files'
|
||||
}),
|
||||
listeners: {'render': {fn: Deluge.Details.Files.onRender, scope: Deluge.Details.Files}}
|
||||
listeners: {
|
||||
'render': {
|
||||
fn: Deluge.Details.Files.onRender,
|
||||
scope: Deluge.Details.Files
|
||||
},
|
||||
'contextmenu': {
|
||||
fn: Deluge.Details.Files.onContextMenu,
|
||||
scope: Deluge.Details.Files
|
||||
}
|
||||
}
|
||||
}), new Ext.grid.GridPanel({
|
||||
id: 'peers',
|
||||
title: _('Peers'),
|
||||
|
@ -374,6 +374,31 @@ Deluge.Menus.Upload = new Ext.menu.Menu({
|
||||
}]
|
||||
});
|
||||
|
||||
Deluge.Menus.FilePriorities = new Ext.menu.Menu({
|
||||
id: 'filePrioritiesMenu',
|
||||
items: [{
|
||||
id: 'expandAll',
|
||||
text: _('Expand All'),
|
||||
icon: '/icons/expand_all.png'
|
||||
}, '-', {
|
||||
id: 'no_download',
|
||||
text: _('Do Not Download'),
|
||||
icon: '/icons/no_download.png'
|
||||
}, {
|
||||
id: 'normal',
|
||||
text: _('Normal Priority'),
|
||||
icon: '/icons/normal.png'
|
||||
}, {
|
||||
id: 'high',
|
||||
text: _('High Priority'),
|
||||
icon: '/icons/high.png'
|
||||
}, {
|
||||
id: 'highest',
|
||||
text: _('Highest Priority'),
|
||||
icon: '/icons/highest.png'
|
||||
}]
|
||||
});
|
||||
|
||||
function onLimitChanged(item, checked) {
|
||||
if (item.id == "other") {
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user