epi_js 1.0.6 → 1.0.7

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
  SHA1:
3
- metadata.gz: cc6fb41f7c3d360e48126d6f183cd3e1731461bb
4
- data.tar.gz: a80c25baa0c51b271d5ede3b07fffe90db8cf6dd
3
+ metadata.gz: 37dc7deefa6e36e0bafb0b26b1d507e3fdad5ef1
4
+ data.tar.gz: 283a85d30cbe3566dcd8cd301acab10da9509a80
5
5
  SHA512:
6
- metadata.gz: 92f6da24cc40e73663a5bbcaa8581366e434f0e60e6ab25b7bfed258bb269f4bfdaf88b1a7579189ee40e82a1618ef3d9ae732d394725f9ef10963dec1be53ec
7
- data.tar.gz: 877ef658fc8b978be6457ee3767e3d96529fa77fe3d5ade2d36f9fa6a5ab38408a080cf00987d427586890f764dcf9b471416fe209a39035428aeb9bdc4d68ab
6
+ metadata.gz: e64236d2e02cd752aa215ad2251dc3e2e31e72d3ccafda501e123cbc4a47311b2fe48d6805e0d474b38ca964eba4ff140d44fc49242b6659dbb1ccfc2ede5025
7
+ data.tar.gz: 296440dd31ffe3ca8cc3f16ff0b1e50e7c58e53e2e2bf5f30a291f12f755375db88d843ef03fc5912d36ae9b2601751f9c3c5e533b386f31d28249403bb23fcd
@@ -1,3 +1,3 @@
1
1
  module EpiJs
2
- VERSION = "1.0.6"
2
+ VERSION = "1.0.7"
3
3
  end
@@ -33,7 +33,7 @@
33
33
  data.filter()
34
34
 
35
35
  $ ->
36
- $('input[data-visibility-map]:checked, select[data-visibility-map]').optionFilter()
36
+ $('[data-option-filter-target]').optionFilter()
37
37
 
38
38
  $(document.body).on 'change', '[data-option-filter-target]', (e) ->
39
39
  $(this).optionFilter()
@@ -20,11 +20,13 @@
20
20
 
21
21
  toShow.show()
22
22
  toShow.trigger('visibility.show')
23
- $(':input:not([data-visibility-map-no-auto-enable])', toShow).prop('disabled', false)
24
23
 
25
24
  toHide.hide()
26
25
  toHide.trigger('visibility.hide')
27
- $(':input', toHide).prop('disabled', true)
26
+
27
+ hideAll: ->
28
+ @allFields.hide()
29
+ @allFields.trigger('visibility.hide')
28
30
 
29
31
  getValue: ->
30
32
  $.makeArray(@element.val())
@@ -34,17 +36,24 @@
34
36
  $.map $("input[type='checkbox'][name='#{@element.attr('name')}']:checked"), (inputElement) ->
35
37
  $(inputElement).val()
36
38
 
37
- $.fn.setVisibility = ->
39
+ $.fn.setVisibility = (action) ->
38
40
  @each ->
39
41
  data = $(this).data('visibility-checker')
40
42
  unless data?
41
43
  checkerClass = if $(this).is("input[type='checkbox']") then CheckboxVisibilityChecker else GenericVisibilityChecker
42
44
  $(this).data('visibility-checker', data = new checkerClass $(this))
43
- data.check()
45
+ action ?= 'check'
46
+ data[action]()
44
47
 
45
48
  $ ->
46
49
  $('input[data-visibility-map]:checked, select[data-visibility-map]').setVisibility()
47
50
 
51
+ $(document.body).on 'visibility.show', ->
52
+ $(':input:not([data-visibility-map-no-auto-enable])', $(this)).prop('disabled', false)
53
+
54
+ $(document.body).on 'visibility.hide', ->
55
+ $(':input', $(this)).prop('disabled', true)
56
+
48
57
  $(document.body).on 'change', '[data-visibility-map]', (e) ->
49
58
  $(this).setVisibility()
50
59
  ) jQuery
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: epi_js
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shuo Chen
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-10-06 00:00:00.000000000 Z
12
+ date: 2018-01-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
140
140
  version: '0'
141
141
  requirements: []
142
142
  rubyforge_project:
143
- rubygems_version: 2.6.10
143
+ rubygems_version: 2.6.13
144
144
  signing_key:
145
145
  specification_version: 4
146
146
  summary: jQuery scripts used in various projects