fix the broken torrent menu and use icon classes rather than straight icon urls
This commit is contained in:
parent
eef9d8ec13
commit
04242ba91c
|
@ -282,3 +282,51 @@ dl.singleline dd {
|
||||||
.x-mixed-download {
|
.x-mixed-download {
|
||||||
/*background-image: url(/icons/mixed.png);*/
|
/*background-image: url(/icons/mixed.png);*/
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.icon-pause {
|
||||||
|
background-image: url('/icons/pause.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-resume {
|
||||||
|
background-image: url('/icons/start.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-options {
|
||||||
|
background-image: url('/icons/preferences.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-queue {
|
||||||
|
background-image: url('/icons/queue.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-top {
|
||||||
|
background-image: url('/icons/top.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-up {
|
||||||
|
background-image: url('/icons/up.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-down {
|
||||||
|
background-image: url('/icons/down.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-bottom {
|
||||||
|
background-image: url('/icons/bottom.png');
|
||||||
|
}
|
||||||
|
|
||||||
|
.icon-update-tracker {
|
||||||
|
background-image: url('/icons/update.png');
|
||||||
|
}
|
||||||
|
.icon-edit-trackers {
|
||||||
|
background-image: url('/icons/edit_trackers.png');
|
||||||
|
}
|
||||||
|
.icon-remove {
|
||||||
|
background-image: url('/icons/remove.png');
|
||||||
|
}
|
||||||
|
.icon-recheck {
|
||||||
|
background-image: url('/icons/recheck.png');
|
||||||
|
}
|
||||||
|
.icon-move {
|
||||||
|
background-image: url('/icons/move.png');
|
||||||
|
}
|
||||||
|
|
|
@ -39,11 +39,12 @@ Deluge.Menus = {
|
||||||
Ext.each(selection, function(record) {
|
Ext.each(selection, function(record) {
|
||||||
ids.push(record.id);
|
ids.push(record.id);
|
||||||
});
|
});
|
||||||
|
var action = item.initialConfig.torrentAction;
|
||||||
|
|
||||||
switch (item.id) {
|
switch (action) {
|
||||||
case 'pause':
|
case 'pause':
|
||||||
case 'resume':
|
case 'resume':
|
||||||
Deluge.Client.core[item.id + '_torrent'](ids, {
|
Deluge.Client.core[action + '_torrent'](ids, {
|
||||||
success: function() {
|
success: function() {
|
||||||
Deluge.UI.update();
|
Deluge.UI.update();
|
||||||
}
|
}
|
||||||
|
@ -53,7 +54,7 @@ Deluge.Menus = {
|
||||||
case 'up':
|
case 'up':
|
||||||
case 'down':
|
case 'down':
|
||||||
case 'bottom':
|
case 'bottom':
|
||||||
Deluge.Client.core['queue_' + item.id](ids, {
|
Deluge.Client.core['queue_' + action](ids, {
|
||||||
success: function() {
|
success: function() {
|
||||||
Deluge.UI.update();
|
Deluge.UI.update();
|
||||||
}
|
}
|
||||||
|
@ -89,21 +90,20 @@ Deluge.Menus = {
|
||||||
Deluge.Menus.Torrent = new Ext.menu.Menu({
|
Deluge.Menus.Torrent = new Ext.menu.Menu({
|
||||||
id: 'torrentMenu',
|
id: 'torrentMenu',
|
||||||
items: [{
|
items: [{
|
||||||
id: 'pause',
|
torrentAction: 'pause',
|
||||||
text: _('Pause'),
|
text: _('Pause'),
|
||||||
icon: '/icons/pause.png',
|
iconCls: 'icon-pause',
|
||||||
handler: Deluge.Menus.onTorrentAction,
|
handler: Deluge.Menus.onTorrentAction,
|
||||||
scope: Deluge.Menus
|
scope: Deluge.Menus
|
||||||
}, {
|
}, {
|
||||||
id: 'resume',
|
torrentAction: 'resume',
|
||||||
text: _('Resume'),
|
text: _('Resume'),
|
||||||
icon: '/icons/start.png',
|
iconCls: 'icon-resume',
|
||||||
handler: Deluge.Menus.onTorrentAction,
|
handler: Deluge.Menus.onTorrentAction,
|
||||||
scope: Deluge.Menus
|
scope: Deluge.Menus
|
||||||
}, '-', {
|
}, '-', {
|
||||||
id: 'options',
|
|
||||||
text: _('Options'),
|
text: _('Options'),
|
||||||
icon: '/icons/preferences.png',
|
iconCls: 'icon-options',
|
||||||
menu: new Ext.menu.Menu({
|
menu: new Ext.menu.Menu({
|
||||||
items: [{
|
items: [{
|
||||||
text: _('D/L Speed Limit'),
|
text: _('D/L Speed Limit'),
|
||||||
|
@ -185,62 +185,62 @@ Deluge.Menus.Torrent = new Ext.menu.Menu({
|
||||||
})
|
})
|
||||||
}, '-', {
|
}, '-', {
|
||||||
text: _('Queue'),
|
text: _('Queue'),
|
||||||
icon: '/icons/queue.png',
|
iconCls: 'icon-queue',
|
||||||
menu: new Ext.menu.Menu({
|
menu: new Ext.menu.Menu({
|
||||||
items: [{
|
items: [{
|
||||||
id: 'top',
|
torrentAction: 'top',
|
||||||
text: _('Top'),
|
text: _('Top'),
|
||||||
icon: '/icons/top.png',
|
iconCls: 'icon-top',
|
||||||
handler: Deluge.Menus.onTorrentAction,
|
handler: Deluge.Menus.onTorrentAction,
|
||||||
scope: Deluge.Menus
|
scope: Deluge.Menus
|
||||||
},{
|
},{
|
||||||
id: 'up',
|
torrentAction: 'up',
|
||||||
text: _('Up'),
|
text: _('Up'),
|
||||||
icon: '/icons/up.png',
|
iconCls: 'icon-up',
|
||||||
handler: Deluge.Menus.onTorrentAction,
|
handler: Deluge.Menus.onTorrentAction,
|
||||||
scope: Deluge.Menus
|
scope: Deluge.Menus
|
||||||
},{
|
},{
|
||||||
id: 'down',
|
torrentAction: 'down',
|
||||||
text: _('Down'),
|
text: _('Down'),
|
||||||
icon: '/icons/down.png',
|
iconCls: 'icon-down',
|
||||||
handler: Deluge.Menus.onTorrentAction,
|
handler: Deluge.Menus.onTorrentAction,
|
||||||
scope: Deluge.Menus
|
scope: Deluge.Menus
|
||||||
},{
|
},{
|
||||||
id: 'bottom',
|
torrentAction: 'bottom',
|
||||||
text: _('Bottom'),
|
text: _('Bottom'),
|
||||||
icon: '/icons/bottom.png',
|
iconCls: 'icon-bottom',
|
||||||
handler: Deluge.Menus.onTorrentAction,
|
handler: Deluge.Menus.onTorrentAction,
|
||||||
scope: Deluge.Menus
|
scope: Deluge.Menus
|
||||||
}]
|
}]
|
||||||
})
|
})
|
||||||
}, '-', {
|
}, '-', {
|
||||||
id: 'update',
|
torrentAction: 'update',
|
||||||
text: _('Update Tracker'),
|
text: _('Update Tracker'),
|
||||||
icon: '/icons/update.png',
|
iconCls: 'icon-update-tracker',
|
||||||
handler: Deluge.Menus.onTorrentAction,
|
handler: Deluge.Menus.onTorrentAction,
|
||||||
scope: Deluge.Menus
|
scope: Deluge.Menus
|
||||||
}, {
|
}, {
|
||||||
id: 'edit_trackers',
|
torrentAction: 'edit_trackers',
|
||||||
text: _('Edit Trackers'),
|
text: _('Edit Trackers'),
|
||||||
icon: '/icons/edit_trackers.png',
|
iconCls: 'icon-edit-trackers',
|
||||||
handler: Deluge.Menus.onTorrentAction,
|
handler: Deluge.Menus.onTorrentAction,
|
||||||
scope: Deluge.Menus
|
scope: Deluge.Menus
|
||||||
}, '-', {
|
}, '-', {
|
||||||
id: 'remove',
|
torrentAction: 'remove',
|
||||||
text: _('Remove Torrent'),
|
text: _('Remove Torrent'),
|
||||||
icon: '/icons/remove.png',
|
iconCls: 'icon-remove',
|
||||||
handler: Deluge.Menus.onTorrentAction,
|
handler: Deluge.Menus.onTorrentAction,
|
||||||
scope: Deluge.Menus
|
scope: Deluge.Menus
|
||||||
}, '-', {
|
}, '-', {
|
||||||
id: 'recheck',
|
torrentAction: 'recheck',
|
||||||
text: _('Force Recheck'),
|
text: _('Force Recheck'),
|
||||||
icon: '/icons/recheck.png',
|
iconCls: 'icon-recheck',
|
||||||
handler: Deluge.Menus.onTorrentAction,
|
handler: Deluge.Menus.onTorrentAction,
|
||||||
scope: Deluge.Menus
|
scope: Deluge.Menus
|
||||||
}, {
|
}, {
|
||||||
id: 'move',
|
torrentAction: 'move',
|
||||||
text: _('Move Storage'),
|
text: _('Move Storage'),
|
||||||
icon: '/icons/move.png',
|
iconCls: 'icon-move',
|
||||||
handler: Deluge.Menus.onTorrentAction,
|
handler: Deluge.Menus.onTorrentAction,
|
||||||
scope: Deluge.Menus
|
scope: Deluge.Menus
|
||||||
}]
|
}]
|
||||||
|
|
Loading…
Reference in New Issue