flexite 0.0.3 → 0.0.4

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: 63dfd3a5a6e385f71c19663ad3baa5638e8fc29e
4
- data.tar.gz: 189ee657807f3b2d7e502a542252c57b6993db85
3
+ metadata.gz: a88e76842f315c82ea98a437022148f5094cf069
4
+ data.tar.gz: 6c3f408e1707d11e1d0343beec283e12e3261ae1
5
5
  SHA512:
6
- metadata.gz: 12025176c14c3c4ef1559e9cfc385181fc37e319c7732ddc07319ed6101932e4062684038106257df654d19cce3709d7527da1faf81719441b895f958b38c4b0
7
- data.tar.gz: 6b712735f3a2e606f2ca5ee2a20fc5de1de6dfbed5a4edb248b23f3d8a17f1af3fddf610d4a41e5fb3a930e516b545754b97e29394e947403715255dafd9e7ec
6
+ metadata.gz: 2f84344a75804aa160887f74a590d9873e8c819affbed1b39ff92eff7cdcd238f020b31b8b652a331e6898b203c1bd7912324e86b02851a1e16c64a3c08808fb
7
+ data.tar.gz: 1b2c5596ac5f3fc0b7c0d4b438f48a6afa779a2d43ca24cbebc0252f6a7d69a943691f342c3df7a29002219ea7a727063fa3310e277dd6505a5b56137dd950f6
@@ -2,18 +2,18 @@
2
2
 
3
3
  .form-group.form-inline
4
4
  = entry_type_select
5
- = f.button :button, 'Add entry', type: :button, class: 'btn btn-success', id: "add_array_entry-#{f.object.id}"
5
+ = f.button :button, 'Add entry', type: :button, class: 'btn btn-success', id: "add-entry-to-#{f.object_name}-#{f.object.id}-#{f.options[:index]}"
6
6
  - if local_assigns[:delete_link].present?
7
7
  = delete_link
8
8
 
9
9
  -# TODO: fix index population related to array entry vs simple entry
10
10
  :javascript
11
- $flexite("#add_array_entry-#{f.object.id}").on("click", function () {
11
+ $flexite("[id='add-entry-to-#{f.object_name}-#{f.object.id}-#{f.options[:index]}']").on("click", function () {
12
12
  $flexite.get("#{new_array_entries_path}", {
13
13
  parent_id: "#{f.object.id}",
14
14
  form_index: "#{f.options[:index]}",
15
15
  prefix: "#{f.object_name}",
16
- index: $flexite("[id^='entry_new_entries_'][id$='_value']").size(),
16
+ index: $flexite("[id^='entry_new_entries_'][id$='type']").size(),
17
17
  type: $flexite(this).parent().find("#new_entry_type").val()
18
18
  });
19
19
  });
@@ -1,3 +1,3 @@
1
1
  module Flexite
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
Binary file