effective_bootstrap 0.0.28 → 0.0.29
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c5b5ab69922453107c33ee2e23222f74fb5ad91a
|
4
|
+
data.tar.gz: 9c372c210a203b2c47473f78d01b91852f4ab243
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c78fd7b598bd7a5f67167aabe94ba789ee12d060bf273199380ce35fbf28bc50bf93a7ce9487d786a9e2ad954b9715f914704285058ec709373e3df2b63296de
|
7
|
+
data.tar.gz: e024f7950477fcc310626f3cf783d294394f0fd75148ee66f48bfdb47fb5c0eb71aff54abbcfeaa1834ce3e674f6ebf2d71fae4492c53f6c79e3c75e1017e006
|
@@ -1,5 +1,6 @@
|
|
1
1
|
this.EffectiveForm ||= new class
|
2
2
|
current_submit: '' # The $(.form-actions) that clicked
|
3
|
+
current_delete: '' # If there's a rails ujs_delete link with the data-closeset selector, use this.
|
3
4
|
remote_form_payload: '' # String containing html from server side render of this form
|
4
5
|
remote_form_flash: '' # Array of Arrays
|
5
6
|
|
@@ -108,6 +109,13 @@ this.EffectiveForm ||= new class
|
|
108
109
|
|
109
110
|
setCurrentSubmit: ($submit) -> @current_submit = $submit if $submit.is('.form-actions')
|
110
111
|
|
112
|
+
setCurrentDelete: ($delete) -> @current_delete = $delete
|
113
|
+
|
114
|
+
finishDelete: ->
|
115
|
+
if @current_delete.length > 0
|
116
|
+
@current_delete.fadeOut('slow', -> $(this).remove())
|
117
|
+
@current_delete = ''
|
118
|
+
|
111
119
|
# Sets EffectiveBootstrap. current_click.
|
112
120
|
# This displays the spinner here, and directs any flash messages before and after loadRemoteForm
|
113
121
|
$(document).on 'click', '.form-actions a[data-remote],.form-actions button[type=submit]', (event) ->
|
@@ -118,3 +126,7 @@ $(document).on 'click', '.form-actions a[data-remote],.form-actions button[type=
|
|
118
126
|
$(document).on 'ajax:beforeSend', 'form[data-remote]', (event) ->
|
119
127
|
EffectiveForm.beforeAjax($(@))
|
120
128
|
this.checkValidity()
|
129
|
+
|
130
|
+
$(document).on 'ajax:beforeSend', '[data-method=delete]', (event) ->
|
131
|
+
if ($delete = $(@)).data('closest')
|
132
|
+
EffectiveForm.setCurrentDelete($delete.closest($delete.data('closest')))
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_bootstrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.29
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-06-
|
11
|
+
date: 2018-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|