From a6a2ee5b6b1ff036c5dcedaff50faf48df6d95e2 Mon Sep 17 00:00:00 2001 From: ed Date: Tue, 3 Dec 2024 21:06:00 +0000 Subject: [PATCH] sort on filename should forget other sorts filenames are unique per folder; remembering other keys is pointless --- copyparty/web/util.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/copyparty/web/util.js b/copyparty/web/util.js index 3be39d7f..ca9a9aa2 100644 --- a/copyparty/web/util.js +++ b/copyparty/web/util.js @@ -617,10 +617,13 @@ function sortTable(table, col, cb) { tr = Array.prototype.slice.call(tb.rows, 0), i, reverse = /s0[^r]/.exec(th[col].className + ' ') ? -1 : 1; - var stype = th[col].getAttribute('sort'); + var kname = th[col].getAttribute('name'), + stype = th[col].getAttribute('sort'); try { - var nrules = [], rules = jread("fsort", []); - rules.unshift([th[col].getAttribute('name'), reverse, stype || '']); + var nrules = [], + rules = kname == 'href' ? [] : jread("fsort", []); + + rules.unshift([kname, reverse, stype || '']); for (var a = 0; a < rules.length; a++) { var add = true; for (var b = 0; b < a; b++)