will_filter 3.1.3 → 3.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/.rvmrc +1 -1
- data/Gemfile.lock +2 -2
- data/README.rdoc +0 -3
- data/app/assets/javascripts/will_filter/filter.js +5 -5
- data/app/assets/javascripts/will_filter/filter_prototype_effects.js +1 -1
- data/app/assets/stylesheets/will_filter/exporter.css.scss +72 -49
- data/app/assets/stylesheets/will_filter/filter.css.scss +1 -0
- data/app/controllers/will_filter/application_controller.rb +1 -1
- data/app/controllers/will_filter/calendar_controller.rb +1 -1
- data/app/controllers/will_filter/exporter_controller.rb +15 -26
- data/app/controllers/will_filter/filter_controller.rb +7 -1
- data/app/models/will_filter/filter.rb +69 -12
- data/app/views/will_filter/exporter/export.html.erb +26 -2
- data/app/views/will_filter/exporter/index.html.erb +35 -43
- data/app/views/will_filter/filter/_conditions.html.erb +13 -32
- data/app/views/will_filter/filter/_conditions_footer.html.erb +17 -0
- data/app/views/will_filter/filter/_conditions_header.html.erb +38 -0
- data/app/views/will_filter/filter/_container.html.erb +3 -25
- data/lib/generators/will_filter/templates/config.yml +34 -1
- data/lib/generators/will_filter/will_filter_generator.rb +1 -1
- data/lib/tasks/will_filter_tasks.rake +1 -5
- data/lib/will_filter.rb +1 -1
- data/lib/will_filter/calendar.rb +1 -1
- data/lib/will_filter/config.rb +9 -1
- data/lib/will_filter/containers/boolean.rb +1 -1
- data/lib/will_filter/containers/date.rb +2 -8
- data/lib/will_filter/containers/date_range.rb +3 -9
- data/lib/will_filter/containers/date_time.rb +2 -8
- data/lib/will_filter/containers/date_time_range.rb +4 -16
- data/lib/will_filter/containers/double.rb +52 -0
- data/lib/will_filter/containers/double_delimited.rb +50 -0
- data/lib/will_filter/containers/double_range.rb +64 -0
- data/lib/will_filter/containers/filter_list.rb +1 -1
- data/lib/will_filter/containers/list.rb +1 -1
- data/lib/will_filter/containers/nil.rb +1 -1
- data/lib/will_filter/containers/numeric.rb +1 -1
- data/lib/will_filter/containers/numeric_delimited.rb +1 -1
- data/lib/will_filter/containers/numeric_range.rb +1 -1
- data/lib/will_filter/containers/single_date.rb +3 -3
- data/lib/will_filter/containers/text.rb +1 -1
- data/lib/will_filter/containers/text_delimited.rb +1 -1
- data/lib/will_filter/engine.rb +1 -1
- data/lib/will_filter/extensions/action_controller_extension.rb +1 -1
- data/lib/will_filter/extensions/action_view_extension.rb +1 -1
- data/lib/will_filter/extensions/active_record_extension.rb +1 -1
- data/lib/will_filter/extensions/array_extension.rb +1 -1
- data/lib/will_filter/filter_condition.rb +1 -1
- data/lib/will_filter/filter_container.rb +21 -3
- data/lib/will_filter/filter_exception.rb +1 -1
- data/lib/will_filter/railtie.rb +1 -1
- data/lib/will_filter/version.rb +2 -2
- data/spec/containers/double_spec.rb +16 -0
- data/spec/fake_app.rb +6 -12
- data/test/dummy/app/models/event.rb +1 -1
- data/test/dummy/app/models/event_filter.rb +4 -0
- data/test/dummy/app/models/event_user_filter.rb +4 -0
- data/test/dummy/app/models/user_filter.rb +31 -2
- data/test/dummy/config/will_filter/config.yml +9 -1
- data/test/dummy/db/migrate/20120223232000_add_rank_to_events.rb +5 -0
- data/test/dummy/db/schema.rb +2 -1
- metadata +40 -108
- data/config/will_filter/config.yml +0 -97
- data/db/migrate/20110924023807_create_will_filter_filters.rb +0 -15
@@ -1,97 +0,0 @@
|
|
1
|
-
#############################################################################
|
2
|
-
# will_filter configuration
|
3
|
-
#
|
4
|
-
# Default settings for all environments
|
5
|
-
#
|
6
|
-
# You can overload any feature for any environment by changing the
|
7
|
-
# environment settings at the bottom of the file.
|
8
|
-
#
|
9
|
-
# Alternatively, you can overload any of the methods of WillFilter::Config
|
10
|
-
#############################################################################
|
11
|
-
|
12
|
-
defaults: &defaults
|
13
|
-
effects_options:
|
14
|
-
enabled: false
|
15
|
-
script_path: "will_filter/filter_prototype_effects.js"
|
16
|
-
|
17
|
-
save_options:
|
18
|
-
enabled: true
|
19
|
-
user_filters_enabled: false # if set to true, the filters will be private
|
20
|
-
user_class_name: User
|
21
|
-
current_user_method: current_user
|
22
|
-
|
23
|
-
export_options:
|
24
|
-
enabled: true
|
25
|
-
default_formats: [html, csv, xml, json]
|
26
|
-
|
27
|
-
containers: # container implementation mapping
|
28
|
-
nil: WillFilter::Containers::Nil
|
29
|
-
numeric: WillFilter::Containers::Numeric
|
30
|
-
numeric_range: WillFilter::Containers::NumericRange
|
31
|
-
numeric_delimited: WillFilter::Containers::NumericDelimited
|
32
|
-
date_time_range: WillFilter::Containers::DateTimeRange
|
33
|
-
single_date: WillFilter::Containers::SingleDate
|
34
|
-
date: WillFilter::Containers::Date
|
35
|
-
date_time: WillFilter::Containers::DateTime
|
36
|
-
date_range: WillFilter::Containers::DateRange
|
37
|
-
text: WillFilter::Containers::Text
|
38
|
-
text_delimited: WillFilter::Containers::TextDelimited
|
39
|
-
boolean: WillFilter::Containers::Boolean
|
40
|
-
list: WillFilter::Containers::List
|
41
|
-
filter_list: WillFilter::Containers::FilterList
|
42
|
-
|
43
|
-
data_types: # mapping between data types and containers
|
44
|
-
bigint: [nil, numeric, numeric_range, numeric_delimited]
|
45
|
-
numeric: [nil, numeric, numeric_range, numeric_delimited]
|
46
|
-
smallint: [nil, numeric, numeric_range, numeric_delimited]
|
47
|
-
integer: [nil, numeric, numeric_range, numeric_delimited]
|
48
|
-
int: [nil, numeric, numeric_range, numeric_delimited]
|
49
|
-
double: [nil, numeric, numeric_range, numeric_delimited]
|
50
|
-
timestamp: [nil, date_time, date_time_range, single_date]
|
51
|
-
datetime: [nil, date_time, date_time_range, single_date]
|
52
|
-
date: [nil, date, date_range]
|
53
|
-
character: [nil, text, text_delimited]
|
54
|
-
varchar: [nil, text, text_delimited]
|
55
|
-
text: [nil, text, text_delimited]
|
56
|
-
text[]: [nil, text, text_delimited]
|
57
|
-
bytea: [nil, text, text_delimited]
|
58
|
-
boolean: [nil, boolean]
|
59
|
-
tinyint: [nil, boolean]
|
60
|
-
|
61
|
-
operators: # operators precedence
|
62
|
-
is: 100
|
63
|
-
is_not: 200
|
64
|
-
is_on: 300
|
65
|
-
is_in: 400
|
66
|
-
is_provided: 500
|
67
|
-
is_not_provided: 600
|
68
|
-
is_after: 700
|
69
|
-
is_before: 800
|
70
|
-
is_in_the_range: 900
|
71
|
-
contains: 1000
|
72
|
-
does_not_contain: 1100
|
73
|
-
starts_with: 1200
|
74
|
-
ends_with: 1300
|
75
|
-
is_greater_than: 1400
|
76
|
-
is_less_than: 1500
|
77
|
-
is_filtered_by: 1600
|
78
|
-
|
79
|
-
|
80
|
-
#############################################################################
|
81
|
-
# Environment Settings
|
82
|
-
# You can overload any feature defined in the defaults for any environment
|
83
|
-
#############################################################################
|
84
|
-
development:
|
85
|
-
<<: *defaults
|
86
|
-
|
87
|
-
test:
|
88
|
-
<<: *defaults
|
89
|
-
|
90
|
-
qa:
|
91
|
-
<<: *defaults
|
92
|
-
|
93
|
-
stage:
|
94
|
-
<<: *defaults
|
95
|
-
|
96
|
-
production:
|
97
|
-
<<: *defaults
|
@@ -1,15 +0,0 @@
|
|
1
|
-
class CreateWillFilterFilters < ActiveRecord::Migration
|
2
|
-
def change
|
3
|
-
create_table :will_filter_filters do |t|
|
4
|
-
t.string :type
|
5
|
-
t.string :name
|
6
|
-
t.text :data
|
7
|
-
t.integer :user_id
|
8
|
-
t.string :model_class_name
|
9
|
-
|
10
|
-
t.timestamps
|
11
|
-
end
|
12
|
-
|
13
|
-
add_index :will_filter_filters, [:user_id]
|
14
|
-
end
|
15
|
-
end
|