inline_forms 1.6.54 → 1.6.55

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NjA1YTU5ZDE2NzU2NTU3Zjk4ZDlhNGI4ZjA5ZjMyYTQ5NzkwM2UyOQ==
4
+ YjUzODU3NDkyNjM2Y2Q1YjA3YTMxZTYxODlhZjA3NjJiMDVlNTlhOA==
5
5
  data.tar.gz: !binary |-
6
- YTU3YmI4NzQ3NTdiMjEzOTMyNWEyMjIyOTI5NzRlOGVlNjhlYWEyNw==
6
+ ZDg2NTMzMWUxNDk0YzZiNTk5NGEzODY3MDQ0Y2EwZWJiZjMxOWVmNg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YWViZWNlMzVjMjI5NDJlODg0M2FjYWYxNDZmMTcwYjVjOTY0OTY3MWU1YTI5
10
- ZTE4ZGFiNjZlY2JhOGJkZWNjN2RiZDliNjZiMjRlNzhkMzcwMGQ5YTg2ZDQ4
11
- N2IwMTlhYmE4ZTJlYTY4ZTI3MjgzMDY4YjljNGRlMTA3MjI3NWI=
9
+ ZmI5MDU3NzgwZDYyMzViNDlhMzExNDA4OTM5YWJkMzRjYmZhODY3Yzc0OTRh
10
+ NTU1NmQ0MjRkNGE1YzliMmUwN2EyNTc5ODYyNjI4OTY5YTFhNWZkYTJiNzE0
11
+ Yjc3MDJjMTFhN2UwZTQ5NGZmNjU1Mzk4NjczYmU4YTg5ZTlmNGE=
12
12
  data.tar.gz: !binary |-
13
- NDgxMDNmNTk3ZGJmNDNiOTJiODYxMmIyY2U0NDhkMjk2Yzg3MGUwNjJiMTcy
14
- NzUxNGM0MTUyYjJhNDIzYmVjZGQ4NzA5ZDRmOGQ2MTY3ZmNiNjU3NGIxNzRl
15
- NzM2MGU3MmI0NTE2NjMzNjFhYmYwMGNmODgyOWUzODQ5ZGQ0NGM=
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.empty? || attribute_value.nil?
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>'
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module InlineForms
3
- VERSION = "1.6.54"
3
+ VERSION = "1.6.55"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inline_forms
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.54
4
+ version: 1.6.55
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ace Suares