activeadmin_polymorphic 0.3.4 → 0.3.5

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: da7ac49dfde197907145a1a310e015bb25a1c0e0
4
- data.tar.gz: 54e5f2d90df40d8c8731605a3b7cf5ecb2933554
3
+ metadata.gz: 89d652e6a88b7ce4327646cad44fc0cdd63cae2c
4
+ data.tar.gz: c9f95aa20ff37fba5c53a1d81da9593262e89217
5
5
  SHA512:
6
- metadata.gz: 1fb3b7bce121b576871e4600b0dc20ff59ceeb8e57885dca54923df7727e003dd3a4e5d3a38d5dc12a2211c37eb5778f17407b2121006f5deecf1aeeae74fb11
7
- data.tar.gz: a7199a7aab10e3b83b8043cc09f20e061c2c9c0f54919be524c0e39c315ce39829d1c7a975d7600bfb0b1b3fd119b158aeeba8b6f9ca7cc1d0ecf431e1fbad13
6
+ metadata.gz: 3353a3768d0ba7b451b4bc38730c235aa74518ca26cb303db6c82b514baaf9ab3e3fb31d02356e7424835c83c56892c7f32610a34111cb272e2926293d3281ee
7
+ data.tar.gz: 3edaa0d7d23f75e9383274b77bd4211da38949932c3ef504c386d1226b30858ce92211d9d95f9bb86203f22f1341c2bda9264b6bfaae6c9a5925e94b64567e91
data/README.md CHANGED
@@ -67,8 +67,8 @@ This gem is a set of dirty hacks and tricks. Calling `polymorphic_has_many` make
67
67
  * for new records it generates a dropdown with polymorphic types
68
68
  * for exising records it generates two hidden fields with `id` and `type`
69
69
  * then the real JavaScript starts, it extracts whole forms from polymorphic models new or edit pages, strips form actions, and inserts those forms right into the parent form
70
- * when you try to submit forms, JavaScript submits subforms first; if subforms are invalid, it reloads them with erros and interupts the main form's submission process
71
- * after all subforms have been successfully saved, it strips them (because forms nested into other forms are simantically invalid, right?) and submits the parent form
70
+ * when you try to submit forms, JavaScript submits subforms first; if subforms are invalid, it reloads them with errors and interrupts the main form's submission process
71
+ * after all subforms have been successfully saved, it strips them (because forms nested into other forms are semantically invalid, right?) and submits the parent form
72
72
 
73
73
  # File uploads in subforms
74
74
 
@@ -8,8 +8,8 @@ Gem::Specification.new do |s|
8
8
  s.license = "MIT"
9
9
  s.name = "activeadmin_polymorphic"
10
10
  s.version = ActiveadminPolymorphic::VERSION
11
- s.authors = ["Petr Sergeev", "Sindre Moen"]
12
- s.email = ["peter@hyper.no", "sindre@hyper.no"]
11
+ s.authors = ["Petr Sergeev", "Sindre Moen", "Vasiliy Ermolovich"]
12
+ s.email = ["peter@hyper.no", "sindre@hyper.no", "younash@gmail.com"]
13
13
  s.description = 'This gem extends formtastic\'s form builder to support polymoprhic has many relations in your forms'
14
14
  s.summary = 'HasMany polymoprhic support for active admin.'
15
15
  s.homepage = "https://github.com/hyperoslo/activeadmin-polymorphic"
@@ -185,11 +185,17 @@ window.remoteSubmit = (target, callback) ->
185
185
  xhr.setRequestHeader 'Accept', 'application/json'
186
186
  .trigger('submit.rails')
187
187
  .on 'ajax:aborted:file', (inputs) ->
188
+ $(parentForm).trigger('ajax:complete.rails')
189
+
188
190
  false
189
191
  .on 'ajax:error', (event, response, status) ->
192
+ $(parentForm).trigger('ajax:complete.rails')
193
+
190
194
  if response.status == 422
191
195
  loadErrors(target)
192
196
  .on 'ajax:success', (event, object, status, response) ->
197
+ $(parentForm).trigger('ajax:complete.rails')
198
+
193
199
  unless $(target).next().find('input:first').val() # create
194
200
  $(target).next().find('input:first').val(object.id)
195
201
  # replace new form with edit form
@@ -1,3 +1,3 @@
1
1
  module ActiveadminPolymorphic
2
- VERSION = "0.3.4"
2
+ VERSION = "0.3.5"
3
3
  end
metadata CHANGED
@@ -1,15 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin_polymorphic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Petr Sergeev
8
8
  - Sindre Moen
9
+ - Vasiliy Ermolovich
9
10
  autorequire:
10
11
  bindir: bin
11
12
  cert_chain: []
12
- date: 2016-02-18 00:00:00.000000000 Z
13
+ date: 2016-12-01 00:00:00.000000000 Z
13
14
  dependencies:
14
15
  - !ruby/object:Gem::Dependency
15
16
  name: spinjs-rails
@@ -30,6 +31,7 @@ description: This gem extends formtastic's form builder to support polymoprhic h
30
31
  email:
31
32
  - peter@hyper.no
32
33
  - sindre@hyper.no
34
+ - younash@gmail.com
33
35
  executables: []
34
36
  extensions: []
35
37
  extra_rdoc_files: []