spotlight_search 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: db095dee4fcbb232c1f7eddd83dfdfe279243415f3f6e54636740c2abbbe9ac3
4
- data.tar.gz: c93d9955d07504a7aecca13cca15d1655fa847d0c13b1dc3643414ceeab39cb3
3
+ metadata.gz: 576ead7e9ed602d984a2b141bbd9744df9f8ed760c32a72486f052af271aa6c9
4
+ data.tar.gz: 18c0360d8fd6fba83ee3bf84ff30f2e6e0eddcd1543a4c6056d1f904d564fefd
5
5
  SHA512:
6
- metadata.gz: 67fc0b1c020ee49f59dbf539bf7854fcf65a8d8ce393b6315450c07812bec38020ace65fd29c36d76fb7408ddee3a6296c92ebf94dddc13026bc000660e26651
7
- data.tar.gz: f4b76130d03a78c7fefdf61feffa8a61712097bd9807b479e3d9f41246fa69ed45bed3071a4df6b59ca94f5a3ea03dc0f1ecbdf74fdc701c6b845b92354b3123
6
+ metadata.gz: 17743dcac8dc528fd9f5cfa0713f51e109be3703f6d8ba3f380028b9ad65abd508acba501a7ee844e4e16cba8ba6d0ba4f00f9bac3d9fa8767f3c0bdf66a7772
7
+ data.tar.gz: 4aba022bdfff558c868077abf3f200e02e540e7392c0953dc71a984f605f22921efff26059408c2b13ec284a818926bb930abdc44c46541b8ffd44deec040383
@@ -74,6 +74,15 @@ $(document).on('keyup', '[data-type="input-filter"]', function() {
74
74
  });
75
75
  });
76
76
 
77
+ $(document).on('change', '[data-type="range-filter"]', function() {
78
+ var thisObj;
79
+ thisObj = $(this);
80
+ return $(function() {
81
+ return get_paginated_list(1, thisObj);
82
+ });
83
+ });
84
+
85
+
77
86
  $(document).on('change', '[data-type="select-filter"]', function() {
78
87
  var thisObj;
79
88
  thisObj = $(this);
@@ -4,7 +4,9 @@ module SpotlightSearch
4
4
  begin
5
5
  klass = params[:class_name].constantize
6
6
  if klass.validate_exportable_columns(params[:columns])
7
- ExportJob.perform_later(klass.name, params[:email], params[:columns], params[:filters], params[:sort])
7
+ (filter_params = params[:filters].permit!) if params[:filters].present?
8
+ (sort_params = params[:sort].permit!) if params[:sort].present?
9
+ ExportJob.perform_later(klass.name, params[:email], params[:columns], filter_params, sort_params)
8
10
  notice = 'Successfully queued for export'
9
11
  else
10
12
  notice = 'Invalid columns found'
@@ -68,7 +68,7 @@ module SpotlightSearch
68
68
  columns.size.times { size_arr << 22 }
69
69
  xl = Axlsx::Package.new
70
70
  xl.workbook.add_worksheet do |sheet|
71
- sheet.add_row columns, b: true
71
+ sheet.add_row columns&.map(&:titleize), b: true
72
72
  flattened_records.each do |record|
73
73
  sheet.add_row(columns.map { |column| record[column] })
74
74
  end
@@ -112,7 +112,7 @@ module SpotlightSearch
112
112
  end
113
113
  when 'daterange'
114
114
  tag.div class: 'filter-field' do
115
- concat text_field_tag scope_name, '', class: "#{classes} filter-rangepicker", data: {behaviour: "filter", scope: scope_name, type: "input-filter"}, placeholder: "#{placeholder}"
115
+ concat text_field_tag scope_name, '', class: "#{classes} filter-rangepicker", data: {behaviour: "filter", scope: scope_name, type: "range-filter"}, placeholder: "#{placeholder}"
116
116
  concat tag.span class: 'fa fa-search search-icon'
117
117
  end
118
118
  end
@@ -1,3 +1,3 @@
1
1
  module SpotlightSearch
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spotlight_search
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anbazhagan Palani