wice_grid 3.0.1 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +11 -4
- data/VERSION +1 -1
- data/lib/wice_grid.rb +9 -15
- data/wice_grid.gemspec +68 -80
- metadata +13 -21
- data/.gitignore +0 -1
data/README.rdoc
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
= WiceGrid
|
2
2
|
|
3
|
-
Version:: 3.0.
|
3
|
+
Version:: 3.0.2
|
4
4
|
Author:: Yuri Leikind
|
5
5
|
Homepage:: http://leikind.org/pages/wicegrid
|
6
6
|
Examples online:: http://grid.leikind.org
|
@@ -11,9 +11,9 @@ Email:: "Yuri Leikind" <yuri.leikind at gmail dot com>
|
|
11
11
|
There are two major branches of WiceGrid.
|
12
12
|
|
13
13
|
THIS IS A VERSION OF THE PLUGIN FOR RAILS 3.0.
|
14
|
-
The current branch (https://github.com/leikind/wice_grid
|
14
|
+
The current branch (https://github.com/leikind/wice_grid) starts with version 3.0, works with Rails 3, and can only be used as a gem.
|
15
15
|
|
16
|
-
For Rails 2 WiceGrid only works as a Rails plugin. See WiceGrid version 0.6 (https://github.com/leikind/wice_grid/).
|
16
|
+
For Rails 2 WiceGrid only works as a Rails plugin. See WiceGrid version 0.6 (https://github.com/leikind/wice_grid/tree/master).
|
17
17
|
|
18
18
|
== Intro
|
19
19
|
|
@@ -339,7 +339,14 @@ Alternatively, instead of a Class object as the first parameter, you can use Ac
|
|
339
339
|
)
|
340
340
|
|
341
341
|
|
342
|
-
|
342
|
+
Please note that though all queries inside of WiceGrid are run without the default
|
343
|
+
scope, if you use an ActiveRecord::Relation instance to initialize grid, it will
|
344
|
+
already include the default scope. Thus you might consider using <tt>unscoped</tt>:
|
345
|
+
|
346
|
+
@tasks_grid = initialize_grid(Task.unscoped.
|
347
|
+
where(:archived => false, :projects => {:active => true}).
|
348
|
+
joins(:project)
|
349
|
+
)
|
343
350
|
|
344
351
|
=== Queries with join tables
|
345
352
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
3.0.
|
1
|
+
3.0.2
|
data/lib/wice_grid.rb
CHANGED
@@ -153,7 +153,6 @@ module Wice
|
|
153
153
|
|
154
154
|
@ar_options_formed = false
|
155
155
|
|
156
|
-
@method_scoping = @relation.send(:scoped_methods)[-1]
|
157
156
|
end
|
158
157
|
|
159
158
|
# A block executed from within the plugin to process records of the current page.
|
@@ -282,8 +281,12 @@ module Wice
|
|
282
281
|
|
283
282
|
def read #:nodoc:
|
284
283
|
form_ar_options
|
285
|
-
|
286
|
-
@resultset = self.output_csv?
|
284
|
+
@klass.unscoped do
|
285
|
+
@resultset = if self.output_csv?
|
286
|
+
@relation.find(:all, @ar_options)
|
287
|
+
else
|
288
|
+
@relation.paginate(@ar_options)
|
289
|
+
end
|
287
290
|
end
|
288
291
|
invoke_resultset_callbacks
|
289
292
|
end
|
@@ -464,15 +467,6 @@ module Wice
|
|
464
467
|
invoke_resultset_callback(@options[:with_resultset], lambda{self.send(:resultset_without_paging_with_user_filters)})
|
465
468
|
end
|
466
469
|
|
467
|
-
def with_exclusive_scope #:nodoc:
|
468
|
-
if @method_scoping
|
469
|
-
@relation.send(:with_exclusive_scope, @method_scoping) do
|
470
|
-
yield
|
471
|
-
end
|
472
|
-
else
|
473
|
-
yield
|
474
|
-
end
|
475
|
-
end
|
476
470
|
|
477
471
|
|
478
472
|
def add_custom_order_sql(fully_qualified_column_name) #:nodoc:
|
@@ -522,7 +516,7 @@ module Wice
|
|
522
516
|
|
523
517
|
def resultset_without_paging_without_user_filters #:nodoc:
|
524
518
|
form_ar_options
|
525
|
-
|
519
|
+
@klass.unscoped do
|
526
520
|
@relation.find(:all, :joins => @ar_options[:joins],
|
527
521
|
:include => @ar_options[:include],
|
528
522
|
:group => @ar_options[:group],
|
@@ -532,7 +526,7 @@ module Wice
|
|
532
526
|
|
533
527
|
def count_resultset_without_paging_without_user_filters #:nodoc:
|
534
528
|
form_ar_options
|
535
|
-
|
529
|
+
@klass.unscoped do
|
536
530
|
@relation.count(
|
537
531
|
:joins => @ar_options[:joins],
|
538
532
|
:include => @ar_options[:include],
|
@@ -545,7 +539,7 @@ module Wice
|
|
545
539
|
|
546
540
|
def resultset_without_paging_with_user_filters #:nodoc:
|
547
541
|
form_ar_options
|
548
|
-
|
542
|
+
@klass.unscoped do
|
549
543
|
@relation.find(:all, :joins => @ar_options[:joins],
|
550
544
|
:include => @ar_options[:include],
|
551
545
|
:group => @ar_options[:group],
|
data/wice_grid.gemspec
CHANGED
@@ -1,102 +1,90 @@
|
|
1
1
|
# Generated by jeweler
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{wice_grid}
|
8
|
-
s.version = "3.0.
|
8
|
+
s.version = "3.0.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
-
s.authors = [
|
12
|
-
s.date = %q{2011-
|
11
|
+
s.authors = [%q{Yuri Leikind}]
|
12
|
+
s.date = %q{2011-08-11}
|
13
13
|
s.description = %q{A Rails grid plugin to create grids with sorting, pagination, and (automatically generated) filters }
|
14
14
|
s.email = %q{yuri.leikind@gmail.com}
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"README.rdoc"
|
17
17
|
]
|
18
18
|
s.files = [
|
19
|
-
"
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
"wice_grid.gemspec"
|
19
|
+
"CHANGELOG",
|
20
|
+
"MIT-LICENSE",
|
21
|
+
"README.rdoc",
|
22
|
+
"Rakefile",
|
23
|
+
"SAVED_QUERIES_HOWTO.rdoc",
|
24
|
+
"VERSION",
|
25
|
+
"lib/generators/wice_grid/templates/calendarview.css",
|
26
|
+
"lib/generators/wice_grid/templates/calendarview.js",
|
27
|
+
"lib/generators/wice_grid/templates/icons/arrow_down.gif",
|
28
|
+
"lib/generators/wice_grid/templates/icons/arrow_up.gif",
|
29
|
+
"lib/generators/wice_grid/templates/icons/calendar_view_month.png",
|
30
|
+
"lib/generators/wice_grid/templates/icons/delete.png",
|
31
|
+
"lib/generators/wice_grid/templates/icons/expand.png",
|
32
|
+
"lib/generators/wice_grid/templates/icons/page_white_excel.png",
|
33
|
+
"lib/generators/wice_grid/templates/icons/page_white_find.png",
|
34
|
+
"lib/generators/wice_grid/templates/icons/table.png",
|
35
|
+
"lib/generators/wice_grid/templates/icons/table_refresh.png",
|
36
|
+
"lib/generators/wice_grid/templates/icons/tick_all.png",
|
37
|
+
"lib/generators/wice_grid/templates/icons/untick_all.png",
|
38
|
+
"lib/generators/wice_grid/templates/wice_grid.css",
|
39
|
+
"lib/generators/wice_grid/templates/wice_grid.yml",
|
40
|
+
"lib/generators/wice_grid/templates/wice_grid_config.rb",
|
41
|
+
"lib/generators/wice_grid/templates/wice_grid_jquery.js",
|
42
|
+
"lib/generators/wice_grid/templates/wice_grid_prototype.js",
|
43
|
+
"lib/generators/wice_grid/wice_grid_assets_jquery_generator.rb",
|
44
|
+
"lib/generators/wice_grid/wice_grid_assets_prototype_generator.rb",
|
45
|
+
"lib/grid_output_buffer.rb",
|
46
|
+
"lib/grid_renderer.rb",
|
47
|
+
"lib/helpers/js_calendar_helpers.rb",
|
48
|
+
"lib/helpers/wice_grid_misc_view_helpers.rb",
|
49
|
+
"lib/helpers/wice_grid_serialized_queries_view_helpers.rb",
|
50
|
+
"lib/helpers/wice_grid_view_helpers.rb",
|
51
|
+
"lib/js_adaptors/jquery_adaptor.rb",
|
52
|
+
"lib/js_adaptors/js_adaptor.rb",
|
53
|
+
"lib/js_adaptors/prototype_adaptor.rb",
|
54
|
+
"lib/table_column_matrix.rb",
|
55
|
+
"lib/tasks/wice_grid_tasks.rake",
|
56
|
+
"lib/view_columns.rb",
|
57
|
+
"lib/views/create.rjs",
|
58
|
+
"lib/views/create_jq.rjs",
|
59
|
+
"lib/views/delete.rjs",
|
60
|
+
"lib/views/delete_jq.rjs",
|
61
|
+
"lib/wice_grid.rb",
|
62
|
+
"lib/wice_grid_controller.rb",
|
63
|
+
"lib/wice_grid_core_ext.rb",
|
64
|
+
"lib/wice_grid_misc.rb",
|
65
|
+
"lib/wice_grid_serialized_queries_controller.rb",
|
66
|
+
"lib/wice_grid_serialized_query.rb",
|
67
|
+
"lib/wice_grid_spreadsheet.rb",
|
68
|
+
"test/.gitignore",
|
69
|
+
"test/database.yml",
|
70
|
+
"test/schema.rb",
|
71
|
+
"test/test_helper.rb",
|
72
|
+
"test/views/projects_and_people_grid.html.erb",
|
73
|
+
"test/views/projects_and_people_grid_invalid.html.erb",
|
74
|
+
"test/views/simple_projects_grid.html.erb",
|
75
|
+
"test/wice_grid_core_ext_test.rb",
|
76
|
+
"test/wice_grid_functional_test.rb",
|
77
|
+
"test/wice_grid_misc_test.rb",
|
78
|
+
"test/wice_grid_test.rb",
|
79
|
+
"test/wice_grid_view_helper_test.rb",
|
80
|
+
"wice_grid.gemspec"
|
82
81
|
]
|
83
82
|
s.homepage = %q{http://github.com/lekind/wice_grid}
|
84
|
-
s.
|
85
|
-
s.
|
86
|
-
s.rubygems_version = %q{1.3.7}
|
83
|
+
s.require_paths = [%q{lib}]
|
84
|
+
s.rubygems_version = %q{1.8.6}
|
87
85
|
s.summary = %q{Rails Grid Plugin}
|
88
|
-
s.test_files = [
|
89
|
-
"test/schema.rb",
|
90
|
-
"test/test_helper.rb",
|
91
|
-
"test/wice_grid_core_ext_test.rb",
|
92
|
-
"test/wice_grid_functional_test.rb",
|
93
|
-
"test/wice_grid_misc_test.rb",
|
94
|
-
"test/wice_grid_test.rb",
|
95
|
-
"test/wice_grid_view_helper_test.rb"
|
96
|
-
]
|
97
86
|
|
98
87
|
if s.respond_to? :specification_version then
|
99
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
100
88
|
s.specification_version = 3
|
101
89
|
|
102
90
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wice_grid
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 3
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 3.0.
|
9
|
+
- 2
|
10
|
+
version: 3.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Yuri Leikind
|
@@ -15,8 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
19
|
-
default_executable:
|
18
|
+
date: 2011-08-11 00:00:00 Z
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
22
21
|
name: will_paginate
|
@@ -26,11 +25,12 @@ dependencies:
|
|
26
25
|
requirements:
|
27
26
|
- - ">="
|
28
27
|
- !ruby/object:Gem::Version
|
29
|
-
hash:
|
28
|
+
hash: 1923831917
|
30
29
|
segments:
|
31
30
|
- 3
|
32
31
|
- 0
|
33
|
-
-
|
32
|
+
- pre
|
33
|
+
- 2
|
34
34
|
version: 3.0.pre2
|
35
35
|
type: :development
|
36
36
|
version_requirements: *id001
|
@@ -43,7 +43,6 @@ extensions: []
|
|
43
43
|
extra_rdoc_files:
|
44
44
|
- README.rdoc
|
45
45
|
files:
|
46
|
-
- .gitignore
|
47
46
|
- CHANGELOG
|
48
47
|
- MIT-LICENSE
|
49
48
|
- README.rdoc
|
@@ -106,13 +105,12 @@ files:
|
|
106
105
|
- test/wice_grid_test.rb
|
107
106
|
- test/wice_grid_view_helper_test.rb
|
108
107
|
- wice_grid.gemspec
|
109
|
-
has_rdoc: true
|
110
108
|
homepage: http://github.com/lekind/wice_grid
|
111
109
|
licenses: []
|
112
110
|
|
113
111
|
post_install_message:
|
114
|
-
rdoc_options:
|
115
|
-
|
112
|
+
rdoc_options: []
|
113
|
+
|
116
114
|
require_paths:
|
117
115
|
- lib
|
118
116
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -136,15 +134,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
136
134
|
requirements: []
|
137
135
|
|
138
136
|
rubyforge_project:
|
139
|
-
rubygems_version: 1.
|
137
|
+
rubygems_version: 1.8.6
|
140
138
|
signing_key:
|
141
139
|
specification_version: 3
|
142
140
|
summary: Rails Grid Plugin
|
143
|
-
test_files:
|
144
|
-
|
145
|
-
- test/test_helper.rb
|
146
|
-
- test/wice_grid_core_ext_test.rb
|
147
|
-
- test/wice_grid_functional_test.rb
|
148
|
-
- test/wice_grid_misc_test.rb
|
149
|
-
- test/wice_grid_test.rb
|
150
|
-
- test/wice_grid_view_helper_test.rb
|
141
|
+
test_files: []
|
142
|
+
|
data/.gitignore
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
.DS_Store
|