effective_bootstrap 0.3.8 → 0.3.9
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: 6443858776f6375775b1dbde639ab45d9cb53cdf
|
4
|
+
data.tar.gz: 2ece4b12013167358126fb7b4338600c0d70c813
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 612681cb5bee5f316d7dd77098b7ea8e547beb5f11a0d0b4d0cb23dbb61a529759dc59b9b441f903d9db1c2037f23cda0cf35772a1076a4c44fc9bacf620a06f
|
7
|
+
data.tar.gz: 3c9c1ce8befeffd28bc6572a59806fee09522b4a5cfab33c7b444a8d542fe71e1409dbed48e82def9b0fd3cfc6abbd2f3c20aa6e37194670c67843ef8797a149
|
@@ -45,6 +45,7 @@ this.EffectiveForm ||= new class
|
|
45
45
|
$form.find('.is-valid').removeClass('is-valid')
|
46
46
|
|
47
47
|
$form.find('[type=submit]').removeAttr('disabled')
|
48
|
+
$form
|
48
49
|
|
49
50
|
spin: -> @current_submit.addClass('form-current-submit') if @current_submit.length > 0
|
50
51
|
|
@@ -68,20 +69,22 @@ this.EffectiveForm ||= new class
|
|
68
69
|
$form = $payload.find("form[data-remote-index='#{$target.data('remote-index')}']")
|
69
70
|
$form = $payload.find('form').first() if $form.length == 0
|
70
71
|
$form.attr('data-remote', true)
|
71
|
-
|
72
|
-
return if $form.length == 0
|
73
|
-
|
74
|
-
EffectiveBootstrap.initialize($form)
|
75
|
-
$target.replaceWith($form)
|
76
|
-
@remote_form_payload = ''
|
72
|
+
@remote_form_payload = ''
|
77
73
|
|
78
74
|
# There's nothing to update if it was a successful delete
|
79
75
|
return if was_delete
|
80
76
|
|
81
|
-
#
|
77
|
+
# Process remote form
|
78
|
+
if $form.length > 0
|
79
|
+
EffectiveBootstrap.initialize($form)
|
80
|
+
$target.replaceWith($form)
|
81
|
+
else
|
82
|
+
$form = @reset($target) # There is no remote form. So we assume success and reset the submitted one.
|
83
|
+
|
82
84
|
if @current_submit.length > 0
|
83
85
|
@current_submit = $form.find("##{@current_submit.attr('id')}.form-actions")
|
84
86
|
|
87
|
+
# Process Flash
|
85
88
|
if @remote_form_flash.length > 0
|
86
89
|
@flash($form, flash[0], flash[1], true) for flash in @remote_form_flash
|
87
90
|
@remote_form_flash = ''
|
@@ -116,7 +119,11 @@ this.EffectiveForm ||= new class
|
|
116
119
|
</div>
|
117
120
|
")
|
118
121
|
|
119
|
-
setCurrentSubmit: ($submit) ->
|
122
|
+
setCurrentSubmit: ($submit) ->
|
123
|
+
if $submit.is('.form-actions')
|
124
|
+
@current_submit = $submit
|
125
|
+
else
|
126
|
+
@current_submit = ''
|
120
127
|
|
121
128
|
setCurrentDelete: ($delete) -> @current_delete = $delete
|
122
129
|
|
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.3.
|
4
|
+
version: 0.3.9
|
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-01-
|
11
|
+
date: 2019-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|