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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 576ead7e9ed602d984a2b141bbd9744df9f8ed760c32a72486f052af271aa6c9
|
4
|
+
data.tar.gz: 18c0360d8fd6fba83ee3bf84ff30f2e6e0eddcd1543a4c6056d1f904d564fefd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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: "
|
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
|