effective_bootstrap 0.9.21 → 0.9.22
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc2972eec59594f06ea675c943277a99d67ca6e1e75e30e10bcc7252c776a15d
|
4
|
+
data.tar.gz: 22debca767e9449ba70d890bd98d38e262641d39fcc6b7c53fd184f28a9d83ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f14eceace3be9ceead1d2fdec73c34959223e3a47684355da505d41165e4d68b3c24203c95d1b5009b58153725052f5c91398c6c6affd499ba3ca00ca35fd7df
|
7
|
+
data.tar.gz: 7a847310a0b44fae9ce81e7fb21f5cf89bfc43c2200bfafea61eddc6341adf32e1cb2b3d8e896d6add4c52a663b2d399e261b4e2a6b9d62897ffb17db1bc8802
|
@@ -4,6 +4,7 @@ this.EffectiveForm ||= new class
|
|
4
4
|
remote_form_commit: '' # String containing the last params[:commit]
|
5
5
|
remote_form_payload: '' # String containing html from server side render of this form
|
6
6
|
remote_form_flash: '' # Array of Arrays
|
7
|
+
remote_form_redirect: '' # String containing the redirect path (optional)
|
7
8
|
|
8
9
|
validate: (form) ->
|
9
10
|
valid = form.checkValidity()
|
@@ -73,6 +74,15 @@ this.EffectiveForm ||= new class
|
|
73
74
|
$target = $target.closest('form') unless $target.is('form')
|
74
75
|
$form = ''
|
75
76
|
|
77
|
+
if @remote_form_redirect.length > 0
|
78
|
+
if window.Turbolinks
|
79
|
+
window.Turbolinks.visit(@remote_form_redirect)
|
80
|
+
else
|
81
|
+
window.location.href = @remote_form_redirect
|
82
|
+
|
83
|
+
@remote_form_redirect = ''
|
84
|
+
return
|
85
|
+
|
76
86
|
if @remote_form_payload.length > 0
|
77
87
|
$payload = $("<div>#{@remote_form_payload}</div>")
|
78
88
|
$form = $payload.find("form[data-remote-index='#{$target.data('remote-index')}']")
|
@@ -160,7 +170,7 @@ this.EffectiveForm ||= new class
|
|
160
170
|
# This displays the spinner here, and directs any flash messages before and after loadRemoteForm
|
161
171
|
$(document).on 'click', '.form-actions a[data-remote],.form-actions button[type=submit]', (event) ->
|
162
172
|
EffectiveForm.setCurrentSubmit($(@).parent())
|
163
|
-
EffectiveForm.spin()
|
173
|
+
EffectiveForm.spin() unless $(@).attr('data-confirm')
|
164
174
|
|
165
175
|
# This actually attached the handlers to a remote ajax form when it or an action inside it triggers a remote thing.
|
166
176
|
$(document).on 'ajax:beforeSend', 'form[data-remote]', (event) ->
|
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.9.
|
4
|
+
version: 0.9.22
|
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: 2021-04-
|
11
|
+
date: 2021-04-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|