gridify 0.1.1 → 0.1.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/VERSION +1 -1
- data/gridify.gemspec +1 -1
- data/lib/gridify/grid_column.rb +6 -6
- data/lib/gridify/grid_finder.rb +2 -2
- data/lib/gridify/grid_options.rb +7 -9
- data/lib/gridify/grid_view.rb +2 -2
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/gridify.gemspec
CHANGED
data/lib/gridify/grid_column.rb
CHANGED
@@ -73,12 +73,12 @@ module Gridify
|
|
73
73
|
def jqgrid_type
|
74
74
|
return sortable unless sortable==true
|
75
75
|
case value_type
|
76
|
-
when :string
|
77
|
-
when :text
|
78
|
-
when :integer
|
79
|
-
when :float
|
80
|
-
when :boolean
|
81
|
-
when :datetime
|
76
|
+
when :string then 'text'
|
77
|
+
when :text then 'text'
|
78
|
+
when :integer then 'integer'
|
79
|
+
when :float then 'float'
|
80
|
+
when :boolean then 'boolean'
|
81
|
+
when :datetime then 'date'
|
82
82
|
end
|
83
83
|
end
|
84
84
|
|
data/lib/gridify/grid_finder.rb
CHANGED
@@ -58,7 +58,7 @@ module Gridify
|
|
58
58
|
total_pages = total_count / rows_per_page + 1
|
59
59
|
#TODO: :only => [attributes], :methods => [virtual attributes]
|
60
60
|
case data_type
|
61
|
-
when :xml
|
61
|
+
when :xml then
|
62
62
|
xml = records.to_xml( :skip_types => true, :dasherize => false ) do |xml|
|
63
63
|
if rows_per_page > 0
|
64
64
|
xml.page current_page
|
@@ -67,7 +67,7 @@ module Gridify
|
|
67
67
|
end
|
68
68
|
end
|
69
69
|
|
70
|
-
when :json
|
70
|
+
when :json then
|
71
71
|
#debugger
|
72
72
|
data = { resource => records }
|
73
73
|
if rows_per_page > 0
|
data/lib/gridify/grid_options.rb
CHANGED
@@ -170,11 +170,10 @@ module Gridify
|
|
170
170
|
|
171
171
|
# header layer
|
172
172
|
def title
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
else
|
173
|
+
case @title
|
174
|
+
when String then @title
|
175
|
+
when true then resource.titleize
|
176
|
+
else
|
178
177
|
(' ' if collapsible || collapsed) #show header with blank title
|
179
178
|
end
|
180
179
|
end
|
@@ -185,10 +184,9 @@ module Gridify
|
|
185
184
|
|
186
185
|
# pager layer
|
187
186
|
def pager
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
dom_id+'_pager'
|
187
|
+
case @pager
|
188
|
+
when String then @pager
|
189
|
+
when true then dom_id+'_pager'
|
192
190
|
end
|
193
191
|
end
|
194
192
|
|
data/lib/gridify/grid_view.rb
CHANGED
@@ -126,13 +126,13 @@ module Gridify
|
|
126
126
|
vals['gridview'] = true # faster views, NOTE theres cases when this needs to be disabled
|
127
127
|
|
128
128
|
case width_fit
|
129
|
-
when :fitted
|
129
|
+
when :fitted then
|
130
130
|
#vals[:autowidth] = false #default
|
131
131
|
#vals[:shrinkToFit] = true #default
|
132
132
|
vals['forceFit'] = true
|
133
133
|
vals['width'] = width if width
|
134
134
|
|
135
|
-
when :scroll
|
135
|
+
when :scroll then
|
136
136
|
#vals[:autowidth] = false #default
|
137
137
|
vals['shrinkToFit'] = false
|
138
138
|
#vals['forceFit'] = #ignored by jqGrid
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 2
|
9
|
+
version: 0.1.2
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- swalke16
|
@@ -109,7 +109,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
109
109
|
requirements:
|
110
110
|
- - ">="
|
111
111
|
- !ruby/object:Gem::Version
|
112
|
-
hash:
|
112
|
+
hash: 4343728898991169038
|
113
113
|
segments:
|
114
114
|
- 0
|
115
115
|
version: "0"
|