activeadmin_polymorphic 0.2.2 → 0.2.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: 43398c27e99911511850142ccc62840fe7379cce
4
- data.tar.gz: df4359fa2f201f03432e208c5029c1b556151198
3
+ metadata.gz: 6cbf1f0b0f079e6088f2a1ff29732358c233a904
4
+ data.tar.gz: 5b6a7163497ee3c62da16922e323c5a7edd48041
5
5
  SHA512:
6
- metadata.gz: 215e4a12f450e2841a318b4e1fc8e6bb6a5a4e23548a1ce1e8693a0fd8e413f829aea0626d837b3a16e548334cb32a05a43c7952f5fd44ee0be3d7062863bb72
7
- data.tar.gz: fa0b5bb262e1b5f2c8b46bf0aee195cf8bd044f73458cd0a739e3c6005131a3ea8f95dbb91ef3723e9d59d014d34dc37abae3a62bff64f9558b4654aadfba90e
6
+ metadata.gz: 64d0f628cdc26ae22a48b8d62ceb73ab2938966ef95c2c58994b51011f73c584c0b3bd6cf9a8055706f17a7a3a953acbbec68a6675f25e3b30699fe679b04a79
7
+ data.tar.gz: cde5452a87de323c0379408ef1af43c6c1b81186b310bc8df41b61641d47a6694cbe575ab3e9aa853daaf6c091398e14858d0860be02df6f561ed84e63811322
@@ -114,6 +114,8 @@ recompute_positions = (parent)->
114
114
 
115
115
  window.extractAndInsertForm = (url, target)->
116
116
  target = $ target
117
+ container = $(target).closest '.polymorphic_has_many_container'
118
+ container.trigger "polymorphic_has_many_form:beforeInsert", [ target ]
117
119
 
118
120
  $.ajax url,
119
121
  headers:
@@ -126,11 +128,10 @@ window.extractAndInsertForm = (url, target)->
126
128
 
127
129
  target.prepend form
128
130
 
129
- container = $(target).closest '.polymorphic_has_many_container'
130
131
  container.trigger "polymorphic_has_many_form:inserted", [form]
131
132
 
132
133
  window.loadErrors = (target) ->
133
- $(target).off('ajax:success').off('ajaxBeforeSend')
134
+ $(target).off('ajax:success').off('ajax:beforeSend')
134
135
  $(target).on 'ajax:beforeSend', (event, xhr, setting) ->
135
136
  xhr.setRequestHeader 'Accept', 'text/html'
136
137
  .trigger('submit.rails').on 'ajax:success', (event, data, result) ->
@@ -1,3 +1,3 @@
1
1
  module ActiveadminPolymorphic
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin_polymorphic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Petr Sergeev
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-10-07 00:00:00.000000000 Z
12
+ date: 2015-10-09 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: This gem extends formtastic's form builder to support polymoprhic has
15
15
  many relations in your forms