jqgrid_rails 1.2.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,6 @@
1
+ == v1.2.3
2
+ * Add more parameter grabbing for excel generation
3
+
1
4
  == v1.2.2
2
5
  * Use jQuery for iterations
3
6
  * Allow request method to be defined for excel exports
Binary file
@@ -150,8 +150,23 @@ module JqGridRails
150
150
  :url => RawJS.new("' + jQuery(#{convert_dom_id(@table_id)}).jqGrid('getGridParam', 'url') + '"),
151
151
  :ajax_args => {
152
152
  :data => RawJS.new("(function(){
153
- vals = jQuery(#{convert_dom_id(@table_id)}).jqGrid('getGridParam', 'postData');
154
- res = {};
153
+ var res = {};
154
+ var grid_url = jQuery(#{convert_dom_id(@table_id)}).jqGrid('getGridParam', 'url');
155
+ var vals = jQuery(#{convert_dom_id(@table_id)}).jqGrid('getGridParam', 'postData');
156
+ jQuery(
157
+ grid_url.substr(grid_url.indexOf('?'), grid_url.length)
158
+ .split('&')
159
+ ).each(function(idx,val){
160
+ var x = val.split('=');
161
+ var key = decodeURIComponent(x[0]);
162
+ var value = decodeURIComponent(x[1]);
163
+ if(key.substr(key.length - 2, key.length) == '[]'){
164
+ res[key.substr(0, key.length - 2)] = [];
165
+ res[key.substr(0, key.length - 2)].push(value);
166
+ } else {
167
+ res[key] = value;
168
+ }
169
+ });
155
170
  jQuery(Object.keys(vals)).each(function(idx,key){
156
171
  res[key] = vals[key];
157
172
  });
@@ -13,5 +13,5 @@ module JqGridRails
13
13
  end
14
14
  end
15
15
 
16
- VERSION = Version.new('1.2.2')
16
+ VERSION = Version.new('1.2.3')
17
17
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jqgrid_rails
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 2
10
- version: 1.2.2
9
+ - 3
10
+ version: 1.2.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Chris Roberts
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-03-01 00:00:00 -08:00
18
+ date: 2012-03-02 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -61,6 +61,7 @@ extra_rdoc_files:
61
61
  files:
62
62
  - init.rb
63
63
  - jqgrid_rails.gemspec
64
+ - jqgrid_rails-1.2.2.gem
64
65
  - LICENSE.rdoc
65
66
  - README.rdoc
66
67
  - lib/jqgrid_rails/railtie.rb