effective_bootstrap 0.6.6 → 0.6.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/effective_bootstrap/form.js.coffee +3 -0
- data/app/assets/javascripts/effective_select/overrides.js.coffee +2 -1
- data/app/helpers/effective_bootstrap_helper.rb +2 -2
- data/app/models/effective/form_logics/hide_if.rb +5 -2
- data/app/models/effective/form_logics/show_if.rb +5 -2
- data/lib/effective_bootstrap/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e583f4edb3e2862a328ab4040676d9efba022848730e512948b3b1f2874806b
|
4
|
+
data.tar.gz: ef93586b5e06a272253677e9d6c320d7e33971ab35c797dc070fd86a6e25288a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a20412b96e1a3b082daab2da51c1a81cb1e5b61cc61ab6305ca11faf2d7a0a8d8e51501508f8406bba67aa046a11fcd544bde2ab96d76f6284f89dcf4dedcc8
|
7
|
+
data.tar.gz: de05e6e3d0e4ffc303d57da9b159b2f3ac282d8aa38d4152dc687fc7e91991ee38b42b9211ff2e1aa0c8338371a842d98d94f76b4591c11cdfccb456bd421896
|
@@ -164,3 +164,6 @@ $(document).on 'ajax:beforeSend', 'form[data-remote]', (event) ->
|
|
164
164
|
$(document).on 'ajax:beforeSend', '[data-method=delete]', (event) ->
|
165
165
|
if ($delete = $(@)).data('closest')
|
166
166
|
EffectiveForm.setCurrentDelete($delete.closest($delete.data('closest')))
|
167
|
+
|
168
|
+
$(document).on 'reset', 'form', (event) ->
|
169
|
+
EffectiveForm.reset($(event.currentTarget))
|
@@ -9,7 +9,7 @@ module EffectiveBootstrapHelper
|
|
9
9
|
# = collapse('already expanded', show: true) do
|
10
10
|
# %p Something Expanded
|
11
11
|
|
12
|
-
# collapse(items.length, class: 'btn btn-primary',
|
12
|
+
# collapse(items.length, class: 'btn btn-primary', class: 'mt-2') do
|
13
13
|
# items.map { |item| content_tag(:div, item.to_s) }.join.html_safe
|
14
14
|
# end
|
15
15
|
def collapse(label, opts = {}, &block)
|
@@ -19,7 +19,7 @@ module EffectiveBootstrapHelper
|
|
19
19
|
show = (opts.delete(:show) == true)
|
20
20
|
|
21
21
|
link_opts = { 'data-toggle': 'collapse', role: 'button', href: "##{id}", 'aria-controls': "##{id}", 'aria-expanded': show }
|
22
|
-
card_class = opts.delete(:
|
22
|
+
card_class = opts.delete(:class) || 'my-2'
|
23
23
|
|
24
24
|
content_tag(:a, label, link_opts.merge(opts)) +
|
25
25
|
content_tag(:div, id: id, class: ['collapse', ('show' if show)].compact.join(' ')) do
|
@@ -19,11 +19,14 @@ module Effective
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def logic_options
|
22
|
-
{ name: tag_name(args.first), value: args.second.to_s }
|
22
|
+
{ name: tag_name(args.first), value: args.second.to_s }.merge(input_logic_options)
|
23
|
+
end
|
24
|
+
|
25
|
+
def input_logic_options
|
26
|
+
args.third.kind_of?(Hash) ? args.third : {}
|
23
27
|
end
|
24
28
|
|
25
29
|
def validate!(args)
|
26
|
-
raise 'expected two arguments' unless args.length == 2
|
27
30
|
raise "expected object to respond to #{args.first}" unless object.respond_to?(args.first)
|
28
31
|
end
|
29
32
|
|
@@ -19,11 +19,14 @@ module Effective
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def logic_options
|
22
|
-
{ name: tag_name(args.first), value: args.second.to_s }
|
22
|
+
{ name: tag_name(args.first), value: args.second.to_s }.merge(input_logic_options)
|
23
|
+
end
|
24
|
+
|
25
|
+
def input_logic_options
|
26
|
+
args.third.kind_of?(Hash) ? args.third : {}
|
23
27
|
end
|
24
28
|
|
25
29
|
def validate!(args)
|
26
|
-
raise 'expected two arguments' unless args.length == 2
|
27
30
|
raise "expected object to respond to #{args.first}" unless object.respond_to?(args.first)
|
28
31
|
end
|
29
32
|
|
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.6.
|
4
|
+
version: 0.6.7
|
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-
|
11
|
+
date: 2019-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|