activeadmin_polymorphic 0.1.2 → 0.2.0
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,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1c4fce0fe59e3a10c877f1e40619e8a3964a19f7
|
|
4
|
+
data.tar.gz: fcd7e792b07b0ff7f89aaa9f96f05def9a04b505
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6a5cdd32891e76588e5cdc4c624270ce751e3073262b4f4a5acf3aa34fd4abf2eeff5fdbefea9b29555c46c9174c90c7dc159156e61bcc59c2ddf91de4ce2a56
|
|
7
|
+
data.tar.gz: 873e4d2c73b2ce01ba1ced5ab8ebad3fa91f3691c603faa0e38effebe1484c33850631e5953154660cc325578db6ae5475d914d9f527f463005eb04b63f45d01
|
|
@@ -34,7 +34,6 @@ $ ->
|
|
|
34
34
|
|
|
35
35
|
extractAndInsertForm formPath, rapper
|
|
36
36
|
|
|
37
|
-
|
|
38
37
|
$(document).on 'click', 'a.button.polymorphic_has_many_remove', (e)->
|
|
39
38
|
e.preventDefault()
|
|
40
39
|
parent = $(@).closest '.polymorphic_has_many_container'
|
|
@@ -63,7 +62,6 @@ $ ->
|
|
|
63
62
|
|
|
64
63
|
init_polymorphic_sortable()
|
|
65
64
|
|
|
66
|
-
|
|
67
65
|
$('.polymorphic_has_many_container').on 'change', '.polymorphic_type_select', (event) ->
|
|
68
66
|
fieldset = $(this).closest 'fieldset'
|
|
69
67
|
|
|
@@ -114,7 +112,7 @@ recompute_positions = (parent)->
|
|
|
114
112
|
if sortable_input.length
|
|
115
113
|
sortable_input.val if destroy_input.is ':checked' then '' else position++
|
|
116
114
|
|
|
117
|
-
window.extractAndInsertForm= (url, target)->
|
|
115
|
+
window.extractAndInsertForm = (url, target)->
|
|
118
116
|
target = $ target
|
|
119
117
|
|
|
120
118
|
$.get url, (data)->
|
|
@@ -125,6 +123,9 @@ window.extractAndInsertForm= (url, target)->
|
|
|
125
123
|
|
|
126
124
|
target.prepend form
|
|
127
125
|
|
|
126
|
+
container = $(target).closest '.polymorphic_has_many_container'
|
|
127
|
+
container.trigger "polymorphic_has_many_form:inserted", [form]
|
|
128
|
+
|
|
128
129
|
window.loadErrors = (target) ->
|
|
129
130
|
$(target).off('ajax:success') # unbind successfull action for json form
|
|
130
131
|
$(target).trigger('submit.rails').on 'ajax:success', (event, data, result) ->
|
|
@@ -136,7 +137,6 @@ window.loadErrors = (target) ->
|
|
|
136
137
|
|
|
137
138
|
$(target).replaceWith(form)
|
|
138
139
|
|
|
139
|
-
|
|
140
140
|
window.remoteSubmit = (target, callback)->
|
|
141
141
|
$(target).data('remote', true)
|
|
142
142
|
$(target).removeAttr('novalidate')
|
|
@@ -169,4 +169,3 @@ window.remoteSubmit = (target, callback)->
|
|
|
169
169
|
$(target).remove()
|
|
170
170
|
|
|
171
171
|
callback()
|
|
172
|
-
|
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.
|
|
4
|
+
version: 0.2.0
|
|
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-04-
|
|
12
|
+
date: 2015-04-28 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
|