Browse Source

- Hide priority column in Web UI when queueing is disabled

adaptive-webui-19844
Christophe Dumez 16 years ago
parent
commit
afbfe1a96d
  1. 1
      Changelog
  2. 2
      src/webui/index.html
  3. 7
      src/webui/scripts/client.js
  4. 23
      src/webui/scripts/dynamicTable.js

1
Changelog

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

2
src/webui/index.html

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

7
src/webui/scripts/client.js

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

23
src/webui/scripts/dynamicTable.js

@ -40,6 +40,7 @@ var dynamicTable = new Class ({
this.table = $(table); this.table = $(table);
this.rows = new Object(); this.rows = new Object();
this.cur = new Array(); this.cur = new Array();
this.priority_hidden = false;
}, },
altRow: function() altRow: function()
@ -54,6 +55,28 @@ var dynamicTable = new Class ({
}.bind(this)); }.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){ insertRow: function(id, row){
var tr = this.rows[id]; var tr = this.rows[id];
if($defined(tr)) if($defined(tr))

Loading…
Cancel
Save