epi_js 1.0.3 → 1.0.4

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: a1c7e3d3fa493fe3f55e16a59d2bfe3857489048
4
- data.tar.gz: c1b6a118a5dfc2e11f2b8c7900dc7b6b19e9de2a
3
+ metadata.gz: 0b8aaf447c4e819ce3230a9a096ab5c4463fbbc7
4
+ data.tar.gz: a5c392f40bb87b94fb8d1669d9c0dcac40e08bec
5
5
  SHA512:
6
- metadata.gz: bba945fc6d73096edad34fe6786798d034e517af44f88918011eb4390a27f8129fce219ed8d1e4df776dee45730b1f02d829a9e1a9ccc0389fac14b5e002b4ad
7
- data.tar.gz: efe41e0e7e61cc0bd27ef02a88b8f3ca44c2cb1f34d45a4e98a351f81504480222539beedd15ca3e5cc9bd39ccec3e549277acc5c5602e08882ce25d1f74f1f7
6
+ metadata.gz: f01788cc90958a81961afcc2987cc01bc72f399d38fb642c11120f35801e0592643acdfe4a713d543993c38a0df1e363401d3024d849089eca38b35f88f3883e
7
+ data.tar.gz: 307ca6f8ad98df3322b7ef95b8e61b9313b7abc106980a9e00cfee6d43cae2df507516ac5bf4c80dc8d51e2f91d0b2477dd8413be259aa92a89117c6804a0fe2
@@ -1,3 +1,3 @@
1
1
  module EpiJs
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  end
@@ -15,9 +15,14 @@
15
15
  disableEmpty = @disableEmpty
16
16
 
17
17
  @filterTarget.each ->
18
+ $selected = $(':selected', $(this))
19
+
18
20
  $toShow = $(this).data('option-filter-all-options').filter("[data-option-filter-value='#{valueSelected}'], :not([data-option-filter-value])")
19
21
 
20
- $(this).html($toShow).val('').trigger('change.option-filter')
22
+ unless $toShow.filter($selected).size() > 0
23
+ $(this).val('')
24
+
25
+ $(this).html($toShow).trigger('change.option-filter')
21
26
  $(this).prop('disabled', disableEmpty and ($toShow.size() is 0))
22
27
 
23
28
  $.fn.optionFilter = ->
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.3
4
+ version: 1.0.4
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: 2016-05-06 00:00:00.000000000 Z
12
+ date: 2016-05-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties