From 8bda0bc0dc03d1626f7932fedd4a634a1f5b140a Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 16 Dec 2021 11:06:53 -0800 Subject: [PATCH] Removes check_all javascript that is no longer used --- bookwyrm/static/js/check_all.js | 34 -------------------- bookwyrm/templates/import/import_status.html | 4 --- 2 files changed, 38 deletions(-) delete mode 100644 bookwyrm/static/js/check_all.js diff --git a/bookwyrm/static/js/check_all.js b/bookwyrm/static/js/check_all.js deleted file mode 100644 index fd29f2cd6..000000000 --- a/bookwyrm/static/js/check_all.js +++ /dev/null @@ -1,34 +0,0 @@ - -(function() { - 'use strict'; - - /** - * Toggle all descendant checkboxes of a target. - * - * Use `data-target="ID_OF_TARGET"` on the node on which the event is listened - * to (checkbox, button, linkā€¦), where_ID_OF_TARGET_ should be the ID of an - * ancestor for the checkboxes. - * - * @example - * - * @param {Event} event - * @return {undefined} - */ - function toggleAllCheckboxes(event) { - const mainCheckbox = event.target; - - document - .querySelectorAll(`#${mainCheckbox.dataset.target} [type="checkbox"]`) - .forEach(checkbox => checkbox.checked = mainCheckbox.checked); - } - - document - .querySelectorAll('[data-action="toggle-all"]') - .forEach(input => { - input.addEventListener('change', toggleAllCheckboxes); - }); -})(); diff --git a/bookwyrm/templates/import/import_status.html b/bookwyrm/templates/import/import_status.html index b3d209873..374ea22c7 100644 --- a/bookwyrm/templates/import/import_status.html +++ b/bookwyrm/templates/import/import_status.html @@ -234,7 +234,3 @@ {% endif %} {% endspaceless %}{% endblock %} - -{% block scripts %} - -{% endblock %}