effective_bootstrap 1.18.5 → 1.18.6
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_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: e7622861e08b0f2d26507c958a27e9911fa3c9e1a9d63856d5681feae3d57a1c
|
4
|
+
data.tar.gz: 25106f78d44870955fd64aec81f578d58296239792fd59bb71089b3081113c7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5da3e707da876fbae855e43c039e2d7e127b215076abeddf3fb660a5997b36011ebdb99f2bf2ee8bc39139020327f7eb26f1a9339716134cb1826d5c9ac77f10
|
7
|
+
data.tar.gz: e107e2b8a9491ebb5cf0de401d281b2c35731ed5754d8f2e4d4b01cee9425e72703c50472aa901a8e18d40e9183750361c2f3769ecef396ad2085c53d009f828
|
@@ -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) ->
|
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.6
|
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-05-
|
11
|
+
date: 2024-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|