From 4adf44bb7aa524f06b81f18218376799f3a75319 Mon Sep 17 00:00:00 2001 From: Vivaan Verma Date: Mon, 16 Aug 2021 22:25:48 +0100 Subject: fix: Make select all buttons for each individual column --- pydis_site/templates/resources/resources.html | 42 +++++++++++++++++---------- 1 file changed, 26 insertions(+), 16 deletions(-) (limited to 'pydis_site') diff --git a/pydis_site/templates/resources/resources.html b/pydis_site/templates/resources/resources.html index 11f7ceab..0e4302c6 100644 --- a/pydis_site/templates/resources/resources.html +++ b/pydis_site/templates/resources/resources.html @@ -22,14 +22,14 @@
-
+
Topic
{% for topic in topics_1 %}
@@ -39,52 +39,64 @@ {% for topic in topics_2 %}
{% endfor %}
+ + +
-
+
Type
{% for tag_type in tag_types %}
{% endfor %} + + +
-
+
Payment
{% for payment_tier in payment_tiers %}
{% endfor %} + + +
-
+
Level
{% for complexity in complexities %}
{% endfor %} + + +
@@ -93,13 +105,9 @@ - + - - - -
@@ -178,10 +186,12 @@ }); } - function selectAllQueryParams(){ + function selectAllQueryParams(column){ checkboxOptions.forEach((option) => { document.querySelectorAll(createQuerySelect(option)).forEach((checkbox) => { - checkbox.checked = true; + if (checkbox.className == column) { + checkbox.checked = true; + } }); }); } -- cgit v1.2.3