diff options
author | 2021-08-16 10:00:32 +0100 | |
---|---|---|
committer | 2021-08-16 10:00:32 +0100 | |
commit | 4d4411a5360f9772b70246ce716e0213e5e04d7d (patch) | |
tree | 79691df97873327cd11ebb0cb1eb4fb7c9ef0520 | |
parent | chore: Finalise tag style (diff) |
feat: Add select all button
-rw-r--r-- | pydis_site/templates/resources/resources.html | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pydis_site/templates/resources/resources.html b/pydis_site/templates/resources/resources.html index 38cd3d9d..11f7ceab 100644 --- a/pydis_site/templates/resources/resources.html +++ b/pydis_site/templates/resources/resources.html @@ -96,6 +96,10 @@ <span class="is-one-fifth control"> <button onclick="clearQueryParams()" class="button is-danger is-small">Clear Search</button> </span> + + <span class="control ml-2"> + <button onclick="selectAllQueryParams()" class="button is-success is-small">Select All</button> + </span> </div> </div> </div> @@ -173,5 +177,14 @@ }); }); } + + function selectAllQueryParams(){ + checkboxOptions.forEach((option) => { + document.querySelectorAll(createQuerySelect(option)).forEach((checkbox) => { + checkbox.checked = true; + }); + }); + } + </script> {% endblock %} |