inline_forms 1.6.54 → 1.6.55
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YjUzODU3NDkyNjM2Y2Q1YjA3YTMxZTYxODlhZjA3NjJiMDVlNTlhOA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZDg2NTMzMWUxNDk0YzZiNTk5NGEzODY3MDQ0Y2EwZWJiZjMxOWVmNg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZmI5MDU3NzgwZDYyMzViNDlhMzExNDA4OTM5YWJkMzRjYmZhODY3Yzc0OTRh
|
10
|
+
NTU1NmQ0MjRkNGE1YzliMmUwN2EyNTc5ODYyNjI4OTY5YTFhNWZkYTJiNzE0
|
11
|
+
Yjc3MDJjMTFhN2UwZTQ5NGZmNjU1Mzk4NjczYmU4YTg5ZTlmNGE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZjBjYzhlYmRiMzI0NDhiOWM4ZDc4MTUyODMzMjQ2NmFlYWMxZWQ2NGY4MDQ5
|
14
|
+
OGM5MGNhOTRjZDY4NGZmNjBkZWM2ZWUzNDllMDIxMWFmMjAxNjhlNjRlNGQ4
|
15
|
+
NDIzYThkYzdjZGJkYzgwMWVjYjhjZmJkZjQ4M2I2OTE1ZDNjOTg=
|
@@ -7,7 +7,7 @@ def dropdown_with_other_show(object, attribute)
|
|
7
7
|
id = object[foreign_key]
|
8
8
|
if id == 0
|
9
9
|
attribute_value = object[attribute.to_s + '_other']
|
10
|
-
attribute_value = "<i class='fi-plus'></i>".html_safe if attribute_value.
|
10
|
+
attribute_value = "<i class='fi-plus'></i>".html_safe if attribute_value.nil? || attribute_value.empty?
|
11
11
|
else
|
12
12
|
attribute_value = object.send(attribute)._presentation rescue "<i class='fi-plus'></i>".html_safe
|
13
13
|
end
|
@@ -30,7 +30,7 @@ def dropdown_with_other_edit(object, attribute)
|
|
30
30
|
collection = values.map {|v|[v.name, v.id]}
|
31
31
|
collection << [object[attribute.to_s + '_other'], 0] unless object[attribute.to_s + '_other'].nil? || object[attribute.to_s + '_other'].empty?
|
32
32
|
out = '<div class="ui-widget">'
|
33
|
-
out << select('_' + object.class.to_s.underscore, foreign_key.to_sym, collection, {selected: object[foreign_key.to_sym], prompt: 'maake een keuze', id: '_' + object.class.to_s.underscore + '_' + foreign_key.to_s})
|
33
|
+
out << select('_' + object.class.to_s.underscore, foreign_key.to_sym, collection, {selected: object[foreign_key.to_sym], prompt: 'maake een keuze'}, {id: '_' + object.class.to_s.underscore + '_' + object.id.to_s + '_' + foreign_key.to_s})
|
34
34
|
# collection_select( ('_' + object.class.to_s.underscore).to_sym, attribute.to_s.foreign_key.to_sym, values, 'id', 'name', :selected => object.send(attribute).id)
|
35
35
|
out << '</div>
|
36
36
|
<script>
|
@@ -128,7 +128,7 @@ def dropdown_with_other_edit(object, attribute)
|
|
128
128
|
|
129
129
|
$(function() {
|
130
130
|
$( "'
|
131
|
-
out << '#_' + object.class.to_s.underscore + '_' + attribute.to_s.foreign_key.to_s
|
131
|
+
out << '#_' + object.class.to_s.underscore + '_' + object.id.to_s + '_' + attribute.to_s.foreign_key.to_s
|
132
132
|
out << '" ).combobox();
|
133
133
|
});
|
134
134
|
</script>'
|
data/lib/inline_forms/version.rb
CHANGED