From dbe2aec79c139815a416efc6f623422c795c054b Mon Sep 17 00:00:00 2001 From: ed Date: Sat, 3 Dec 2022 20:48:52 +0000 Subject: [PATCH] v1.5.1 --- copyparty/__version__.py | 2 +- copyparty/web/browser.js | 18 ++++++++++-------- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/copyparty/__version__.py b/copyparty/__version__.py index 9469a003..76093978 100644 --- a/copyparty/__version__.py +++ b/copyparty/__version__.py @@ -1,6 +1,6 @@ # coding: utf-8 -VERSION = (1, 5, 0) +VERSION = (1, 5, 1) CODENAME = "babel" BUILD_DT = (2022, 12, 3) diff --git a/copyparty/web/browser.js b/copyparty/web/browser.js index a6494c8b..966bb076 100644 --- a/copyparty/web/browser.js +++ b/copyparty/web/browser.js @@ -6748,14 +6748,16 @@ var unpost = (function () { n2 = parseInt(tgt.getAttribute('n2') || n + 1), req = []; - for (var a = n; a < n2; a++) - if (QS('#op_unpost a.n' + a)) - req.push(uricom_dec(r.files[a].vp.split('?')[0])); + for (var a = n; a < n2; a++) { + var links = QSA('#op_unpost a.n' + a); + if (!links.length) + continue; - var links = QSA('#op_unpost a.n' + n); - for (var a = 0, aa = links.length; a < aa; a++) { - links[a].removeAttribute('href'); - links[a].innerHTML = '[busy]'; + req.push(uricom_dec(r.files[a].vp.split('?')[0])); + for (var b = 0; b < links.length; b++) { + links[b].removeAttribute('href'); + links[b].innerHTML = '[busy]'; + } } toast.show('inf r', 0, L.un_busy.format(req.length)); @@ -6763,7 +6765,7 @@ var unpost = (function () { var xhr = new XHR(); xhr.n = n; xhr.n2 = n2; - xhr.open('POST', '/?delete&lim=' + links.length, true); + xhr.open('POST', '/?delete&lim=' + req.length, true); xhr.onload = xhr.onerror = unpost_delete_cb; xhr.send(JSON.stringify(req)); };