mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-31 20:58:07 -06:00
- Added priority actions in Web UI
This commit is contained in:
@@ -20,6 +20,10 @@ body {
|
||||
width: 300px;
|
||||
}
|
||||
|
||||
.invisible {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Typography */
|
||||
|
||||
h2, h3, h4 {
|
||||
|
||||
@@ -64,6 +64,10 @@
|
||||
<a id="pauseButton"><img class="mochaToolButton" title="Pause" src="images/skin/pause.png"/></a>
|
||||
<a id="resumeAllButton"><img class="mochaToolButton" title="Resume all" src="images/skin/play_all.png"/></a>
|
||||
<a id="pauseAllButton"><img class="mochaToolButton" title="Pause All" src="images/skin/pause_all.png"/></a>
|
||||
<span id="queueingButtons">
|
||||
<a id="decreasePrioButton"><img class="mochaToolButton" title="Decrease priority" src="images/skin/decrease.png"/></a>
|
||||
<a id="increasePrioButton"><img class="mochaToolButton" title="Increase priority" src="images/skin/increase.png"/></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div id="pageWrapper"> <span id="error_div"></span>
|
||||
@@ -82,6 +86,7 @@
|
||||
<th>Progress</th>
|
||||
<th>DL Speed</th>
|
||||
<th>UP Speed</th>
|
||||
<th>Priority</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="myTable"></tbody>
|
||||
|
||||
@@ -72,6 +72,7 @@ window.addEvent('domready', function(){
|
||||
return round1(val) + ' TiB';
|
||||
};
|
||||
var ajaxfn = function(){
|
||||
var queueing_enabled = false;
|
||||
var url = 'json/events';
|
||||
if (!waiting){
|
||||
waiting=true;
|
||||
@@ -122,6 +123,9 @@ window.addEvent('domready', function(){
|
||||
row[3] = round1(event.progress*100) + ' %';
|
||||
row[4] = fspeed(event.dlspeed);
|
||||
row[5] = fspeed(event.upspeed);
|
||||
row[6] = event.priority
|
||||
if(row[6] != -1)
|
||||
queueing_enabled = true;
|
||||
if(!unfinished_hashes.contains(event.hash)) {
|
||||
// New unfinished torrent
|
||||
unfinished_hashes[unfinished_hashes.length] = event.hash;
|
||||
@@ -149,6 +153,10 @@ window.addEvent('domready', function(){
|
||||
myTableUP.removeRow(hash);
|
||||
}
|
||||
});
|
||||
if(queueing_enabled)
|
||||
$('queueingButtons').removeClass('invisible');
|
||||
else
|
||||
$('queueingButtons').addClass('invisible');
|
||||
}
|
||||
waiting=false;
|
||||
ajaxfn.delay(1000);
|
||||
|
||||
@@ -82,12 +82,14 @@ initializeWindows = function(){
|
||||
}
|
||||
});
|
||||
|
||||
['pause','resume'].each(function(item) {
|
||||
['pause','resume','decreasePrio','increasePrio'].each(function(item) {
|
||||
addClickEvent(item, function(e){
|
||||
new Event(e).stop();
|
||||
if($("Tab1").hasClass('active')) {
|
||||
var h = myTable.selectedIds();
|
||||
} else {
|
||||
if(item=='decreasePrio' || item=='increasePrio')
|
||||
return;
|
||||
var h = myTableUP.selectedIds();
|
||||
}
|
||||
if(h.length){
|
||||
|
||||
Reference in New Issue
Block a user