diff --git a/lib/assets/javascripts/reporting_engine/reporting/filters.js b/lib/assets/javascripts/reporting_engine/reporting/filters.js index 75c6c4ab0d..ab156b6fb0 100644 --- a/lib/assets/javascripts/reporting_engine/reporting/filters.js +++ b/lib/assets/javascripts/reporting_engine/reporting/filters.js @@ -497,7 +497,11 @@ Reporting.onload(function () { $("add_filter_select").observe("change", function () { if (!(Reporting.Filters.exists(this.value))) { Reporting.Filters.add_filter(this.value); + var new_filter = this.value; this.selectedIndex = 0; + setTimeout(function () { + $(document).getElementById('operators['+ new_filter +']').focus(); + }, 300); }; }); } diff --git a/lib/report/controller.rb b/lib/report/controller.rb index 934122f6da..c8c24b21ff 100644 --- a/lib/report/controller.rb +++ b/lib/report/controller.rb @@ -286,8 +286,8 @@ module Report::Controller end end end - groups[:rows].try(:reverse_each) { |r| query.row(r) } groups[:columns].try(:reverse_each) { |c| query.column(c) } + groups[:rows].try(:reverse_each) { |r| query.row(r) } query end diff --git a/lib/reporting_engine/version.rb b/lib/reporting_engine/version.rb index 6bb4fd16d9..8853566723 100644 --- a/lib/reporting_engine/version.rb +++ b/lib/reporting_engine/version.rb @@ -18,5 +18,5 @@ #++ module ReportingEngine - VERSION = '1.2.0' + VERSION = "5.0.19" end diff --git a/lib/widget/filters.rb b/lib/widget/filters.rb index 0b85984cab..65efc59b7c 100644 --- a/lib/widget/filters.rb +++ b/lib/widget/filters.rb @@ -24,6 +24,9 @@ class Widget::Filters < Widget::Base add_filter = content_tag :li, id: 'add_filter_block', class: 'advanced-filters--add-filter' do add_filter_label = label_tag 'add_filter_select', l(:label_filter_add), class: 'advanced-filters--add-filter-label' + add_filter_label += label_tag 'add_filter_select', I18n.t('js.filter.description.text_open_filter') + ' ' + + I18n.t('js.filter.description.text_close_filter'), + class: 'hidden-for-sighted' add_filter_value = content_tag :div, class: 'advanced-filters--add-filter-value' do value = select_tag 'add_filter_select', diff --git a/lib/widget/filters/multi_values.rb b/lib/widget/filters/multi_values.rb index 8636bb1362..0ee89950a3 100644 --- a/lib/widget/filters/multi_values.rb +++ b/lib/widget/filters/multi_values.rb @@ -28,7 +28,7 @@ class Widget::Filters::MultiValues < Widget::Filters::Base name: "values[#{filter_class.underscore_name}][]", :"data-loading" => @options[:lazy] ? 'ajax' : '', id: "#{filter_class.underscore_name}_arg_1_val", - class: 'advanced-filters--select filter-value', + class: 'form--select filter-value', :"data-filter-name" => filter_class.underscore_name, multiple: 'multiple' } # multiple will be disabled/enabled later by JavaScript anyhow. diff --git a/lib/widget/filters/operators.rb b/lib/widget/filters/operators.rb index b58841bb41..658a63c95a 100644 --- a/lib/widget/filters/operators.rb +++ b/lib/widget/filters/operators.rb @@ -39,7 +39,7 @@ class Widget::Filters::Operators < Widget::Filters::Base end.join.html_safe end label1 = content_tag :label, - h(filter_class.label) + ' ' + l(:label_operator), + h(filter_class.label) + ' ' + l(:label_operator) + ' ' + I18n.t('js.filter.description.text_open_filter'), for: "operators[#{filter_class.underscore_name}]", class: 'hidden-for-sighted' label = content_tag :label do