Merge branch 'release/5.0' into dev

pull/6827/head
Jens Ulferts 9 years ago
commit 33513309fa
  1. 4
      lib/assets/javascripts/reporting_engine/reporting/filters.js
  2. 2
      lib/report/controller.rb
  3. 2
      lib/reporting_engine/version.rb
  4. 3
      lib/widget/filters.rb
  5. 2
      lib/widget/filters/multi_values.rb
  6. 2
      lib/widget/filters/operators.rb

@ -497,7 +497,11 @@ Reporting.onload(function () {
$("add_filter_select").observe("change", function () { $("add_filter_select").observe("change", function () {
if (!(Reporting.Filters.exists(this.value))) { if (!(Reporting.Filters.exists(this.value))) {
Reporting.Filters.add_filter(this.value); Reporting.Filters.add_filter(this.value);
var new_filter = this.value;
this.selectedIndex = 0; this.selectedIndex = 0;
setTimeout(function () {
$(document).getElementById('operators['+ new_filter +']').focus();
}, 300);
}; };
}); });
} }

@ -286,8 +286,8 @@ module Report::Controller
end end
end end
end end
groups[:rows].try(:reverse_each) { |r| query.row(r) }
groups[:columns].try(:reverse_each) { |c| query.column(c) } groups[:columns].try(:reverse_each) { |c| query.column(c) }
groups[:rows].try(:reverse_each) { |r| query.row(r) }
query query
end end

@ -18,5 +18,5 @@
#++ #++
module ReportingEngine module ReportingEngine
VERSION = '1.2.0' VERSION = "5.0.19"
end end

@ -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 = 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), add_filter_label = label_tag 'add_filter_select', l(:label_filter_add),
class: 'advanced-filters--add-filter-label' 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 add_filter_value = content_tag :div, class: 'advanced-filters--add-filter-value' do
value = select_tag 'add_filter_select', value = select_tag 'add_filter_select',

@ -28,7 +28,7 @@ class Widget::Filters::MultiValues < Widget::Filters::Base
name: "values[#{filter_class.underscore_name}][]", name: "values[#{filter_class.underscore_name}][]",
:"data-loading" => @options[:lazy] ? 'ajax' : '', :"data-loading" => @options[:lazy] ? 'ajax' : '',
id: "#{filter_class.underscore_name}_arg_1_val", 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, :"data-filter-name" => filter_class.underscore_name,
multiple: 'multiple' } multiple: 'multiple' }
# multiple will be disabled/enabled later by JavaScript anyhow. # multiple will be disabled/enabled later by JavaScript anyhow.

@ -39,7 +39,7 @@ class Widget::Filters::Operators < Widget::Filters::Base
end.join.html_safe end.join.html_safe
end end
label1 = content_tag :label, 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}]", for: "operators[#{filter_class.underscore_name}]",
class: 'hidden-for-sighted' class: 'hidden-for-sighted'
label = content_tag :label do label = content_tag :label do

Loading…
Cancel
Save