effective_bootstrap 0.5.1 → 0.5.2
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: 414f98769a02f734a5fadf2836a52d68c2c65484
|
4
|
+
data.tar.gz: 28d606b988da8a8ce4446fc95ba51cb203502125
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ae3da9c073dac7889c66ecbfd376a35489aab1b0ffafa870ef7c8af5c5794b06d77ea4c00c680cf3ff4020d7057adbd28bee630c83b62454fdec5d29c5a4a31
|
7
|
+
data.tar.gz: e530b5b21de9ef12feaf392165fe2bfaea69568b31e0d02a0e90575e07b4963deacc006ecc338aa7c600a652e40a1e4630e65c505bc03c4e39d13a958248c7d0
|
@@ -144,13 +144,13 @@ this.EffectiveForm ||= new class
|
|
144
144
|
# Sets EffectiveBootstrap. current_click.
|
145
145
|
# This displays the spinner here, and directs any flash messages before and after loadRemoteForm
|
146
146
|
$(document).on 'click', '.form-actions a[data-remote],.form-actions button[type=submit]', (event) ->
|
147
|
-
$
|
148
|
-
$form = $
|
147
|
+
$submits = $(@).parent()
|
148
|
+
$form = $submits.closest('form')
|
149
149
|
|
150
|
-
if ($form.attr('method') || '').toLowerCase() == 'get'
|
151
|
-
setTimeout((-> EffectiveForm.reset($form)),
|
150
|
+
if $submits.hasClass('form-actions-reset') || ($form.attr('method') || '').toLowerCase() == 'get'
|
151
|
+
setTimeout((-> EffectiveForm.reset($form)), 2500)
|
152
152
|
|
153
|
-
EffectiveForm.setCurrentSubmit($
|
153
|
+
EffectiveForm.setCurrentSubmit($submits)
|
154
154
|
EffectiveForm.spin()
|
155
155
|
|
156
156
|
# This actually attached the handlers to a remote ajax form when it or an action inside it triggers a remote thing.
|
@@ -33,6 +33,7 @@ module Effective
|
|
33
33
|
'form-group form-actions',
|
34
34
|
('form-actions-inline' if inline?),
|
35
35
|
('form-actions-bordered' if border?),
|
36
|
+
('form-actions-reset' if reset?),
|
36
37
|
('justify-content-start' if left? && layout == :vertical),
|
37
38
|
('justify-content-center' if center? && layout == :vertical),
|
38
39
|
('justify-content-end' if right? && layout == :vertical)
|
@@ -77,6 +78,11 @@ module Effective
|
|
77
78
|
@right = (options.delete(:right) || false)
|
78
79
|
end
|
79
80
|
|
81
|
+
def reset?
|
82
|
+
return @reset unless @reset.nil?
|
83
|
+
@reset = (options.delete(:reset) || false)
|
84
|
+
end
|
85
|
+
|
80
86
|
def icon_name
|
81
87
|
return @icon unless @icon.nil?
|
82
88
|
@icon = options[:input].delete(:icon) || ''.html_safe
|