mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-07 05:31:25 -07:00
WebUI: Improve sort order in Status column
This commit adds custom compare function to Status column (same sort order as in the GUI). Closes #15499. PR #21570.
This commit is contained in:
parent
8e941a06f1
commit
7031c52d16
2 changed files with 31 additions and 2 deletions
|
@ -1102,6 +1102,10 @@ window.qBittorrent.DynamicTable ??= (() => {
|
|||
td.title = status;
|
||||
};
|
||||
|
||||
this.columns["status"].compareRows = function(row1, row2) {
|
||||
return compareNumbers(row1.full_data._statusOrder, row2.full_data._statusOrder);
|
||||
};
|
||||
|
||||
// priority
|
||||
this.columns["priority"].updateTd = function(td, row) {
|
||||
const queuePos = this.getRowValue(row);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue