diff --git a/hypha/apply/funds/templates/funds/includes/table_filter_and_search.html b/hypha/apply/funds/templates/funds/includes/table_filter_and_search.html index baff51884582fb6c84dd2d96a07a552ad6b7c750..6d35625fa6d071027a3560e7671c334bf4cb46fb 100644 --- a/hypha/apply/funds/templates/funds/includes/table_filter_and_search.html +++ b/hypha/apply/funds/templates/funds/includes/table_filter_and_search.html @@ -60,6 +60,7 @@ <button class="button button--filters js-toggle-filters">{% trans "Filters" %}</button> {% endif %} + <button class="button button--filters js-toggle-filters" id="show-filters-button">{% trans "Filters" %}</button> {% if use_search|default:False %} <form action="{{ search_action }}" method="get" role="search" class="form form--search-desktop"> <button class="button button--search" type="submit" aria-label="{% trans 'Search' %}"> diff --git a/hypha/static_src/src/javascript/apply/submission-filters.js b/hypha/static_src/src/javascript/apply/submission-filters.js index d751eb514a6048f76bd40d28614a9d8a4e3da65e..585b31eff5a3519531557375a910ed906bddd34a 100644 --- a/hypha/static_src/src/javascript/apply/submission-filters.js +++ b/hypha/static_src/src/javascript/apply/submission-filters.js @@ -148,7 +148,7 @@ $(window).resize(function resize() { if ($(window).width() < 1024) { // close the filters if open when reducing the window size - $('body').removeClass('filters-open'); + $('.filters').removeClass('filters-open'); // update filter button text $('.js-toggle-filters').text('Filters'); @@ -158,6 +158,13 @@ mobileFilterPadding(e.target); }); } + else { + $('.filters').addClass('filters-open'); + } }).trigger('resize'); + $('#show-filters-button').on('click', () => { + $('.filters').addClass('filters-open'); + }); + })(jQuery); diff --git a/hypha/static_src/src/sass/apply/components/_filters.scss b/hypha/static_src/src/sass/apply/components/_filters.scss index 089c17d1fc9b5db0bbc3f3f5f6c03407cd4694c0..9ef9a2d25e6a600a937099d00df710f7fb6e87ab 100644 --- a/hypha/static_src/src/sass/apply/components/_filters.scss +++ b/hypha/static_src/src/sass/apply/components/_filters.scss @@ -61,3 +61,9 @@ background: transparent; } } +// stylelint-disable selector-max-id +#show-filters-button { + @include media-query(tablet-landscape) { + display: none; + } +}