effective_bootstrap 1.18.4 → 1.18.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7e1cf325e183ecc0df0f3c7be9dc73f5c16ae3878472009d2903769b00dcbc38
4
- data.tar.gz: 863c781ded85cafb6e17cd6893f239dbf50811491d219d43e8bc9581bcaefed9
3
+ metadata.gz: e7622861e08b0f2d26507c958a27e9911fa3c9e1a9d63856d5681feae3d57a1c
4
+ data.tar.gz: 25106f78d44870955fd64aec81f578d58296239792fd59bb71089b3081113c7a
5
5
  SHA512:
6
- metadata.gz: 640119caa5abc25fca4481e78906d6ffa9193a3efc0f8302d69a1d9934661e207a505b9e8231b9f18dd1f479b5a6309700f04d532d5ff2c50acb961f4ad596d4
7
- data.tar.gz: bf1f54c06c840410ffbbd00e07f323b2dc2a336c16f03f6345352345ae6eb08eb18b3ae72a8021a364eb9671a3675483b472423e049749d1dab8eb8faa8aa7cb
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) ->
@@ -5,7 +5,7 @@ module Effective
5
5
  class TextField < Effective::FormInput
6
6
 
7
7
  def input_html_options
8
- { class: 'form-control', maxlength: 250, id: tag_id }
8
+ { class: 'form-control', maxlength: 250, size: nil, id: tag_id }
9
9
  end
10
10
 
11
11
  end
@@ -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.4'.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.4
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-04-25 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