mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-10 14:57:52 +00:00
- Fixed shift selection from bottom to top (Web UI)
- Fixed bug where current selection was not cleared correctly (Web Ui) - Allow to select all torrents using CRTL+A (Web Ui)
This commit is contained in:
parent
fec1de6383
commit
f73256e0ea
1
TODO
1
TODO
@ -4,3 +4,4 @@ See https://blueprints.launchpad.net/qbittorrent/
|
|||||||
- french
|
- french
|
||||||
- chinese traditional
|
- chinese traditional
|
||||||
- chinese simplified
|
- chinese simplified
|
||||||
|
- finish
|
||||||
|
@ -147,3 +147,13 @@ window.addEvent('domready', function(){
|
|||||||
ajaxfn();
|
ajaxfn();
|
||||||
// ajaxfn.periodical(5000);
|
// ajaxfn.periodical(5000);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
window.addEvent('keydown', function(event){
|
||||||
|
if (event.key == 'a' && event.control) {
|
||||||
|
if($("Tab1").hasClass('active')) {
|
||||||
|
myTable.selectAll();
|
||||||
|
} else {
|
||||||
|
myTableUP.selectAll();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
@ -106,6 +106,12 @@ var dynamicTable = new Class ({
|
|||||||
ids = this.getRowIds();
|
ids = this.getRowIds();
|
||||||
beginIndex = ids.indexOf(this.cur[0]);
|
beginIndex = ids.indexOf(this.cur[0]);
|
||||||
endIndex = ids.indexOf(id);
|
endIndex = ids.indexOf(id);
|
||||||
|
if(beginIndex > endIndex) {
|
||||||
|
// Backward shift
|
||||||
|
tmp = beginIndex;
|
||||||
|
beginIndex = endIndex-1;
|
||||||
|
endIndex = tmp-1;
|
||||||
|
}
|
||||||
for(i=beginIndex+1; i<(endIndex+1); i++) {
|
for(i=beginIndex+1; i<(endIndex+1); i++) {
|
||||||
curID = ids[i];
|
curID = ids[i];
|
||||||
this.cur[this.cur.length] = curID;
|
this.cur[this.cur.length] = curID;
|
||||||
@ -124,6 +130,7 @@ var dynamicTable = new Class ({
|
|||||||
temptr.removeClass(this.options.selectCls);
|
temptr.removeClass(this.options.selectCls);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
this.cur.empty();
|
||||||
// Add selected style to new one
|
// Add selected style to new one
|
||||||
temptr = this.rows[id];
|
temptr = this.rows[id];
|
||||||
if(temptr){
|
if(temptr){
|
||||||
@ -137,6 +144,19 @@ var dynamicTable = new Class ({
|
|||||||
tr.injectInside(this.table);
|
tr.injectInside(this.table);
|
||||||
this.altRow();
|
this.altRow();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
selectAll: function() {
|
||||||
|
this.cur.empty();
|
||||||
|
for (var id in this.rows) {
|
||||||
|
this.cur[this.cur.length] = id;
|
||||||
|
temptr = this.rows[id];
|
||||||
|
if(temptr){
|
||||||
|
if(!temptr.hasClass(this.options.selectCls)) {
|
||||||
|
temptr.addClass(this.options.selectCls);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
updateRow: function(id, row){
|
updateRow: function(id, row){
|
||||||
var tr = this.rows[id];
|
var tr = this.rows[id];
|
||||||
|
Loading…
Reference in New Issue
Block a user