recordselect 3.2.11 → 3.3.0

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.
@@ -2,8 +2,8 @@
2
2
  controller ||= params[:controller]
3
3
 
4
4
  pagination_url_params = params.merge(:controller => controller, :action => :browse, :search => params[:search], :update => 1)
5
- prev_url = url_for(pagination_url_params.merge(:page => page.prev.number, :escape => false)) if page.prev?
6
- next_url = url_for(pagination_url_params.merge(:page => page.next.number, :escape => false)) if page.next?
5
+ prev_url = url_for(pagination_url_params.merge(:page => page.prev.number)) if page.prev?
6
+ next_url = url_for(pagination_url_params.merge(:page => page.next.number)) if page.next?
7
7
  -%>
8
8
  <ol>
9
9
  <li class="found"><%= rs_(:records_found, :count => page.pager.count,
@@ -1,4 +1,4 @@
1
- <% url_options = params.merge(:controller => controller, :action => :browse, :page => 1, :update => 1, :escape => false) -%>
1
+ <% url_options = params.merge(:controller => controller, :action => :browse, :page => 1, :update => 1) -%>
2
2
  <%= form_tag url_options, {:method => :get, :remote => true, :id => record_select_search_id} -%>
3
3
  <%= text_field_tag 'search', params[:search], :autocomplete => 'off', :class => 'text-input' %>
4
4
  <%= submit_tag 'search', :class => "search_submit" %>
@@ -31,7 +31,9 @@ module RecordSelect
31
31
  # define special list of selected fields,
32
32
  # mainly to define extra fields that can be used for
33
33
  # specialized sorting.
34
- def record_select_select; end
34
+ def record_select_select
35
+ '*'
36
+ end
35
37
 
36
38
  # generate conditions from params[:search]
37
39
  # override this if you want to customize the search routine
@@ -14,7 +14,7 @@ module RecordSelectHelper
14
14
  assert_controller_responds(options[:params][:controller])
15
15
 
16
16
  html = link_to_function(name, '', options[:html])
17
- html << javascript_tag("new RecordSelect.Dialog(#{options[:html][:id].to_json}, #{url_for(options[:params].merge(:escape => false)).to_json}, {onselect: #{options[:onselect] || ''}})")
17
+ html << javascript_tag("new RecordSelect.Dialog(#{options[:html][:id].to_json}, #{url_for(options[:params]).to_json}, {onselect: #{options[:onselect] || ''}})")
18
18
 
19
19
  return html
20
20
  end
@@ -49,7 +49,7 @@ module RecordSelectHelper
49
49
  end
50
50
 
51
51
  html = text_field_tag(name, nil, options.merge(:autocomplete => 'off', :onfocus => "this.focused=true", :onblur => "this.focused=false"))
52
- url = url_for({:action => :browse, :controller => controller.controller_path, :escape => false}.merge(params))
52
+ url = url_for({:action => :browse, :controller => controller.controller_path}.merge(params))
53
53
  html << javascript_tag("new RecordSelect.Single(#{options[:id].to_json}, #{url.to_json}, #{record_select_options.to_json});")
54
54
 
55
55
  return html
@@ -82,7 +82,7 @@ module RecordSelectHelper
82
82
  end
83
83
 
84
84
  html = text_field_tag(name, nil, options.merge(:autocomplete => 'off', :onfocus => "this.focused=true", :onblur => "this.focused=false"))
85
- url = url_for({:action => :browse, :controller => controller.controller_path, :escape => false}.merge(params))
85
+ url = url_for({:action => :browse, :controller => controller.controller_path}.merge(params))
86
86
  html << javascript_tag("new RecordSelect.Autocomplete(#{options[:id].to_json}, #{url.to_json}, #{record_select_options.to_json});")
87
87
 
88
88
  return html
@@ -134,7 +134,7 @@ module RecordSelectHelper
134
134
 
135
135
  # js identifier so we can talk to it.
136
136
  widget = "rs_%s" % name.gsub(/[\[\]]/, '_').chomp('_')
137
- url = url_for({:action => :browse, :controller => controller.controller_path, :escape => false}.merge(params))
137
+ url = url_for({:action => :browse, :controller => controller.controller_path}.merge(params))
138
138
  html << javascript_tag("#{widget} = new RecordSelect.Multiple(#{options[:id].to_json}, #{url.to_json}, #{record_select_options.to_json});")
139
139
 
140
140
  return html
@@ -167,7 +167,7 @@ module RecordSelectHelper
167
167
  def render_record_in_list(record, controller_path)
168
168
  text = render_record_from_config(record)
169
169
  if record_select_config.link?
170
- url_options = {:controller => controller_path, :action => :select, :id => record.id, :escape => false}
170
+ url_options = {:controller => controller_path, :action => :select, :id => record.id}
171
171
  link_to text, url_options, :method => :post, :remote => true, :class => ''
172
172
  else
173
173
  text
@@ -1,8 +1,8 @@
1
1
  module RecordSelect
2
2
  module Version
3
3
  MAJOR = 3
4
- MINOR = 2
5
- PATCH = 11
4
+ MINOR = 3
5
+ PATCH = 0
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: recordselect
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 11
5
5
  prerelease:
6
6
  segments:
7
7
  - 3
8
- - 2
9
- - 11
10
- version: 3.2.11
8
+ - 3
9
+ - 0
10
+ version: 3.3.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sergio Cambra
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2013-07-11 00:00:00 Z
20
+ date: 2013-09-06 00:00:00 Z
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
23
23
  prerelease: false