jqgrid_rails 1.2.1 → 1.2.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/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,7 @@
1
+ == v1.2.2
2
+ * Use jQuery for iterations
3
+ * Allow request method to be defined for excel exports
4
+
1
5
  == v1.2.1
2
6
  * Auto select blank values in filter select boxes to combat Webkit ordering issues
3
7
 
@@ -146,13 +146,13 @@ module JqGridRails
146
146
  link_toolbar_add(
147
147
  :name => name,
148
148
  :empty_selection => true,
149
- :method => :post,
149
+ :method => @options[:excel_request_method] || :post,
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
153
  vals = jQuery(#{convert_dom_id(@table_id)}).jqGrid('getGridParam', 'postData');
154
154
  res = {};
155
- Object.keys(vals).each(function(key){
155
+ jQuery(Object.keys(vals)).each(function(idx,key){
156
156
  res[key] = vals[key];
157
157
  });
158
158
  res['rows'] = 10000000;
@@ -173,7 +173,7 @@ module JqGridRails
173
173
  jQuery('body').append('<form id=\"jqgrid_redirector_#{randomizer}\" action=\"#{args[:url]}#{args[:args_replacements]}\" method=\"#{args[:method]}\">' + csrf_token + '</form>');"
174
174
  if(hash[:ajax_args] && hash[:ajax_args][:data])
175
175
  output << "var args = #{format_type_to_js(hash[:ajax_args][:data])};
176
- Object.keys(args).each(function(key){
176
+ jQuery(Object.keys(args)).each(function(idx,key){
177
177
  jQuery('#{format_id("jqgrid_redirector_#{randomizer}")}').append(jQuery('<input/>')
178
178
  .attr('type', 'hidden')
179
179
  .attr('name', key)
@@ -13,5 +13,5 @@ module JqGridRails
13
13
  end
14
14
  end
15
15
 
16
- VERSION = Version.new('1.2.1')
16
+ VERSION = Version.new('1.2.2')
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: 29
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 1
10
- version: 1.2.1
9
+ - 2
10
+ version: 1.2.2
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-02-29 00:00:00 -08:00
18
+ date: 2012-03-01 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency