From a9b6fe1df950f51777c7bed029c21f97d2dbeabf Mon Sep 17 00:00:00 2001 From: ffont Date: Thu, 26 Oct 2023 10:32:58 +0200 Subject: [PATCH 1/2] Invert ticket selection logic --- freesound/static/bw-frontend/src/pages/moderation.js | 2 +- templates_bw/moderation/assigned.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/freesound/static/bw-frontend/src/pages/moderation.js b/freesound/static/bw-frontend/src/pages/moderation.js index 818077a51..a22f4095c 100644 --- a/freesound/static/bw-frontend/src/pages/moderation.js +++ b/freesound/static/bw-frontend/src/pages/moderation.js @@ -144,7 +144,7 @@ ticketCheckboxes.forEach(checkbox => { // NOTE: the 'change' event is triggered when the checkbox is clicked by the user, but not when programatically setting .checked to true/false checkbox.addEventListener('change', () => { - if (checkbox.dataset.altKey === "true") { + if (checkbox.dataset.altKey !== "true" && checkbox.dataset.shiftKey !== "true") { // Unselect all other checkboxes ticketCheckboxes.forEach(otherCheckbox => { if (otherCheckbox !== checkbox) { diff --git a/templates_bw/moderation/assigned.html b/templates_bw/moderation/assigned.html index 9c8a74b81..62b25e886 100644 --- a/templates_bw/moderation/assigned.html +++ b/templates_bw/moderation/assigned.html @@ -66,7 +66,7 @@
No sound tickets in your queue... 😟
- You can do alt+click on a row to select only this row + You can do alt+click on a row to select multiple rows
You can do shift+click on a row to select all the rows since the last previously selected row
From 32cd416e2f4b7c33568c15f67c227da2d197a8a8 Mon Sep 17 00:00:00 2001 From: ffont Date: Thu, 26 Oct 2023 11:11:59 +0200 Subject: [PATCH 2/2] Improve scrolling behaviour in moderation --- templates_bw/moderation/assigned.html | 52 ++++++++++++++------------- templates_bw/molecules/footer.html | 12 +++---- 2 files changed, 31 insertions(+), 33 deletions(-) diff --git a/templates_bw/moderation/assigned.html b/templates_bw/moderation/assigned.html index 62b25e886..44d2e372f 100644 --- a/templates_bw/moderation/assigned.html +++ b/templates_bw/moderation/assigned.html @@ -29,7 +29,7 @@
No sound tickets in your queue... 😟
Stop all sounds -
+
{% for ticket in page.object_list %} {% if ticket.sound %} @@ -74,30 +74,32 @@
No sound tickets in your queue... 😟
-
diff --git a/templates_bw/molecules/footer.html b/templates_bw/molecules/footer.html index 37b80a71f..903dfedeb 100644 --- a/templates_bw/molecules/footer.html +++ b/templates_bw/molecules/footer.html @@ -1,6 +1,6 @@ {% load static %} -