mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-10 14:57:52 +00:00
Added priority actions to Web UI right-click menu
This commit is contained in:
parent
b2f98bd059
commit
fefda39284
BIN
src/Icons/skin/arrow-right.gif
Normal file
BIN
src/Icons/skin/arrow-right.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 54 B |
@ -49,6 +49,7 @@
|
|||||||
<file>Icons/skin/queued.png</file>
|
<file>Icons/skin/queued.png</file>
|
||||||
<file>Icons/skin/checking.png</file>
|
<file>Icons/skin/checking.png</file>
|
||||||
<file>Icons/skin/handle-icon.gif</file>
|
<file>Icons/skin/handle-icon.gif</file>
|
||||||
|
<file>Icons/skin/arrow-right.gif</file>
|
||||||
<file>Icons/skin/filterinactive.png</file>
|
<file>Icons/skin/filterinactive.png</file>
|
||||||
<file>Icons/skin/decrease.png</file>
|
<file>Icons/skin/decrease.png</file>
|
||||||
<file>Icons/skin/play22.png</file>
|
<file>Icons/skin/play22.png</file>
|
||||||
|
@ -161,13 +161,39 @@ a.propButton img {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* context menu specific */
|
/* context menu specific */
|
||||||
#contextmenu { border:1px solid #999; padding:0; background:#eee; list-style-type:none; display:none; }
|
#contextmenu { border:1px solid #999; padding:0; background:#eee; list-style-type:none; display:none; width: 164px;}
|
||||||
#contextmenu .separator { border-top:1px solid #999; }
|
#contextmenu .separator { border-top:1px solid #999; }
|
||||||
#contextmenu li { margin:0; padding:0; }
|
#contextmenu li { margin:0; padding:0;}
|
||||||
#contextmenu li a { display:block; padding:5px 10px 5px 35px; font-size:12px; text-decoration:none; font-family:tahoma,arial,sans-serif; color:#000; background-position:8px 2px; background-repeat:no-repeat; }
|
#contextmenu li a { display:block; padding:5px 10px 5px 35px; font-size:12px; text-decoration:none; font-family:tahoma,arial,sans-serif; color:#000; background-position:8px 2px; background-repeat:no-repeat; }
|
||||||
#contextmenu li a:hover { background-color:#ddd; }
|
#contextmenu li a:hover { background-color:#ddd; }
|
||||||
#contextmenu li a.disabled { color:#ccc; font-style:italic; }
|
#contextmenu li a.disabled { color:#ccc; font-style:italic; }
|
||||||
#contextmenu li a.disabled:hover { background-color:#eee; }
|
#contextmenu li a.disabled:hover { background-color:#eee; }
|
||||||
|
#contextmenu li ul {
|
||||||
|
padding: 0;
|
||||||
|
border:1px solid #999; padding:0; background:#eee;
|
||||||
|
list-style-type:none;
|
||||||
|
position: absolute;
|
||||||
|
left: -999em;
|
||||||
|
z-index: 8000;
|
||||||
|
margin: -29px 0 0 164px;
|
||||||
|
width: 164px;
|
||||||
|
}
|
||||||
|
#contextmenu li ul li a {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
#contextmenu li a.arrow-right, #contextmenu li a:hover.arrow-right {
|
||||||
|
background-image: url(../images/skin/arrow-right.gif);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: right center;
|
||||||
|
}
|
||||||
|
#contextmenu li:hover ul,
|
||||||
|
#contextmenu li.ieHover ul,
|
||||||
|
#contextmenu li li.ieHover ul,
|
||||||
|
#contextmenu li li li.ieHover ul,
|
||||||
|
#contextmenu li li:hover ul,
|
||||||
|
#contextmenu li li li:hover ul { /* lists nested under hovered list items */
|
||||||
|
left: auto;
|
||||||
|
}
|
||||||
|
|
||||||
/* context menu items */
|
/* context menu items */
|
||||||
#contextmenu li a.pause { background-image:url(../images/skin/pause22.png); }
|
#contextmenu li a.pause { background-image:url(../images/skin/pause22.png); }
|
||||||
@ -177,6 +203,10 @@ a.propButton img {
|
|||||||
#contextmenu li a.deleteHD { background-image:url(../images/skin/delete_perm22.png); }
|
#contextmenu li a.deleteHD { background-image:url(../images/skin/delete_perm22.png); }
|
||||||
#contextmenu li a.uploadLimit { background-image:url(../images/skin/seeding.png); }
|
#contextmenu li a.uploadLimit { background-image:url(../images/skin/seeding.png); }
|
||||||
#contextmenu li a.downloadLimit { background-image:url(../images/skin/download.png); }
|
#contextmenu li a.downloadLimit { background-image:url(../images/skin/download.png); }
|
||||||
|
#contextmenu li a.prioTop { background-image:url(../images/oxygen/go-top.png); }
|
||||||
|
#contextmenu li a.prioUp { background-image:url(../images/oxygen/go-up.png); }
|
||||||
|
#contextmenu li a.prioDown { background-image:url(../images/oxygen/go-down.png); }
|
||||||
|
#contextmenu li a.prioBottom { background-image:url(../images/oxygen/go-bottom.png); }
|
||||||
|
|
||||||
/* Sliders */
|
/* Sliders */
|
||||||
|
|
||||||
|
@ -93,6 +93,14 @@
|
|||||||
<li><a href="#Pause" class="pause">_(Pause)</a></li>
|
<li><a href="#Pause" class="pause">_(Pause)</a></li>
|
||||||
<li class="separator"><a href="#Delete" class="delete">_(Delete)</a></li>
|
<li class="separator"><a href="#Delete" class="delete">_(Delete)</a></li>
|
||||||
<li><a href="#DeleteHD" class="deleteHD">_(Delete from HD)</a></li>
|
<li><a href="#DeleteHD" class="deleteHD">_(Delete from HD)</a></li>
|
||||||
|
<li class="separator"><a href="#priority" class="priority arrow-right">_(Priority)</a>
|
||||||
|
<ul>
|
||||||
|
<li><a href="#prioTop" class="prioTop">_(Move to top)</a></li>
|
||||||
|
<li><a href="#prioUp" class="prioUp">_(Move up)</a></li>
|
||||||
|
<li><a href="#prioDown" class="prioDown">_(Move down)</a></li>
|
||||||
|
<li><a href="#prioBottom" class="prioBottom">_(Move to bottom)</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
<li class="separator"><a href="#DownloadLimit" class="downloadLimit">_(Limit download rate)</a></li>
|
<li class="separator"><a href="#DownloadLimit" class="downloadLimit">_(Limit download rate)</a></li>
|
||||||
<li><a href="#UploadLimit" class="uploadLimit">_(Limit upload rate)</a></li>
|
<li><a href="#UploadLimit" class="uploadLimit">_(Limit upload rate)</a></li>
|
||||||
<li class="separator"><a href="#ForceRecheck" class="recheck">_(Force recheck)</a></li>
|
<li class="separator"><a href="#ForceRecheck" class="recheck">_(Force recheck)</a></li>
|
||||||
|
@ -204,7 +204,7 @@ initializeWindows = function(){
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
['pause','resume','decreasePrio','increasePrio','recheck'].each(function(item) {
|
['pause','resume','decreasePrio','increasePrio', 'topPrio', 'bottomPrio', 'recheck'].each(function(item) {
|
||||||
addClickEvent(item, function(e){
|
addClickEvent(item, function(e){
|
||||||
new Event(e).stop();
|
new Event(e).stop();
|
||||||
var h = myTable.selectedIds();
|
var h = myTable.selectedIds();
|
||||||
@ -221,7 +221,14 @@ initializeWindows = function(){
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
setPriorityFN = function(cmd) {
|
||||||
|
var h = myTable.selectedIds();
|
||||||
|
if(h.length){
|
||||||
|
h.each(function(hash, index){
|
||||||
|
new Request({url: '/command/'+cmd, method: 'post', data: {hash: hash}}).send();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
addClickEvent('bug', function(e){
|
addClickEvent('bug', function(e){
|
||||||
new Event(e).stop();
|
new Event(e).stop();
|
||||||
|
@ -37,6 +37,18 @@
|
|||||||
Pause: function(element, ref) {
|
Pause: function(element, ref) {
|
||||||
pauseFN();
|
pauseFN();
|
||||||
},
|
},
|
||||||
|
prioTop: function(element, ref) {
|
||||||
|
setPriorityFN('topPrio');
|
||||||
|
},
|
||||||
|
prioUp: function(element, ref) {
|
||||||
|
setPriorityFN('increasePrio');
|
||||||
|
},
|
||||||
|
prioDown: function(element, ref) {
|
||||||
|
setPriorityFN('decreasePrio');
|
||||||
|
},
|
||||||
|
prioBottom: function(element, ref) {
|
||||||
|
setPriorityFN('bottomPrio');
|
||||||
|
},
|
||||||
ForceRecheck: function(element, ref) {
|
ForceRecheck: function(element, ref) {
|
||||||
recheckFN();
|
recheckFN();
|
||||||
},
|
},
|
||||||
@ -52,4 +64,4 @@
|
|||||||
|
|
||||||
myTable.setup('myTable', 4, context_menu);
|
myTable.setup('myTable', 4, context_menu);
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
Loading…
Reference in New Issue
Block a user