effective_bootstrap 0.6.25 → 0.6.26
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 04d0aa8b1c7650af3d1ab484028ac21d568258af71bb4ff321265d8804f79083
|
4
|
+
data.tar.gz: 9f8b936083d51a3905311c5e4fe9c1d861d11a2f1b547dd14343e80a99307c4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2933e838a12ad3f8a0e10358af853fb13e3a7c856bb005ad7438369d9187f0784a0bfb2b7999adccb0ad11e650e27eb59802bb2d3de33a5ab6cdbd30dd3ee48c
|
7
|
+
data.tar.gz: '096001e254fe4309420bfc15888140e0e3c446894960f5e33f8b1843c101dc062d85e6c054dd35377a60f6a96f406827e3cfc947b05cc77a56b477a4b1f392df'
|
@@ -2,7 +2,14 @@
|
|
2
2
|
$affects = $element.closest('form').find("input[name='#{options.name}'],select[name='#{options.name}']")
|
3
3
|
|
4
4
|
$affects.on 'change', (event) ->
|
5
|
-
|
5
|
+
$target = $(event.target)
|
6
|
+
matches = ($target.val() == options.value)
|
7
|
+
|
8
|
+
if $target.is("[type='checkbox']")
|
9
|
+
matches = matches || ($target.is(':checked') && "#{options.value}" == 'true')
|
10
|
+
matches = matches || (!$target.is(':checked') && ("#{options.value}" == 'false' || "#{options.value}" == ''))
|
11
|
+
|
12
|
+
if matches
|
6
13
|
$element.hide()
|
7
14
|
$element.find('input,textarea,select').prop('disabled', true)
|
8
15
|
else
|
@@ -18,7 +25,14 @@
|
|
18
25
|
$affects = $element.closest('form').find("input[name='#{options.name}'],select[name='#{options.name}']")
|
19
26
|
|
20
27
|
$affects.on 'change', (event) ->
|
21
|
-
|
28
|
+
$target = $(event.target)
|
29
|
+
matches = ($target.val() == options.value)
|
30
|
+
|
31
|
+
if $target.is("[type='checkbox']")
|
32
|
+
matches = matches || ($target.is(':checked') && "#{options.value}" == 'true')
|
33
|
+
matches = matches || (!$target.is(':checked') && ("#{options.value}" == 'false' || "#{options.value}" == ''))
|
34
|
+
|
35
|
+
if matches
|
22
36
|
$element.fadeIn()
|
23
37
|
$element.find('input,textarea,select').removeAttr('disabled')
|
24
38
|
else
|
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.
|
4
|
+
version: 0.6.26
|
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-05-
|
11
|
+
date: 2020-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|