wice_grid 3.4.9 → 3.4.10

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
  SHA1:
3
- metadata.gz: c4ac301670447bdd79518dfa9a759e2907862e99
4
- data.tar.gz: 3ce402160cbecb319f1a323b20f8165a5b1abc32
3
+ metadata.gz: c917326faf115ba71d1c1e156815fa05cfc0ac71
4
+ data.tar.gz: 7db7696c87a0a9d8171044b5145337da821141ae
5
5
  SHA512:
6
- metadata.gz: 22cb097711ef784200fc1a5d3c168c6468f85550af82c920d65b3a9ff2d9e88e27f4b9c26f72fa60ea4f72ec7aba54dad8912bf4ea8d76e3f5b4c353568109f3
7
- data.tar.gz: a46bdb7761ffd3c52b67039d2b0eeadedc5ade9ddb341f8ead7b7fd75b2898fd323436822af1ec58124faea50848f4367e2f65d346d9e12b4f66d8cc49c872df
6
+ metadata.gz: ccab35cfcc8952ec2992fda26dc6ea8b332ec82476d81ea141e0625fe7351730c80833c494ac433c594b3e4a99d91b499d8fc52abb59f4143c1fbd7bdc611ad6
7
+ data.tar.gz: ee71fd6c9196446d51e22ee25763d78df102e768f36363972d11504f0daecfe4b53e90f288b646bc368f4b1026b5f2ba926f4487ff83a3ae0d9b69751576aa45
data/CHANGELOG CHANGED
@@ -1,4 +1,45 @@
1
- 3.5.0
1
+ 3.4.10
2
+
3
+ bug fixes
4
+ better support for :group
5
+
6
+ 3.4.9
7
+
8
+ better support for Asset Pipeline
9
+
10
+ bugfixes
11
+
12
+ dropped support for Ruby 1.8
13
+
14
+ 3.4.8
15
+
16
+ a friendlier exception message when a constant is missing in wice_grid_config.rb
17
+
18
+ bugfixes
19
+
20
+ 3.4.6
21
+
22
+ Better support for Turbolinks
23
+
24
+ Better support for ActiveRelation #references
25
+
26
+ variable Wice::Defaults::PAGE_METHOD_NAME
27
+
28
+ 3.4.5
29
+
30
+ Support for ActiveRelation #references
31
+
32
+ bugfixes
33
+
34
+ 3.4.4
35
+
36
+ bugfixes
37
+
38
+ 3.4.3
39
+
40
+ bugfixes
41
+
42
+ 3.4.2
2
43
 
3
44
  External columns processors
4
45
 
data/README.rdoc CHANGED
@@ -1,6 +1,6 @@
1
1
  = WiceGrid
2
2
 
3
- Version:: 3.4.9
3
+ Version:: 3.4.10
4
4
  Author:: Yuri Leikind
5
5
  Sources:: https://github.com/leikind/wice_grid/
6
6
  Examples online:: http://wicegrid.herokuapp.com
@@ -27,7 +27,7 @@ This is it. The controller now has the required action methods.
27
27
 
28
28
  If the name of the query controller is QueriesController, add the following to <tt>routes.rb</tt>:
29
29
 
30
- Wice::define_routes(map, 'queries')
30
+ Wice::define_routes(self, 'queries')
31
31
 
32
32
  === Step 4: Add the saved query panel to the view.
33
33
 
@@ -28,7 +28,7 @@ module Wice #:nodoc:
28
28
  hidden_field_tag_options['data-close-calendar-event-name'] = calendar_data.close_calendar_event_name
29
29
  end
30
30
 
31
- if Rails.env == 'development'
31
+ if Rails.env.development?
32
32
  hidden_field_tag_options['class'] = 'check-for-datepicker'
33
33
  end
34
34
 
@@ -321,7 +321,7 @@ module Wice
321
321
  else
322
322
  if reuse_last_column_for_filter_buttons && last
323
323
  grid.output_buffer << content_tag(:th,
324
- hide_show_icon(filter_row_id, grid, filter_shown, no_filter_row, options[:show_filters], rendering)
324
+ hide_show_icon(filter_row_id, grid, filter_shown, no_filter_row, options[:show_filters], rendering), opts
325
325
  )
326
326
  else
327
327
  grid.output_buffer << content_tag(:th, column_name, opts)
@@ -494,7 +494,7 @@ module Wice
494
494
 
495
495
  grid.output_buffer << '</div>'
496
496
 
