- Hide priority column in Web UI when queueing is disabled

This commit is contained in:
Christophe Dumez 2008-12-29 23:04:45 +00:00
parent 2651ec5f0b
commit afbfe1a96d
4 changed files with 30 additions and 3 deletions

View file

@ -14,6 +14,7 @@
- FEATURE: Added notification in WebUI when qBittorrent is not reachable
- FEATURE: Rewrote folder scanning code (Now uses a filesystem watcher)
- FEATURE: Added torrent deletion from hard drive function in Web UI
- FEATURE: Added queueing priority actions in Web UI
- BUGFIX: Made usage of fastresume data more reliable
- BUGFIX: qBittorrent shutdown is now faster
- BUGFIX: Fixed several memory leaks

View file

@ -86,7 +86,7 @@
<th>Progress</th>
<th>DL Speed</th>
<th>UP Speed</th>
<th>Priority</th>
<th id='prioHeader'>Priority</th>
</tr>
</thead>
<tbody id="myTable"></tbody>

View file

@ -153,10 +153,13 @@ window.addEvent('domready', function(){
myTableUP.removeRow(hash);
}
});
if(queueing_enabled)
if(queueing_enabled) {
$('queueingButtons').removeClass('invisible');
else
myTable.showPriority();
} else {
$('queueingButtons').addClass('invisible');
myTable.hidePriority();
}
}
waiting=false;
ajaxfn.delay(1000);

View file

@ -40,6 +40,7 @@ var dynamicTable = new Class ({
this.table = $(table);
this.rows = new Object();
this.cur = new Array();
this.priority_hidden = false;
},
altRow: function()
@ -54,6 +55,28 @@ var dynamicTable = new Class ({
}.bind(this));
},
hidePriority: function(){
if(this.priority_hidden) return;
$('prioHeader').addClass('invisible');
var trs = this.table.getElements('tr');
trs.each(function(tr,i){
var tds = tr.getElements('td');
tds.getLast().addClass('invisible');
}.bind(this));
this.priority_hidden = true;
},
showPriority: function(){
if(!this.priority_hidden) return;
$('prioHeader').removeClass('invisible');
var trs = this.table.getElements('tr');
trs.each(function(tr,i){
var tds = tr.getElements('td');
tds.getLast().removeClass('invisible');
}.bind(this));
this.priority_hidden = false;
},
insertRow: function(id, row){
var tr = this.rows[id];
if($defined(tr))