effective_bootstrap 0.5.2 → 0.5.3
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: 386c2ba1dfd4aee2162688fd16b987a983f5df44
|
4
|
+
data.tar.gz: a659c7b4cf707a1f299f18f82b3fc5e56354a998
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 694539152c7dbf0b449ce3e0c193c4baa41ded5302fda0f32dd4f711474c7ec57e9ba0534a1bc68fbef52a4df8fd12191a64ead6791f3f3e6fc9ce761b12ce1f
|
7
|
+
data.tar.gz: 78c5e80b4740406b26d0ea483c89c1b53dda44c27f72dec9a60db70bdbaa93c42807b6fcc7b6307a93192078129464a00cd5fcd87d631e19c7e4c6725cb0f989
|
@@ -20,6 +20,9 @@ this.EffectiveForm ||= new class
|
|
20
20
|
@spin()
|
21
21
|
setTimeout((-> EffectiveForm.disable($form)), 0)
|
22
22
|
|
23
|
+
if ($form.attr('method') || '').toLowerCase() == 'get' || (@current_submit.length > 0 && @current_submit.hasClass('form-actions-reset'))
|
24
|
+
setTimeout((-> EffectiveForm.reset($form)), 2500)
|
25
|
+
|
23
26
|
invalidate: ($form) ->
|
24
27
|
$form.addClass('was-validated').addClass('form-is-invalid')
|
25
28
|
$form.find('.form-current-submit').removeClass('form-current-submit')
|
@@ -144,13 +147,7 @@ this.EffectiveForm ||= new class
|
|
144
147
|
# Sets EffectiveBootstrap. current_click.
|
145
148
|
# This displays the spinner here, and directs any flash messages before and after loadRemoteForm
|
146
149
|
$(document).on 'click', '.form-actions a[data-remote],.form-actions button[type=submit]', (event) ->
|
147
|
-
$
|
148
|
-
$form = $submits.closest('form')
|
149
|
-
|
150
|
-
if $submits.hasClass('form-actions-reset') || ($form.attr('method') || '').toLowerCase() == 'get'
|
151
|
-
setTimeout((-> EffectiveForm.reset($form)), 2500)
|
152
|
-
|
153
|
-
EffectiveForm.setCurrentSubmit($submits)
|
150
|
+
EffectiveForm.setCurrentSubmit($(@).parent())
|
154
151
|
EffectiveForm.spin()
|
155
152
|
|
156
153
|
# This actually attached the handlers to a remote ajax form when it or an action inside it triggers a remote thing.
|
@@ -44,18 +44,18 @@ module Effective
|
|
44
44
|
if buttons? || cards?
|
45
45
|
{ class: "form-group #{tag_id}" }
|
46
46
|
else
|
47
|
-
{ class: "form-group
|
47
|
+
{ class: "form-group #{tag_id} #{button_group_class}" }
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
51
51
|
def button_group_class
|
52
52
|
[
|
53
53
|
'effective-radios',
|
54
|
-
('no-feedback' if options[:feedback] == false),
|
55
54
|
('btn-group btn-group-toggle' if buttons?),
|
56
55
|
('card-deck' if cards?),
|
57
|
-
('
|
58
|
-
('is-
|
56
|
+
('no-feedback' unless feedback_options),
|
57
|
+
('is-invalid' if feedback_options && has_error?(name)),
|
58
|
+
('is-valid' if feedback_options && has_error? && !has_error?(name))
|
59
59
|
].compact.join(' ')
|
60
60
|
end
|
61
61
|
|
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.5.
|
4
|
+
version: 0.5.3
|
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: 2019-04-
|
11
|
+
date: 2019-04-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|