effective_bootstrap 1.18.5 → 1.18.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/logic.js.coffee +19 -3
- data/app/models/effective/form_inputs/article_editor.rb +3 -1
- data/app/models/effective/form_logics/hide_if.rb +1 -1
- data/app/models/effective/form_logics/show_if.rb +1 -1
- data/app/models/effective/form_logics/show_if_any.rb +1 -1
- 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: e2fadb33191774f48f85f53dc2c3a24b98d885b73e686d7e6cb41d06bdd6e9c7
|
4
|
+
data.tar.gz: bd46fbe4dbee25ce4e1b63c64b63cba8d751789aa0d7ab6cf1fb1776ef021d21
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbaf684821074f0ca879e88c3e3cfe6a61dc583600addb0d52d9d3596472156da09ac86371ec8bd460c82bd155431673d86a4b82d8a12e22c5f4519c0df409f7
|
7
|
+
data.tar.gz: ccb1286eb4a0d00aaed5642bc2c8cb77264c70e926370f2e723e9291e0af95b561406ca221833dbf7b71b7ea2159243dc6d684f27a130ce813ba028dd92eb1ff
|
@@ -1,7 +1,12 @@
|
|
1
1
|
elementSelector = 'input,textarea,select,button,div.form-has-many'
|
2
2
|
|
3
3
|
(this.EffectiveBootstrap || {}).effective_hide_if = ($element, options) ->
|
4
|
-
|
4
|
+
if options.nested
|
5
|
+
$container = $element.parent('div.effective-form-logic') || $element.closest('form,div.effective-datatables-filters')
|
6
|
+
else
|
7
|
+
$container = $element.closest('form,div.effective-datatables-filters')
|
8
|
+
|
9
|
+
$affects = $container.find("input[name='#{options.name}'],select[name='#{options.name}'],input[name='#{options.name}[]']")
|
5
10
|
|
6
11
|
$affects.on 'change', (event) ->
|
7
12
|
$target = $(event.target)
|
@@ -24,7 +29,12 @@ elementSelector = 'input,textarea,select,button,div.form-has-many'
|
|
24
29
|
$element.find(elementSelector).prop('disabled', true)
|
25
30
|
|
26
31
|
(this.EffectiveBootstrap || {}).effective_show_if = ($element, options) ->
|
27
|
-
|
32
|
+
if options.nested
|
33
|
+
$container = $element.parent('div.effective-form-logic') || $element.closest('form,div.effective-datatables-filters')
|
34
|
+
else
|
35
|
+
$container = $element.closest('form,div.effective-datatables-filters')
|
36
|
+
|
37
|
+
$affects = $container.find("input[name='#{options.name}'],select[name='#{options.name}'],input[name='#{options.name}[]']")
|
28
38
|
|
29
39
|
$affects.on 'change', (event) ->
|
30
40
|
$target = $(event.target)
|
@@ -51,7 +61,13 @@ elementSelector = 'input,textarea,select,button,div.form-has-many'
|
|
51
61
|
$element.find(elementSelector).prop('disabled', true)
|
52
62
|
|
53
63
|
(this.EffectiveBootstrap || {}).effective_show_if_any = ($element, options) ->
|
54
|
-
|
64
|
+
if options.nested
|
65
|
+
$container = $element.parent('div.effective-form-logic') || $element.closest('form,div.effective-datatables-filters')
|
66
|
+
else
|
67
|
+
$container = $element.closest('form,div.effective-datatables-filters')
|
68
|
+
|
69
|
+
$affects = $container.find("input[name='#{options.name}'],select[name='#{options.name}'],input[name='#{options.name}[]']")
|
70
|
+
|
55
71
|
values = JSON.parse(options.value)
|
56
72
|
|
57
73
|
$affects.on 'change', (event) ->
|
@@ -151,10 +151,12 @@ module Effective
|
|
151
151
|
case mode
|
152
152
|
when :default, :admin
|
153
153
|
default_mode.merge(active_storage: active_storage, css: css, custom: { css: custom_css })
|
154
|
+
when :email
|
155
|
+
restricted_mode.merge(active_storage: false, css: css, custom: { css: custom_css })
|
154
156
|
when :restricted
|
155
157
|
restricted_mode.merge(active_storage: false, css: css, custom: { css: custom_css })
|
156
158
|
else
|
157
|
-
raise("unexpected mode: #{mode}. Try :default or :restricted")
|
159
|
+
raise("unexpected mode: #{mode}. Try :default, :email, or :restricted")
|
158
160
|
end
|
159
161
|
end
|
160
162
|
|
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: 1.18.
|
4
|
+
version: 1.18.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: 2024-
|
11
|
+
date: 2024-06-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|