effective_bootstrap 0.6.18 → 0.6.19

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: 7241d32c38bf36e1e278670046938bbc082851715b83675de7b7939f1f0c7203
4
- data.tar.gz: d5cea7573bf6a4403da3edd3b64a3e447e18f1d5b0946c6f336f98a1de6c70d6
3
+ metadata.gz: a5f1abf1a0b9a9f137504366c9fe3049e363f5adda7e745f5bf5d50b17b98df3
4
+ data.tar.gz: 2ae0fa3dde907f0d2a962e920cf5f4d00e17b14f29011f1cdceed64552ade030
5
5
  SHA512:
6
- metadata.gz: 3fb9c339089c1a32e78499a8096b9d1fb5f4c20d1a5e5ab10ee9164ee0652af626916c721555f28e6199ca308465b6472b915c35c02de1cff29a8d3b824907e9
7
- data.tar.gz: 9362f1aac6111de2b4dc9976451123b9c909f10d0ceaf8eb68a38500aa768e694cda468164f9785aaa17fc74f0341bba7b2ac1f3910de91259d4383a21ed0a31
6
+ metadata.gz: bbddbd6183904620b83cdf64f5d54fc1038570dd79b866a3fc3d88216252e09b79fa1afc56eed985ee5bd5948d9e4f8b401b80b30b033309a6a34e2664e68d31
7
+ data.tar.gz: 2b8159b33077349384ef9ae67930baf8a2ce458e035af3a8a013b06e9a565310ab9f5cd9b9946e27e06d0868fada1e2c9716fbde564f47363c4cdb70d50811a7
@@ -1,11 +1,10 @@
1
1
  (this.EffectiveBootstrap || {}).effective_hide_if = ($element, options) ->
2
-
3
- $affects = $element.closest('form').find("input[name='#{options.name}'],select[name='#{options.name}']")
2
+ $affects = $element.closest('form').find("input[name='#{options.name}'],select[name='#{options.name}']").first()
4
3
 
5
4
  $affects.on 'change', (event) ->
6
5
  if $(event.target).val() == options.value
7
6
  $element.hide()
8
- element.find('input,textarea,select').prop('disabled', true)
7
+ $element.find('input,textarea,select').prop('disabled', true)
9
8
  else
10
9
  $element.fadeIn()
11
10
  $element.find('input,textarea,select').removeAttr('disabled')
@@ -16,8 +15,7 @@
16
15
 
17
16
 
18
17
  (this.EffectiveBootstrap || {}).effective_show_if = ($element, options) ->
19
-
20
- $affects = $element.closest('form').find("input[name='#{options.name}'],select[name='#{options.name}']")
18
+ $affects = $element.closest('form').find("input[name='#{options.name}'],select[name='#{options.name}']").first()
21
19
 
22
20
  $affects.on 'change', (event) ->
23
21
  if $(event.target).val() == options.value
@@ -32,8 +30,7 @@
32
30
  $element.find('input,textarea,select').prop('disabled', true)
33
31
 
34
32
  (this.EffectiveBootstrap || {}).effective_show_if_any = ($element, options) ->
35
-
36
- $affects = $element.closest('form').find("input[name='#{options.name}'],select[name='#{options.name}']")
33
+ $affects = $element.closest('form').find("input[name='#{options.name}'],select[name='#{options.name}']").first()
37
34
  values = JSON.parse(options.value)
38
35
 
39
36
  $affects.on 'change', (event) ->
@@ -1,3 +1,3 @@
1
1
  module EffectiveBootstrap
2
- VERSION = '0.6.18'.freeze
2
+ VERSION = '0.6.19'.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: 0.6.18
4
+ version: 0.6.19
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: 2020-03-19 00:00:00.000000000 Z
11
+ date: 2020-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails