recordselect 4.0.12 → 4.0.14
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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0100b104f501f0cb53f9a7e3f00dcdf1b26ce8d30b3e5164b27bce921d664439
|
|
4
|
+
data.tar.gz: 5dabad84d0fd1e4503fae52f5b849ad1b01dc8fd725218cd6edc818ae1ecd7db
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c0ebca023d277014a9c8ee81504bda18e58b138e9c76025a94a84c76702c599d92eaed973d94167ba372acc67a9158d92dda55823a65dc011a4613956c14be10
|
|
7
|
+
data.tar.gz: b1c67959d8a54063ce08e4755b49021f298b976c87ab1c347a2aa9bb75fefd639fd0c87ea637000542c565f1cfd3e840431e8962cf43d3999bc4eb4387777dd0
|
|
@@ -160,6 +160,12 @@
|
|
|
160
160
|
jQuery(document).on('ajax:beforeSend', 'a.rs-mode', function() {
|
|
161
161
|
jQuery(this).closest('.record-select').find('form input[name="rs_mode"]').val(jQuery(this).data('value'));
|
|
162
162
|
});
|
|
163
|
+
jQuery(document).on('focus', 'input.recordselect', function() {
|
|
164
|
+
jQuery(this).prop('focused', true);
|
|
165
|
+
});
|
|
166
|
+
jQuery(document).on('blur', 'input.recordselect', function() {
|
|
167
|
+
jQuery(this).prop('focused', false);
|
|
168
|
+
});
|
|
163
169
|
});
|
|
164
170
|
|
|
165
171
|
RecordSelect.from_attributes = function(item) {
|
|
@@ -6,6 +6,6 @@ record_select_id = record_select_id(controller)
|
|
|
6
6
|
<%= render_record_select partial: 'search', locals: {controller: controller, record_select_id: record_select_id} %>
|
|
7
7
|
<%= render_record_select partial: 'list', locals: {controller: controller, page: @page, record_select_id: record_select_id} %>
|
|
8
8
|
</div>
|
|
9
|
-
<%= javascript_tag do %>
|
|
9
|
+
<%= javascript_tag nonce: true do %>
|
|
10
10
|
<%= render_record_select(partial: 'highlight', formats: [:js]) %>
|
|
11
11
|
<% end %>
|
|
@@ -5,7 +5,7 @@ module RecordSelectHelper
|
|
|
5
5
|
end
|
|
6
6
|
|
|
7
7
|
def record_select_js(type:, id:, url:, options:)
|
|
8
|
-
javascript_tag("new RecordSelect.#{type}(#{id.to_json}, #{url.to_json}, #{options.to_json});")
|
|
8
|
+
javascript_tag("new RecordSelect.#{type}(#{id.to_json}, #{url.to_json}, #{options.to_json});", nonce: true)
|
|
9
9
|
end
|
|
10
10
|
|
|
11
11
|
# Adds a link on the page that toggles a RecordSelect widget from the given controller.
|
|
@@ -69,7 +69,7 @@ module RecordSelectHelper
|
|
|
69
69
|
record_select_options.merge! options.delete(:rs) if options[:rs]
|
|
70
70
|
|
|
71
71
|
clear_button = options.delete(:clear_button)
|
|
72
|
-
options
|
|
72
|
+
options[:autocomplete] = 'off'
|
|
73
73
|
url = url_for({action: :browse, controller: controller.controller_path}.merge(params))
|
|
74
74
|
rs_data = {type: 'Single', id: options[:id], url: url, options: record_select_options}
|
|
75
75
|
options[:data] = rs_data.transform_keys { |k| "rs_#{k}" } unless js
|
|
@@ -107,7 +107,7 @@ module RecordSelectHelper
|
|
|
107
107
|
end
|
|
108
108
|
record_select_options.merge! options.delete(:rs) if options[:rs]
|
|
109
109
|
|
|
110
|
-
options
|
|
110
|
+
options[:autocomplete] = 'off'
|
|
111
111
|
url = url_for({action: :browse, controller: controller.controller_path}.merge(params))
|
|
112
112
|
rs_data = {type: 'Autocomplete', id: options[:id], url: url, options: record_select_options}
|
|
113
113
|
options[:data] = rs_data.transform_keys { |k| "rs_#{k}" } unless js
|
|
@@ -143,7 +143,7 @@ module RecordSelectHelper
|
|
|
143
143
|
record_select_options[:current] = current.inject([]) { |memo, record| memo.push({:id => record.id, :label => label_for_field(record, controller)}) }
|
|
144
144
|
record_select_options.merge! options.delete(:rs) if options[:rs]
|
|
145
145
|
|
|
146
|
-
options
|
|
146
|
+
options[:autocomplete] = 'off'
|
|
147
147
|
url = url_for({action: :browse, controller: controller.controller_path}.merge(params))
|
|
148
148
|
rs_data = {type: 'Multiple', id: options[:id], url: url, options: record_select_options}
|
|
149
149
|
options[:data] = rs_data.transform_keys { |k| "rs_#{k}" } unless js
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: recordselect
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 4.0.
|
|
4
|
+
version: 4.0.14
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Sergio Cambra
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2026-
|
|
13
|
+
date: 2026-07-15 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: bundler
|