effective_bootstrap 1.18.5 → 1.18.6

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
  SHA256:
3
- metadata.gz: 994272ae1c8f836bfb67d441e7fb17a7a2077cd2668af0cf03f754d07e3e532f
4
- data.tar.gz: 48d354f2dd4b17642522259789e469374cdfb6792f4b8a44f51a22da5801517e
3
+ metadata.gz: e7622861e08b0f2d26507c958a27e9911fa3c9e1a9d63856d5681feae3d57a1c
4
+ data.tar.gz: 25106f78d44870955fd64aec81f578d58296239792fd59bb71089b3081113c7a
5
5
  SHA512:
6
- metadata.gz: 8551d67dbdc2298695d99e370466f21be42141cce73c3841891504c3a0b6c4cce80e0072efe73f92b2f8e215ad129dfd8a979318fd874615c2975ae258ce61b9
7
- data.tar.gz: e042e706fe9071887df34c572be5ef396a9ff53127542ae23efd2e88a05b4f8fd4f5e12efc8d3ea17b011e200100bbea62e0c3f6bb828642b17204d93c554921
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
- $affects = $element.closest('form,div.effective-datatables-filters').find("input[name='#{options.name}'],select[name='#{options.name}']")
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
- $affects = $element.closest('form,div.effective-datatables-filters').find("input[name='#{options.name}'],select[name='#{options.name}'],input[name='#{options.name}[]']")
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
- $affects = $element.closest('form,div.effective-datatables-filters').find("input[name='#{options.name}'],select[name='#{options.name}']")
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) ->
@@ -17,7 +17,7 @@ module Effective
17
17
  end
18
18
 
19
19
  def options
20
- { style: ('display: none;' if hide?) }
20
+ { style: ('display: none;' if hide?), class: 'effective-form-logic' }
21
21
  end
22
22
 
23
23
  def logic_options
@@ -17,7 +17,7 @@ module Effective
17
17
  end
18
18
 
19
19
  def options
20
- { style: ('display: none;' unless show?) }
20
+ { style: ('display: none;' unless show?), class: 'effective-form-logic' }
21
21
  end
22
22
 
23
23
  def logic_options
@@ -17,7 +17,7 @@ module Effective
17
17
  end
18
18
 
19
19
  def options
20
- { style: ('display: none;' unless show?) }
20
+ { style: ('display: none;' unless show?), class: 'effective-form-logic' }
21
21
  end
22
22
 
23
23
  def logic_options
@@ -1,3 +1,3 @@
1
1
  module EffectiveBootstrap
2
- VERSION = '1.18.5'.freeze
2
+ VERSION = '1.18.6'.freeze
3
3
  end
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.5
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-10 00:00:00.000000000 Z
11
+ date: 2024-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails