dynaspan 0.1.3.beta1 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e9b455af36f7c95a7137eb21eaf324fde00ea1f2
|
4
|
+
data.tar.gz: fcb4fe125d655e073758f0abac44b2e482d9ec03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a64c0720b725150455340c76ef4a582840289f8885185eb1fbcc7991de51dd60c881f40f80999aec0cbedb6ef46fcb64b08afa407f84b12c227fbc106a083996
|
7
|
+
data.tar.gz: 93241c205fda5b256c85baaaa90c277b723e905a4ebe7786a4094c2c91c801052454cf9c5b4f1816bee2206ffc406635d8a91f3adefbc9820be77ebb8bfd00d3
|
@@ -50,14 +50,14 @@ module Dynaspan
|
|
50
50
|
master_ds_object: master_ds_object,
|
51
51
|
attr_object: attr_object,
|
52
52
|
attrib: attrib,
|
53
|
-
unique_ref_id: options.fetch(:unique_id) { [to_id(master_ds_object), to_id(attr_object), attrib].join },
|
53
|
+
unique_ref_id: options.fetch(:unique_id) { [to_id(master_ds_object), to_id(attr_object), attrib, SecureRandom.hex(3)].join },
|
54
54
|
dyna_span_edit_text: edit_text,
|
55
55
|
hidden_fields: options[:hidden_fields],
|
56
56
|
ds_callback_on_update: options[:callback_on_update],
|
57
57
|
ds_callback_with_values: options[:callback_with_values],
|
58
58
|
form_for_options: options[:form_for],
|
59
|
-
|
60
|
-
|
59
|
+
choices: options[:choices], # For form 'select' field
|
60
|
+
options: options.fetch(:options) { Hash.new }, # For form 'select' field
|
61
61
|
html_options: options[:html_options],
|
62
62
|
block: block
|
63
63
|
}
|
@@ -9,10 +9,10 @@
|
|
9
9
|
<% hidden_fields.each do |hkey, hval| %>
|
10
10
|
<%= a.hidden_field hkey.to_sym, value: hval %>
|
11
11
|
<% end if hidden_fields %>
|
12
|
-
<%= a.select( attrib,
|
12
|
+
<%= a.select( attrib, choices, options.symbolize_keys, {**html_options.symbolize_keys, id: "dyna_span_field_val_#{unique_ref_id}", onfocus: "$().dynaspan.upLast('#{unique_ref_id}');", onblur: "$().dynaspan.upHide('#{unique_ref_id}');"}, &block) %>
|
13
13
|
<% end %>
|
14
14
|
<% else %>
|
15
|
-
<%= f.select( attrib,
|
15
|
+
<%= f.select( attrib, choices, options.symbolize_keys, {**html_options.symbolize_keys, id: "dyna_span_field_val_#{unique_ref_id}", onfocus: "$().dynaspan.upLast('#{unique_ref_id}');", onblur: "$().dynaspan.upHide('#{unique_ref_id}');"}, &block) %>
|
16
16
|
<% hidden_fields.each do |hkey, hval| %>
|
17
17
|
<%= f.hidden_field hkey.to_sym, value: hval %>
|
18
18
|
<% end if hidden_fields %>
|
data/lib/dynaspan/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dynaspan
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.3
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel P. Clark
|
@@ -49,9 +49,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
49
49
|
version: '2.0'
|
50
50
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: '0'
|
55
55
|
requirements:
|
56
56
|
- jQuery
|
57
57
|
- Rails
|