1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-11 07:18:08 +00:00

Support sorting Web UI tables via touch (#15205)

This commit is contained in:
Tom Piccirello 2021-07-18 23:28:04 -07:00 committed by GitHub
parent ed4570cb4d
commit 7974b5a95c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -264,12 +264,19 @@ window.qBittorrent.DynamicTable = (function() {
this.setSortedColumn(el.columnName);
}.bind(this);
const onTouch = function(e) {
const column = e.target.columnName;
this.currentHeaderAction = '';
this.setSortedColumn(column);
}.bind(this);
const ths = this.fixedTableHeader.getElements('th');
for (let i = 0; i < ths.length; ++i) {
const th = ths[i];
th.addEvent('mousemove', mouseMoveFn);
th.addEvent('mouseout', mouseOutFn);
th.addEvent('touchend', onTouch);
th.makeResizable({
modifiers: {
x: '',