diff --git a/sharing_portal/static/sharing_portal/index.js b/sharing_portal/static/sharing_portal/index.js index b6d97e17..0d9c592c 100644 --- a/sharing_portal/static/sharing_portal/index.js +++ b/sharing_portal/static/sharing_portal/index.js @@ -36,3 +36,10 @@ } } })(); + +function filter_artifacts(badge_filter) { + const filterInput = document.getElementById('cardFilter'); + filterInput.value = ""; // reset the value in field + filterInput.value = badge_filter; + filterInput.dispatchEvent(new KeyboardEvent('keyup')); // trigger a keyup to apply filter +} diff --git a/sharing_portal/templates/sharing_portal/index.html b/sharing_portal/templates/sharing_portal/index.html index a4b80058..f131432f 100644 --- a/sharing_portal/templates/sharing_portal/index.html +++ b/sharing_portal/templates/sharing_portal/index.html @@ -118,11 +118,12 @@

Trovi

Badges

{% for badge in badges %}
- + {% if badge.redirect_link %} {{badge.description}} {% else %} @@ -131,7 +132,7 @@

Badges

{% endfor %} - +

Tags

{% for tag in tags %} @@ -140,7 +141,7 @@

Tags

{% endfor %} - + {% endblock %}