497
- if Rails.env == 'development'
497
+ if Rails.env.development?
498
498
  grid.output_buffer << javascript_tag(%/ window.onload = function(){ \n/ +
499
499
  %$ if (typeof(WiceGridProcessor) == "undefined"){\n$ +
500
500
  %$ alert("wice_grid.js not loaded, WiceGrid cannot proceed!\\n" +\n$ +
@@ -660,7 +660,7 @@ module Wice
660
660
 
661
661
  if grid.all_record_mode?
662
662
 
663
- collection_total_entries = collection.size
663
+ collection_total_entries = collection.length
664
664
  current_page = 1
665
665
  per_page = collection_total_entries
666
666
 
@@ -3,32 +3,21 @@ module Wice
3
3
  class <<self
4
4
  # Used in routes.rb to define routes to the query processing controller.
5
5
  # Parameters:
6
- # * map - the mapper object used in routes.rb to defined routes (instance of <tt>ActionController::Routing::RouteSet::Mapper</tt>)
6
+ # * map - the context of the routes execution (instance of <tt>ActionDispatch::Routing::Mapper</tt>).
7
+ # Normally use +self+ for the first argument: <tt>Wice::define_routes(self, 'queries')</tt>
7
8
  # * controller - name of the query processing controller, i.e. <tt>'queries'</tt> if the controller is +QueriesController+ .
8
9
  # Read section "Saving Queries How-To" in README for more details.
9
10
  def define_routes(map, controller)
10
11
  controller = controller.to_s
11
- # if Rails.version[0..1] == '3.'
12
12
 
13
- # map.match '/wice_grid_serialized_queries/:grid_name',
14
- # to: "#{controller}#create",
15
- # as: 'create_serialized_query'
13
+ map.post '/wice_grid_serialized_queries/:grid_name',
14
+ to: "#{controller}#create_saved_query",
15
+ as: 'create_serialized_query'
16
16
 
17
- # map.match '/wice_grid_serialized_queries/:grid_name/:id',
18
- # to: "#{controller}#delete",
19
- # as: 'delete_serialized_query'
17
+ map.post '/wice_grid_serialized_queries/:grid_name/:id',
18
+ to: "#{controller}#delete_saved_query",
19
+ as: 'delete_serialized_query'
20
20
 
21
- # else
22
-
23
- map.post '/wice_grid_serialized_queries/:grid_name',
24
- to: "#{controller}#create_saved_query",
25
- as: 'create_serialized_query'
26
-
27
- map.post '/wice_grid_serialized_queries/:grid_name/:id',
28
- to: "#{controller}#delete_saved_query",
29
- as: 'delete_serialized_query'
30
-
31
- # end
32
21
  end
33
22
  end
34
23
 
data/lib/wice_grid.rb CHANGED
@@ -308,6 +308,7 @@ module Wice
308
308
  includes(@ar_options[:include]).
309
309
  joins( @ar_options[:joins]).
310
310
  order( @ar_options[:order]).
311
+ group( @ar_options[:group]).
311
312
  where( @ar_options[:conditions])
312
313
 
313
314
  else
@@ -318,6 +319,7 @@ module Wice
318
319
  includes(@ar_options[:include]).
319
320
  joins( @ar_options[:joins]).
320
321
  order( @ar_options[:order]).
322
+ group( @ar_options[:group]).
321
323
  where( @ar_options[:conditions])
322
324
 
323
325
  relation = add_references relation
data/wice_grid.gemspec CHANGED
@@ -1,8 +1,8 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'wice_grid'
3
- s.version = '3.4.9'
3
+ s.version = '3.4.10'
4
4
  s.homepage = 'https://github.com/leikind/wice_grid'
5
- s.date = '2014-08-03'
5
+ s.date = '2014-08-26'
6
6
  s.summary = 'A Rails grid plugin to create grids with sorting, pagination, and (automatically generated) filters.'
7
7
  s.description = 'A Rails grid plugin to create grids with sorting, pagination, and (automatically generated) filters.' +
8
8
  'One of the goals of this plugin was to allow the programmer to define the contents of the cell by himself, ' +
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wice_grid
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.9
4
+ version: 3.4.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuri Leikind
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-03 00:00:00.000000000 Z
11
+ date: 2014-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kaminari
@@ -141,3 +141,4 @@ specification_version: 3
141
141
  summary: A Rails grid plugin to create grids with sorting, pagination, and (automatically
142
142
  generated) filters.
143
143
  test_files: []
144
+ has_rdoc: