From 6300c37a4eb08065004756d8c2b98e80a04f0e0b Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Fri, 13 Nov 2020 10:14:24 -0800 Subject: [PATCH] Select all checkbox --- bookwyrm/static/js/shared.js | 4 ++++ bookwyrm/templates/import_status.html | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/bookwyrm/static/js/shared.js b/bookwyrm/static/js/shared.js index 7bac4912..b99459b2 100644 --- a/bookwyrm/static/js/shared.js +++ b/bookwyrm/static/js/shared.js @@ -20,6 +20,10 @@ function reply(e) { return true; } +function selectAll(el) { + el.parentElement.querySelectorAll('[type="checkbox"]') + .forEach(t => t.checked=true); +} function rate_stars(e) { e.preventDefault(); diff --git a/bookwyrm/templates/import_status.html b/bookwyrm/templates/import_status.html index cda74a21..886aea67 100644 --- a/bookwyrm/templates/import_status.html +++ b/bookwyrm/templates/import_status.html @@ -50,6 +50,12 @@ {% endfor %} +
+ +
{% else %}