From 22dffad38daa578c26ccd127107d7d7f31c75b40 Mon Sep 17 00:00:00 2001 From: Wieland Lindenthal Date: Thu, 19 Oct 2017 15:56:00 +0200 Subject: [PATCH] WIP: Cleanup and bug fixes --- app/assets/javascripts/project/filters.js | 3 ++- app/views/projects/index.html.erb | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/project/filters.js b/app/assets/javascripts/project/filters.js index efb59755a9..097e7dceff 100644 --- a/app/assets/javascripts/project/filters.js +++ b/app/assets/javascripts/project/filters.js @@ -44,6 +44,7 @@ jQuery(function($) { } function sendForm() { + $('#ajax-indicator').show(); let $advancedFilters = $(".advanced-filters--filter", $filterForm); let filters = []; $advancedFilters.each(function(_i, filter){ @@ -73,8 +74,8 @@ jQuery(function($) { return false; } + // Register event listeners $filterForm.submit(sendForm) $button.click(toggleProjectFilterForm); $closeIcon.click(toggleProjectFilterForm); - }); diff --git a/app/views/projects/index.html.erb b/app/views/projects/index.html.erb index a0b861eb2c..1a8e57e609 100644 --- a/app/views/projects/index.html.erb +++ b/app/views/projects/index.html.erb @@ -82,7 +82,7 @@ See doc/COPYRIGHT.rdoc for more details.
<% unless operators_without_values.include? selected_operator %> - <% if filter.type == :list_optional %> + <% if %i(list list_optional list_all ).include? filter.type %>
<%= select_tag :value, @@ -90,7 +90,7 @@ See doc/COPYRIGHT.rdoc for more details. filter.allowed_values, :second, :first, - @query.find_active_filter(name) + @query.find_active_filter(filter.name) .try(:values) .try(:first)), class: 'form--select -small' %>