mongoid_wice_grid 4.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +9 -0
- data/CHANGELOG +409 -0
- data/Gemfile +17 -0
- data/Gemfile.lock +140 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +1188 -0
- data/Rakefile +40 -0
- data/SAVED_QUERIES_HOWTO.rdoc +123 -0
- data/VERSION +1 -0
- data/lib/filter_conditions_generators.rb +126 -0
- data/lib/generators/wice_grid/templates/calendarview.css +107 -0
- data/lib/generators/wice_grid/templates/calendarview.js +1168 -0
- data/lib/generators/wice_grid/templates/icons/arrow_down.gif +0 -0
- data/lib/generators/wice_grid/templates/icons/arrow_up.gif +0 -0
- data/lib/generators/wice_grid/templates/icons/calendar_view_month.png +0 -0
- data/lib/generators/wice_grid/templates/icons/delete.png +0 -0
- data/lib/generators/wice_grid/templates/icons/expand.png +0 -0
- data/lib/generators/wice_grid/templates/icons/page_white_excel.png +0 -0
- data/lib/generators/wice_grid/templates/icons/page_white_find.png +0 -0
- data/lib/generators/wice_grid/templates/icons/table.png +0 -0
- data/lib/generators/wice_grid/templates/icons/table_refresh.png +0 -0
- data/lib/generators/wice_grid/templates/icons/tick_all.png +0 -0
- data/lib/generators/wice_grid/templates/icons/untick_all.png +0 -0
- data/lib/generators/wice_grid/templates/wice_grid.css +173 -0
- data/lib/generators/wice_grid/templates/wice_grid.yml +269 -0
- data/lib/generators/wice_grid/templates/wice_grid_config.rb +215 -0
- data/lib/generators/wice_grid/templates/wice_grid_jquery.js +161 -0
- data/lib/generators/wice_grid/templates/wice_grid_prototype.js +153 -0
- data/lib/generators/wice_grid/wice_grid_assets_jquery_generator.rb +32 -0
- data/lib/generators/wice_grid/wice_grid_assets_prototype_generator.rb +34 -0
- data/lib/grid_output_buffer.rb +52 -0
- data/lib/grid_renderer.rb +547 -0
- data/lib/helpers/js_calendar_helpers.rb +183 -0
- data/lib/helpers/wice_grid_misc_view_helpers.rb +113 -0
- data/lib/helpers/wice_grid_serialized_queries_view_helpers.rb +82 -0
- data/lib/helpers/wice_grid_view_helpers.rb +761 -0
- data/lib/js_adaptors/jquery_adaptor.rb +145 -0
- data/lib/js_adaptors/js_adaptor.rb +12 -0
- data/lib/js_adaptors/prototype_adaptor.rb +168 -0
- data/lib/mongoid_field.rb +50 -0
- data/lib/tasks/wice_grid_tasks.rake +28 -0
- data/lib/view_columns.rb +464 -0
- data/lib/views/create.rjs +13 -0
- data/lib/views/delete.rjs +12 -0
- data/lib/wice_grid.rb +521 -0
- data/lib/wice_grid_controller.rb +165 -0
- data/lib/wice_grid_core_ext.rb +179 -0
- data/lib/wice_grid_misc.rb +99 -0
- data/lib/wice_grid_serialized_queries_controller.rb +77 -0
- data/lib/wice_grid_serialized_query.rb +14 -0
- data/lib/wice_grid_spreadsheet.rb +33 -0
- data/test/.gitignore +2 -0
- data/test/blueprint.rb +17 -0
- data/test/database.yml +21 -0
- data/test/public/javascripts/jquery-1.4.2.min.js +154 -0
- data/test/public/javascripts/wice_grid.js +163 -0
- data/test/rails_mongoid_test.rb +104 -0
- data/test/rails_test_app.rb +71 -0
- data/test/require_gems.rb +19 -0
- data/test/schema.rb +33 -0
- data/test/spec_helper.rb +22 -0
- data/test/test_helper.rb +89 -0
- data/test/views/projects_and_people_grid.html.erb +12 -0
- data/test/views/projects_and_people_grid_invalid.html.erb +12 -0
- data/test/views/simple_projects_grid.html.erb +9 -0
- data/test/wice_grid_core_ext_test.rb +183 -0
- data/test/wice_grid_functional_test.rb +68 -0
- data/test/wice_grid_initializer.rb +215 -0
- data/test/wice_grid_misc_test.rb +41 -0
- data/test/wice_grid_test.rb +42 -0
- data/test/wice_grid_view_helper_test.rb +12 -0
- metadata +150 -0
data/.gitignore
ADDED
data/CHANGELOG
ADDED
@@ -0,0 +1,409 @@
|
|
1
|
+
wice_grid_custom_filter_params used to be a view helper, not it is also accessible from the controller, to be used in cases like redirect_to(my_resource_path(wice_grid_custom_filter_params(...)))
|
2
|
+
|
3
|
+
auto reloading filters
|
4
|
+
|
5
|
+
helper export_to_csv_javascript to create custom CSV buttons
|
6
|
+
option :hide_csv_button to hide the default CSV export button
|
7
|
+
|
8
|
+
Method WiceGrid#selected_records and parameter :after were a bit of a mess and have been substituted by
|
9
|
+
|
10
|
+
* WiceGrid#current_page_records returning records on the current page
|
11
|
+
* WiceGrid#all_pages_records returning records browsable throughout all pages
|
12
|
+
* :with_paginated_resultset - callback to process records on the current page
|
13
|
+
* :with_resultset - callback to process records browsable throughout all pages
|
14
|
+
|
15
|
+
Compliant with Rails 1.2.8 with or without rails_xss and erubis
|
16
|
+
|
17
|
+
Ruby 1.9.1 compliance
|
18
|
+
|
19
|
+
Dropdowns generated with :custom_filter => :auto and :custom_filter => [method chain] are now ordered by option labels
|
20
|
+
|
21
|
+
how_filters => false is the same as :show_filters => :no and :show_filters => true is the same as :show_filters => :always
|
22
|
+
|
23
|
+
action_column - Adds a column with checkboxes for each record.
|
24
|
+
Useful for actions with multiple records, for example, delete
|
25
|
+
the selected records.
|
26
|
+
|
27
|
+
using merge_conditions to merge conditions :)
|
28
|
+
|
29
|
+
WiceGrid is now compatible with the new Rails XSS behavior which
|
30
|
+
will be the default in Rails 3.0 and can be used in Rails 2.3.5
|
31
|
+
using the rails_xss plugin.
|
32
|
+
Read http://github.com/nzkoz/rails_xss for more
|
33
|
+
|
34
|
+
wice_grid_custom_filter_params
|
35
|
+
|
36
|
+
support for with_scope and with_exclusive_scope
|
37
|
+
|
38
|
+
:total_entries parameter added to initialize_grid (will_paginate)
|
39
|
+
|
40
|
+
Localization
|
41
|
+
|
42
|
+
assert_keys wherever possible
|
43
|
+
|
44
|
+
== 0.5
|
45
|
+
|
46
|
+
Today "WiceGrid":http://leikind.org/pages/wicegrid has reached its next level of maturity and was awarded the tag of version 0.5.
|
47
|
+
|
48
|
+
This version of WiceGrid is accompanied by an application called _WiceGrid Examples_ running "online":http://grid.leikind.org/ and with source code available on "GitHub":http://github.com/leikind/wice_grid_examples.
|
49
|
+
|
50
|
+
Here's a list of changes as compared with "version 0.4":https://blog.wice.eu/2009/7/6/moving-to-github-and-wicegrid-version-0-4 :
|
51
|
+
|
52
|
+
h4. selected_records
|
53
|
+
|
54
|
+
Method @selected_records@ of WiceGrid instances allows to access the list of all records of the current selection throughout all pages in the context of a view:
|
55
|
+
|
56
|
+
--- RHTML
|
57
|
+
<%= grid(@tasks_grid) do |g|
|
58
|
+
...
|
59
|
+
end -%>
|
60
|
+
|
61
|
+
<% selected = @tasks_grid.selected_records %>
|
62
|
+
<p><%= selected.size %> records selected: <%= selected.map(&:id).to_sentence %></p>
|
63
|
+
---
|
64
|
+
|
65
|
+
"See an online example":http://grid.leikind.org/integration_with_application_view
|
66
|
+
|
67
|
+
h4. placement of filter related icons
|
68
|
+
|
69
|
+
A change in placement of filter related icons (filter icon, reset icon, show/hide icon): if the last column doesn't have any filter or a column name, icons will be placed in the header of this column, otherwise it falls back to the usual behavior when an additional table column is added. To change the behavior back to the old style, set @Wice::Defaults::REUSE_LAST_COLUMN_FOR_FILTER_ICONS@ to @false@ in the configuration file.
|
70
|
+
|
71
|
+
"See an online example":http://grid.leikind.org/custom_filters2
|
72
|
+
|
73
|
+
|
74
|
+
h4. wice_grid_assets generator
|
75
|
+
|
76
|
+
Copying asset files (images, css, js, and the configuration file) is now done by a plugin generator, not rake tasks:
|
77
|
+
|
78
|
+
---
|
79
|
+
./script/generate wice_grid_assets
|
80
|
+
---
|
81
|
+
|
82
|
+
h4. blank slate
|
83
|
+
|
84
|
+
Blank slate feature: it is now possible to replace the grid with some alternative view if no filters are active and there are no records to render:
|
85
|
+
|
86
|
+
--- RHTML
|
87
|
+
<%= grid(@grid) do |g|
|
88
|
+
|
89
|
+
g.blank_slate do
|
90
|
+
"There are no records"
|
91
|
+
end
|
92
|
+
|
93
|
+
g.column do |product|
|
94
|
+
...
|
95
|
+
end
|
96
|
+
end -%>
|
97
|
+
---
|
98
|
+
|
99
|
+
There are also two alternative three ways to do it:
|
100
|
+
|
101
|
+
--- Ruby
|
102
|
+
g.blank_slate "some text to be rendered"
|
103
|
+
---
|
104
|
+
and
|
105
|
+
--- Ruby
|
106
|
+
g.blank_slate :partial => "partial_name"
|
107
|
+
---
|
108
|
+
|
109
|
+
"See an online example":http://grid.leikind.org/no_records
|
110
|
+
|
111
|
+
h4. custom filters with symbols
|
112
|
+
|
113
|
+
Improvement to custom filters, namely to
|
114
|
+
--- Ruby
|
115
|
+
:custom_filter => :symbol
|
116
|
+
---
|
117
|
+
and
|
118
|
+
--- Ruby
|
119
|
+
:custom_filter => [:symbol1, :symbol2, :symbol3]
|
120
|
+
---
|
121
|
+
|
122
|
+
Now, if the last method returns an array of 2 elements, the first element becomes the select option label and the second - the select option value (usually @id@).
|
123
|
+
|
124
|
+
Before this change the value returned by the method had been used for both the value and the label of the select option.
|
125
|
+
|
126
|
+
"See an online example":http://grid.leikind.org/custom_filters3
|
127
|
+
|
128
|
+
h4. custom filters and NULL
|
129
|
+
|
130
|
+
Values @null@ and @not null@ in a generated custom filter dropdown are treated specially, as SQL @null@ statement and not as strings. Value @null@ is transformed into SQL condition @IS NULL@, and @not null@ into @IS NOT NULL@ .
|
131
|
+
|
132
|
+
Thus, if in a filter defined by
|
133
|
+
|
134
|
+
--- Ruby
|
135
|
+
:custom_filter => {'No' => 'null', 'Yes' => 'not null', '1' => 1, '2' => '2', '3' => '3'}
|
136
|
+
---
|
137
|
+
values @1@, @2@ and @'No'@ are selected (in a multi-select mode), this will result in the following SQL:
|
138
|
+
|
139
|
+
--- SQL
|
140
|
+
( table.field IN ( '1', '2' ) OR table.field IS NULL )
|
141
|
+
---
|
142
|
+
|
143
|
+
"See an online example":http://grid.leikind.org/null_values
|
144
|
+
|
145
|
+
h4. Wice::Defaults::STRING_MATCHING_OPERATORS
|
146
|
+
|
147
|
+
in addition to the configuration constant @Wice::Defaults::STRING_MATCHING_OPERATOR@ to define the operator for matching strings (@LIKE@ in most cases), hash @Wice::Defaults::STRING_MATCHING_OPERATORS@ was added to specify string matching operators on per-database basis:
|
148
|
+
|
149
|
+
--- Ruby
|
150
|
+
Wice::Defaults::STRING_MATCHING_OPERATORS = {
|
151
|
+
'ActiveRecord::ConnectionAdapters::MysqlAdapter' => 'LIKE',
|
152
|
+
'ActiveRecord::ConnectionAdapters::PostgreSQLAdapter' => 'ILIKE'
|
153
|
+
}
|
154
|
+
---
|
155
|
+
|
156
|
+
A use-case for this is a Rails application connecting to two databases, one of which is MySQL, and the other is Postgresql. To use case-insensitive matching in Postgresql 'ILIKE' has to be used, but this operator is unknown to MySQL.
|
157
|
+
|
158
|
+
h4. td_html_attrs and table_html_attrs shortcuts
|
159
|
+
|
160
|
+
@:td_html_attrs@ in column definitions and @table_html_attrs@ in the table definitions are mostly used to add css classes, so a shorter way has been added to add css classes.
|
161
|
+
|
162
|
+
Instead of
|
163
|
+
|
164
|
+
--- RHTML
|
165
|
+
<%= grid(@grid, :table_html_attrs => {:class => 'css_class1'}) do |g|
|
166
|
+
g.column(:td_html_attrs => {:class => 'css_class2'}) do
|
167
|
+
...
|
168
|
+
end
|
169
|
+
end -%>
|
170
|
+
---
|
171
|
+
|
172
|
+
It's possible to just use the new @:class@ option:
|
173
|
+
|
174
|
+
--- RHTML
|
175
|
+
<%= grid(@grid, :class => 'css_class1') do |g|
|
176
|
+
g.column(:class => 'css_class2') do
|
177
|
+
end
|
178
|
+
end -%>
|
179
|
+
---
|
180
|
+
|
181
|
+
h4. allow_multiple_selection
|
182
|
+
|
183
|
+
New options for @column@: @:allow_multiple_selection@, use @:allow_multiple_selection => false@ to disable switching between single and multiple selection modes for custom dropdown boxes.
|
184
|
+
|
185
|
+
"See an online example":http://grid.leikind.org/custom_filters4
|
186
|
+
|
187
|
+
h4. allow_ordering
|
188
|
+
|
189
|
+
New parameter for @column@: @:allow_ordering@. Use @:allow_ordering => false@ to disable the ordering of the column.
|
190
|
+
|
191
|
+
"See an online example":http://grid.leikind.org/basics6
|
192
|
+
|
193
|
+
h4. allow_showing_all_records
|
194
|
+
|
195
|
+
Parameter @:allow_showing_all_records@ moved from @initialize_grid@ to the view helper.
|
196
|
+
|
197
|
+
h4. other
|
198
|
+
|
199
|
+
* Default styles updated.
|
200
|
+
* Javascript code cleaned up and refactored.
|
201
|
+
* Quite some number of bugs fixed
|
202
|
+
|
203
|
+
== 0.4
|
204
|
+
|
205
|
+
* Detached filters: it has become possible to detach filters and place them anywhere on the page, before or after the grid.
|
206
|
+
Read section "Detached Filters" in the README.
|
207
|
+
|
208
|
+
* More control over Submit and Reset buttons.
|
209
|
+
Two new view helpers: submit_grid_javascript returns javascript which applies current filters; reset_grid_javascript returns javascript
|
210
|
+
which resets the grid, clearing the state of filters. This allows to create your own Submit and Reset buttons anywhere on the page
|
211
|
+
with the help of button_to_function:
|
212
|
+
|
213
|
+
<%= button_to_function "Submit", submit_grid_javascript(@grid) %>
|
214
|
+
<%= button_to_function "Reset", reset_grid_javascript(@grid) %>
|
215
|
+
|
216
|
+
To complement this feature there are two new parameters in the +grid+ helper :hide_submit_button and :hide_reset_button which
|
217
|
+
hide default buttons in the grid if set to true. Together with detached filter this allows to completely
|
218
|
+
get rid of the filter row with filters and icons.
|
219
|
+
|
220
|
+
* erb_mode option has been moved to the grid view helper - watch for warnings and remove the parameter from initialize_grid if you have it there.
|
221
|
+
|
222
|
+
* helper include_wice_grid_assets will require WiceGrid javascripts and stylesheets on demand, that is, only if at least one initialize_grid
|
223
|
+
has been called in the controller. Otherwise the helper returns an empty string. However, you can force the old unconditioned behavior if you
|
224
|
+
need by submitting parameter :load_on_demand set to false:
|
225
|
+
<%= include_wice_grid_assets(:load_on_demand => false) %>
|
226
|
+
|
227
|
+
* Compatibility with Rails asset caching. Helpers names_of_wice_grid_stylesheets and names_of_wice_grid_javascripts return names of stylesheet and
|
228
|
+
javascript files and can be used with stylesheet_link_tag and javascript_include_tag with :cache => true. Using this trick you have to deal with
|
229
|
+
the parameters correctly, mind that Prototype has to be loaded before WiceGrid javascripts:
|
230
|
+
|
231
|
+
<%= stylesheet_link_tag *(['core', 'modalbox'] + names_of_wice_grid_stylesheets + [ {:cache => true}]) %>
|
232
|
+
<%= javascript_include_tag *([:defaults] + names_of_wice_grid_javascripts + [ 'ui', 'swfobject', {:cache => true}]) %>
|
233
|
+
|
234
|
+
* When a page with a WiceGrid instance is loaded there is check a small chunk of javascript that checks whether Prototype is loaded and whether
|
235
|
+
the main WiceGrid javascript files is loaded and is of the correct version. Problems are reported to the user via alert() dialog boxes.
|
236
|
+
This check has now been disabled in the production mode.
|
237
|
+
|
238
|
+
* The default field separator in generated CSV (comma) can now be overridden by setting :enable_export_to_csv to a string instead of +true+.
|
239
|
+
|
240
|
+
* It is possible to add your own handcrafted HTML after and/or before each grid row. This works similar to +row_attributes+,
|
241
|
+
by adding blocks after_row and before_row:
|
242
|
+
|
243
|
+
<%= grid(@tasks_grid) do |g|
|
244
|
+
g.before_row do |task|
|
245
|
+
if task.active?
|
246
|
+
"<tr><td colspan=\"10\">Custom line for #{t.name}</td></tr>" # this would add a row
|
247
|
+
# before every active task row
|
248
|
+
else
|
249
|
+
nil
|
250
|
+
end
|
251
|
+
end
|
252
|
+
.......
|
253
|
+
end %>
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
* Bug fixes
|
258
|
+
|
259
|
+
* Refactoring
|
260
|
+
=============
|
261
|
+
|
262
|
+
=== 03/04/2009
|
263
|
+
|
264
|
+
Possibility to add custom lines after and/or before a grid row.
|
265
|
+
|
266
|
+
|
267
|
+
=== 16/03/2009
|
268
|
+
|
269
|
+
Option to override the default field separator in generated CSV (comma).
|
270
|
+
|
271
|
+
|
272
|
+
=== 13/02/2009
|
273
|
+
|
274
|
+
a bug fix for incorrect generation if dom ids for javascript calendar filter. Happened only for columns belonging to joined tables
|
275
|
+
|
276
|
+
=== 12/01/2009
|
277
|
+
|
278
|
+
WiceGrid 0.3 released
|
279
|
+
|
280
|
+
=== 12/01/2009
|
281
|
+
|
282
|
+
All records mode
|
283
|
+
|
284
|
+
=== 10/12/2008
|
285
|
+
|
286
|
+
custom_filter made Rails-compliant, a new flavor - Array of two-element arrays
|
287
|
+
|
288
|
+
=== 4/12/2008
|
289
|
+
A single helper to include all assets in a page
|
290
|
+
|
291
|
+
A javascript error message if Prototype is not loaded
|
292
|
+
|
293
|
+
A javascript error message if wice_grid.js is not loaded
|
294
|
+
|
295
|
+
Added status info to the pagination line:
|
296
|
+
« Previous 1 2 3 Next » 1-20 / 50
|
297
|
+
|
298
|
+
=== 3/12/2008
|
299
|
+
First implementation of saved queries
|
300
|
+
|
301
|
+
|
302
|
+
=== 25/11/2008
|
303
|
+
|
304
|
+
Negation for string filters: match records where this fiels DOES NOT include the given fragment.
|
305
|
+
|
306
|
+
=== 24/11/2008
|
307
|
+
|
308
|
+
The string matching operator for string filters (LIKE) has been moved to wice_grid_config.rb in order to make it easier to substitute it with
|
309
|
+
something else, for example, ILIKE of Postgresql.
|
310
|
+
|
311
|
+
|
312
|
+
=== 19/11/2008
|
313
|
+
|
314
|
+
Experimental feature : :table_alias parameter to allow ordering and filtering for joining associations referring the same table.
|
315
|
+
(See "Joined associations referring to the same table" in README)
|
316
|
+
|
317
|
+
=== 18/11/2008
|
318
|
+
|
319
|
+
Refactoring
|
320
|
+
|
321
|
+
=== 6/11/2008
|
322
|
+
|
323
|
+
Ability to provide a callback to a Proc object or a method, the callback will be called with the objects of the current selection of
|
324
|
+
objects (throughout all pages). Can be used to use the WiceGrid filters set up by the user for further processing of the user's selection of
|
325
|
+
objects.
|
326
|
+
|
327
|
+
=== 5/11/2008
|
328
|
+
|
329
|
+
Javascript calendars as Date/Datetime filters
|
330
|
+
|
331
|
+
|
332
|
+
=== 4/11/2008
|
333
|
+
|
334
|
+
Ability to inject custom sql code into the ORDER BY clause, for example, ORDER BY char_length(table1.foo)
|
335
|
+
|
336
|
+
=== 4/11/2008
|
337
|
+
|
338
|
+
Creates a new branch for version 2.3
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
=== 21/10/2008
|
343
|
+
|
344
|
+
A bugfix related to custom filters influencing other columns with filters
|
345
|
+
A more informative error message if the grid can't find the underlying database column for a view column (incorrect :column_name and :model_class)
|
346
|
+
|
347
|
+
=== 8/10/2008
|
348
|
+
|
349
|
+
New view helper parameter <tt>:sorting_dependant_row_cycling</tt> - When set to true (by default it is false) the row styles +odd+ and +even+
|
350
|
+
will be changed only when the content of the cell belonging to the sorted column changes. In other words, rows with identical values in the
|
351
|
+
ordered column will have the same style (color).
|
352
|
+
|
353
|
+
=== 3/10/2008
|
354
|
+
|
355
|
+
For simple columns like
|
356
|
+
|
357
|
+
g.column :column_name => 'Username', :attribute_name => 'username' do |account|
|
358
|
+
account.username
|
359
|
+
end
|
360
|
+
|
361
|
+
the following blockless shortcut can be used:
|
362
|
+
|
363
|
+
g.column :column_name => 'Username', :attribute_name => 'username'
|
364
|
+
|
365
|
+
In this case +attribute_name+ will be used as the method name to send to the ActiveRecord instance.
|
366
|
+
|
367
|
+
=== revision 27 (30/09/2008)
|
368
|
+
|
369
|
+
* CSV export
|
370
|
+
* Custom filters can switch between a dropdown list and a multiple select list, thus allowing to search for records matching
|
371
|
+
more that one value (operator OR)
|
372
|
+
|
373
|
+
=== revision 17 (19/08/2008)
|
374
|
+
|
375
|
+
* A bug fixed: extra_request_parameters did not propagate to will_paginate page panel. Now it does.
|
376
|
+
|
377
|
+
=== revision 13 (6/08/2008)
|
378
|
+
|
379
|
+
* File <tt>config.rb</tt> renamed.
|
380
|
+
* New parameters for +column+ :
|
381
|
+
* <tt>:boolean_filter_true_label</tt> - overrides the default value for <tt>BOOLEAN_FILTER_TRUE_LABEL</tt> ('+yes+') in the config.
|
382
|
+
Only has effect in a column with a boolean filter.
|
383
|
+
* <tt>:boolean_filter_false_label</tt> - overrides the default value for <tt>BOOLEAN_FILTER_FALSE_LABEL</tt> ('+no+') in the config.
|
384
|
+
Only has effect in a column with a boolean filter.
|
385
|
+
* <tt>:filter_all_label</tt> - overrides the default value for <tt>BOOLEAN_FILTER_FALSE_LABEL</tt> ('<tt>--</tt>') in the config.
|
386
|
+
Has effect in a column with a boolean filter _or_ a custom filter.
|
387
|
+
|
388
|
+
=== revision 11
|
389
|
+
|
390
|
+
* New row_attributes method to dynamically generate HTML attributes for the <tt><tr></tt> tag:
|
391
|
+
|
392
|
+
<%= grid(@portal_applications_grid) do |g|
|
393
|
+
g.row_attributes{ |portal_application|
|
394
|
+
{:id => "#{@portal_applications_grid.name}_row_#{portal_application.id}"}
|
395
|
+
}
|
396
|
+
|
397
|
+
g.column{ |portal_application| ... }
|
398
|
+
g.column{ |portal_application| ... }
|
399
|
+
end -%>
|
400
|
+
|
401
|
+
* The column block can now optionally return an array of two values, where the first element is the cell
|
402
|
+
contents and the second is a hash of HTML attributes to be added for the <td> tag of the current cell.
|
403
|
+
|
404
|
+
=== revision 10
|
405
|
+
|
406
|
+
* New parameter +grid+ parameter: <tt>:extra_request_parameters</tt>.
|
407
|
+
(Read http://redmine.wice.eu/api/wice_grid/classes/Wice/GridViewHelper.html#M000002)
|
408
|
+
|
409
|
+
=== 0
|
data/Gemfile
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
source 'http://rubygems.org'
|
2
|
+
|
3
|
+
gem 'rails', '3.0.1'
|
4
|
+
gem "bson_ext", "1.0.4"
|
5
|
+
gem "mongo","1.0.7"
|
6
|
+
gem "mongo_ext"
|
7
|
+
gem "mongoid", "2.0.0.beta.17"
|
8
|
+
|
9
|
+
group :test do
|
10
|
+
gem 'capybara'
|
11
|
+
gem "rspec-rails", "~> 2.0.1"
|
12
|
+
gem 'rspec'
|
13
|
+
gem 'launchy'
|
14
|
+
gem 'machinist_mongo', :require => 'machinist/mongoid'
|
15
|
+
gem 'faker'
|
16
|
+
#gem 'rr'
|
17
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,140 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
abstract (1.0.0)
|
5
|
+
actionmailer (3.0.1)
|
6
|
+
actionpack (= 3.0.1)
|
7
|
+
mail (~> 2.2.5)
|
8
|
+
actionpack (3.0.1)
|
9
|
+
activemodel (= 3.0.1)
|
10
|
+
activesupport (= 3.0.1)
|
11
|
+
builder (~> 2.1.2)
|
12
|
+
erubis (~> 2.6.6)
|
13
|
+
i18n (~> 0.4.1)
|
14
|
+
rack (~> 1.2.1)
|
15
|
+
rack-mount (~> 0.6.12)
|
16
|
+
rack-test (~> 0.5.4)
|
17
|
+
tzinfo (~> 0.3.23)
|
18
|
+
activemodel (3.0.1)
|
19
|
+
activesupport (= 3.0.1)
|
20
|
+
builder (~> 2.1.2)
|
21
|
+
i18n (~> 0.4.1)
|
22
|
+
activerecord (3.0.1)
|
23
|
+
activemodel (= 3.0.1)
|
24
|
+
activesupport (= 3.0.1)
|
25
|
+
arel (~> 1.0.0)
|
26
|
+
tzinfo (~> 0.3.23)
|
27
|
+
activeresource (3.0.1)
|
28
|
+
activemodel (= 3.0.1)
|
29
|
+
activesupport (= 3.0.1)
|
30
|
+
activesupport (3.0.1)
|
31
|
+
arel (1.0.1)
|
32
|
+
activesupport (~> 3.0.0)
|
33
|
+
bson (1.0.4)
|
34
|
+
bson_ext (1.0.4)
|
35
|
+
builder (2.1.2)
|
36
|
+
capybara (0.4.0)
|
37
|
+
celerity (>= 0.7.9)
|
38
|
+
culerity (>= 0.2.4)
|
39
|
+
mime-types (>= 1.16)
|
40
|
+
nokogiri (>= 1.3.3)
|
41
|
+
rack (>= 1.0.0)
|
42
|
+
rack-test (>= 0.5.4)
|
43
|
+
selenium-webdriver (>= 0.0.27)
|
44
|
+
xpath (~> 0.1.2)
|
45
|
+
celerity (0.8.4)
|
46
|
+
childprocess (0.1.4)
|
47
|
+
ffi (~> 0.6.3)
|
48
|
+
configuration (1.2.0)
|
49
|
+
culerity (0.2.12)
|
50
|
+
diff-lcs (1.1.2)
|
51
|
+
erubis (2.6.6)
|
52
|
+
abstract (>= 1.0.0)
|
53
|
+
faker (0.3.1)
|
54
|
+
ffi (0.6.3)
|
55
|
+
rake (>= 0.8.7)
|
56
|
+
i18n (0.4.2)
|
57
|
+
json_pure (1.4.6)
|
58
|
+
launchy (0.3.7)
|
59
|
+
configuration (>= 0.0.5)
|
60
|
+
rake (>= 0.8.1)
|
61
|
+
machinist (1.0.6)
|
62
|
+
machinist_mongo (1.1.1)
|
63
|
+
machinist (~> 1.0.4)
|
64
|
+
mail (2.2.10)
|
65
|
+
activesupport (>= 2.3.6)
|
66
|
+
i18n (~> 0.4.1)
|
67
|
+
mime-types (~> 1.16)
|
68
|
+
treetop (~> 1.4.8)
|
69
|
+
mime-types (1.16)
|
70
|
+
mongo (1.0.7)
|
71
|
+
bson (>= 1.0.4)
|
72
|
+
mongo_ext (0.19.3)
|
73
|
+
mongoid (2.0.0.beta.17)
|
74
|
+
activemodel (~> 3.0.0)
|
75
|
+
bson (= 1.0.4)
|
76
|
+
mongo (= 1.0.7)
|
77
|
+
tzinfo (~> 0.3.22)
|
78
|
+
will_paginate (~> 3.0.pre)
|
79
|
+
nokogiri (1.4.4)
|
80
|
+
polyglot (0.3.1)
|
81
|
+
rack (1.2.1)
|
82
|
+
rack-mount (0.6.13)
|
83
|
+
rack (>= 1.0.0)
|
84
|
+
rack-test (0.5.6)
|
85
|
+
rack (>= 1.0)
|
86
|
+
rails (3.0.1)
|
87
|
+
actionmailer (= 3.0.1)
|
88
|
+
actionpack (= 3.0.1)
|
89
|
+
activerecord (= 3.0.1)
|
90
|
+
activeresource (= 3.0.1)
|
91
|
+
activesupport (= 3.0.1)
|
92
|
+
bundler (~> 1.0.0)
|
93
|
+
railties (= 3.0.1)
|
94
|
+
railties (3.0.1)
|
95
|
+
actionpack (= 3.0.1)
|
96
|
+
activesupport (= 3.0.1)
|
97
|
+
rake (>= 0.8.4)
|
98
|
+
thor (~> 0.14.0)
|
99
|
+
rake (0.8.7)
|
100
|
+
rspec (2.0.1)
|
101
|
+
rspec-core (~> 2.0.1)
|
102
|
+
rspec-expectations (~> 2.0.1)
|
103
|
+
rspec-mocks (~> 2.0.1)
|
104
|
+
rspec-core (2.0.1)
|
105
|
+
rspec-expectations (2.0.1)
|
106
|
+
diff-lcs (>= 1.1.2)
|
107
|
+
rspec-mocks (2.0.1)
|
108
|
+
rspec-core (~> 2.0.1)
|
109
|
+
rspec-expectations (~> 2.0.1)
|
110
|
+
rspec-rails (2.0.1)
|
111
|
+
rspec (~> 2.0.0)
|
112
|
+
rubyzip (0.9.4)
|
113
|
+
selenium-webdriver (0.1.0)
|
114
|
+
childprocess (= 0.1.4)
|
115
|
+
ffi (~> 0.6.3)
|
116
|
+
json_pure
|
117
|
+
rubyzip
|
118
|
+
thor (0.14.6)
|
119
|
+
treetop (1.4.9)
|
120
|
+
polyglot (>= 0.3.1)
|
121
|
+
tzinfo (0.3.23)
|
122
|
+
will_paginate (3.0.pre2)
|
123
|
+
xpath (0.1.2)
|
124
|
+
nokogiri (~> 1.3)
|
125
|
+
|
126
|
+
PLATFORMS
|
127
|
+
ruby
|
128
|
+
|
129
|
+
DEPENDENCIES
|
130
|
+
bson_ext (= 1.0.4)
|
131
|
+
capybara
|
132
|
+
faker
|
133
|
+
launchy
|
134
|
+
machinist_mongo
|
135
|
+
mongo (= 1.0.7)
|
136
|
+
mongo_ext
|
137
|
+
mongoid (= 2.0.0.beta.17)
|
138
|
+
rails (= 3.0.1)
|
139
|
+
rspec
|
140
|
+
rspec-rails (~> 2.0.1)
|