diff --git a/ckan/src/ckanext-igsn-theme/ckanext/igsn_theme/assets/js/facet-select-module.js b/ckan/src/ckanext-igsn-theme/ckanext/igsn_theme/assets/js/facet-select-module.js index beef7e44..43cf5ba8 100644 --- a/ckan/src/ckanext-igsn-theme/ckanext/igsn_theme/assets/js/facet-select-module.js +++ b/ckan/src/ckanext-igsn-theme/ckanext/igsn_theme/assets/js/facet-select-module.js @@ -26,7 +26,6 @@ this.ckan.module('facet-select-module', function ($, _) { updateQueryString: function ($element) { var selectedValues = $element.val(); - var $form = $element.closest('form'); var url = new URL(window.location.href); var params = new URLSearchParams(url.search); params.delete($element.attr('name')); @@ -42,7 +41,7 @@ this.ckan.module('facet-select-module', function ($, _) { // Hide the select2 container and show loading indicator $element.select2('destroy'); - $form.find('.loading-indicator').show(); + this.el.find('.loading-indicator').show(); $element.hide(); // Delay the page reload to ensure the loading indicator is visible @@ -51,4 +50,4 @@ this.ckan.module('facet-select-module', function ($, _) { }, 500); } }; -}); \ No newline at end of file +}); diff --git a/ckan/src/ckanext-igsn-theme/ckanext/igsn_theme/templates/snippets/facet_list.html b/ckan/src/ckanext-igsn-theme/ckanext/igsn_theme/templates/snippets/facet_list.html index 38353c8c..4a94e6c9 100644 --- a/ckan/src/ckanext-igsn-theme/ckanext/igsn_theme/templates/snippets/facet_list.html +++ b/ckan/src/ckanext-igsn-theme/ckanext/igsn_theme/templates/snippets/facet_list.html @@ -16,6 +16,25 @@ {% if name not in ['groups', 'license_id', 'res_format'] %} {% block facet_list_item %}
+ {% block facet_list_heading %}

{{ title }} @@ -25,26 +44,24 @@

{% with items = items or h.get_facet_items_dict(name, search_facets) %} {% if items %} {% else %}

{{ _('There are no {facet_type} that match this search').format(facet_type=title) }}

@@ -56,4 +73,4 @@

{% endif %} {% endif %} {% endwith %} -{% endblock %} \ No newline at end of file +{% endblock %}