wice_grid 3.4.7 → 3.4.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +1 -1
- data/lib/generators/wice_grid/templates/wice_grid_config.rb +3 -1
- data/lib/wice_grid.rb +28 -22
- data/vendor/assets/javascripts/wice_grid_processor.js.coffee +9 -4
- data/vendor/assets/javascripts/wice_grid_saved_queries_init.js.coffee +1 -1
- data/wice_grid.gemspec +2 -2
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56c4efa80c0a6215fc1061dd5194651b13628416
|
4
|
+
data.tar.gz: 8f53a3c0bc5c10ab9792f9fbefab14072b6b0aa6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 57575d15eabd156f2a51c9ccf88d0ba2992ccd2170dcb482d39a924989324ca676f556f2aefc9d47bd1ffea8bd4ee2c7b3353ae175a11919fa8aba7d41af5357
|
7
|
+
data.tar.gz: 068a7f6eb8d7680534ba57fc81946930ecda55b4453097c644f5bf751e06214b53af0aca848638cf39c42b0af57970a60806dbbeb65148bdcf8d7d931bedac9c
|
data/README.rdoc
CHANGED
@@ -166,4 +166,6 @@ if defined?(Wice::Defaults)
|
|
166
166
|
# popup calendar will be shown relative to the popup trigger element or to the mouse pointer
|
167
167
|
Wice::Defaults::POPUP_PLACEMENT_STRATEGY = :trigger # :pointer
|
168
168
|
|
169
|
-
|
169
|
+
# The name of the page method (should correspond to Kaminari.config.page_method_name)
|
170
|
+
Wice::Defaults::PAGE_METHOD_NAME = :page
|
171
|
+
end
|
data/lib/wice_grid.rb
CHANGED
@@ -92,27 +92,33 @@ module Wice
|
|
92
92
|
raise WiceGridArgumentError.new(":order_direction must be either 'asc' or 'desc'.")
|
93
93
|
end
|
94
94
|
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
95
|
+
begin
|
96
|
+
# options that are understood
|
97
|
+
@options = {
|
98
|
+
:conditions => nil,
|
99
|
+
:csv_file_name => nil,
|
100
|
+
:csv_field_separator => Defaults::CSV_FIELD_SEPARATOR,
|
101
|
+
:custom_order => {},
|
102
|
+
:enable_export_to_csv => Defaults::ENABLE_EXPORT_TO_CSV,
|
103
|
+
:group => nil,
|
104
|
+
:include => nil,
|
105
|
+
:joins => nil,
|
106
|
+
:name => Defaults::GRID_NAME,
|
107
|
+
:order => nil,
|
108
|
+
:order_direction => Defaults::ORDER_DIRECTION,
|
109
|
+
:page => 1,
|
110
|
+
:page_method_name => Defaults::PAGE_METHOD_NAME,
|
111
|
+
:per_page => Defaults::PER_PAGE,
|
112
|
+
:saved_query => nil,
|
113
|
+
:total_entries => nil,
|
114
|
+
:with_paginated_resultset => nil,
|
115
|
+
:with_resultset => nil
|
116
|
+
}
|
117
|
+
rescue NameError
|
118
|
+
raise NameError.new('A constant is missing in wice_grid_config.rb: ' + $!.message +
|
119
|
+
'. This can happen when you upgrade the WiceGrid to a newer version with a new configuration constant. ' +
|
120
|
+
'Add the constant manually or re-run `bundle exec rails g wice_grid:install`.')
|
121
|
+
end
|
116
122
|
# validate parameters
|
117
123
|
opts.assert_valid_keys(@options.keys)
|
118
124
|
|
@@ -301,7 +307,7 @@ module Wice
|
|
301
307
|
else
|
302
308
|
# p @ar_options
|
303
309
|
relation = @relation.
|
304
|
-
|
310
|
+
send( @options[:page_method_name], @ar_options[:page]).
|
305
311
|
per( @ar_options[:per_page]).
|
306
312
|
includes(@ar_options[:include]).
|
307
313
|
joins( @ar_options[:joins]).
|
@@ -12,8 +12,13 @@ class WiceGridProcessor
|
|
12
12
|
|
13
13
|
|
14
14
|
process : (domIdToFocus)->
|
15
|
-
|
15
|
+
@visit @buildUrlWithParams(domIdToFocus)
|
16
16
|
|
17
|
+
visit : (path) ->
|
18
|
+
if Turbolinks?
|
19
|
+
Turbolinks.visit path
|
20
|
+
else
|
21
|
+
window.location = path
|
17
22
|
|
18
23
|
setProcessTimer : (domIdToFocus)->
|
19
24
|
|
@@ -30,7 +35,7 @@ class WiceGridProcessor
|
|
30
35
|
|
31
36
|
reloadPageForGivenGridState : (gridState)->
|
32
37
|
requestPath = @gridStateToRequest(gridState)
|
33
|
-
|
38
|
+
@visit @appendToUrl(@baseLinkForShowAllRecords, requestPath)
|
34
39
|
|
35
40
|
|
36
41
|
gridStateToRequest : (gridState)->
|
@@ -75,11 +80,11 @@ class WiceGridProcessor
|
|
75
80
|
|
76
81
|
|
77
82
|
reset : ->
|
78
|
-
|
83
|
+
@visit @baseRequestForFilter
|
79
84
|
|
80
85
|
|
81
86
|
exportToCsv : ->
|
82
|
-
|
87
|
+
@visit @linkForExport
|
83
88
|
|
84
89
|
|
85
90
|
register : (func)->
|
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.
|
3
|
+
s.version = '3.4.8'
|
4
4
|
s.homepage = 'https://github.com/leikind/wice_grid'
|
5
|
-
s.date = '2014-08-
|
5
|
+
s.date = '2014-08-27'
|
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,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wice_grid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.4.
|
4
|
+
version: 3.4.8
|
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-
|
11
|
+
date: 2014-08-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: kaminari
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: 0.13.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 0.13.0
|
27
27
|
description: A Rails grid plugin to create grids with sorting, pagination, and (automatically
|
@@ -35,7 +35,7 @@ executables: []
|
|
35
35
|
extensions: []
|
36
36
|
extra_rdoc_files: []
|
37
37
|
files:
|
38
|
-
- .gitignore
|
38
|
+
- ".gitignore"
|
39
39
|
- CHANGELOG
|
40
40
|
- Gemfile
|
41
41
|
- MIT-LICENSE
|
@@ -112,17 +112,17 @@ require_paths:
|
|
112
112
|
- lib
|
113
113
|
required_ruby_version: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - ">="
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
119
119
|
requirements:
|
120
|
-
- -
|
120
|
+
- - ">="
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '0'
|
123
123
|
requirements: []
|
124
124
|
rubyforge_project:
|
125
|
-
rubygems_version: 2.
|
125
|
+
rubygems_version: 2.2.2
|
126
126
|
signing_key:
|
127
127
|
specification_version: 3
|
128
128
|
summary: A Rails grid plugin to create grids with sorting, pagination, and (automatically
|