epi_js 1.0.10 → 1.0.12
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39a28a9c54641127a72331953f0d3f6372819eef
|
4
|
+
data.tar.gz: 716b740b743bc48e39165ec6a0a466489f61223b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a61f61810240604f5a17286ee1739d5648aec6bcf25eb4ecba5a3965d14a7acfec08ee9a59e9564c59ea9d014f01283bc13f255f4d1779f9cba93106009bc474
|
7
|
+
data.tar.gz: 4996251ba1005c3294ab924f387acfd9e96d3154d8f98563f87e21978ae62cd2a1b30bf476aa1ed238b274b541776031bacca42be8bc698753cd362b751abe1b
|
data/lib/epi_js/version.rb
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
constructor: (element) ->
|
5
5
|
@element = element
|
6
6
|
@target = $(@element.data('table-filter-target'))
|
7
|
-
|
7
|
+
|
8
8
|
colspan = if @target.data('no-record-span')?
|
9
9
|
@target.data('no-record-span')
|
10
10
|
else
|
@@ -18,21 +18,24 @@
|
|
18
18
|
@noRecordRow = $("<tr class='tr-no-record'><td colspan=#{colspan}>#{message}</td></tr>")
|
19
19
|
filter: ->
|
20
20
|
$('.tr-no-record', @target).remove()
|
21
|
+
allRows = @allRows()
|
21
22
|
keyword = @element.val().toLowerCase()
|
22
23
|
|
23
24
|
$toShow = if keyword is ''
|
24
|
-
|
25
|
+
allRows
|
25
26
|
else
|
26
|
-
|
27
|
+
allRows.filter ->
|
27
28
|
trText = $(this).clone().find('.btn').remove().end().text().toLowerCase()
|
28
29
|
trText.indexOf(keyword) > -1
|
29
30
|
|
30
31
|
$toShow.show()
|
31
|
-
|
32
|
+
allRows.not($toShow).hide()
|
32
33
|
|
33
34
|
if $toShow.length is 0
|
34
35
|
$('tbody', @target).append(@noRecordRow)
|
35
36
|
|
37
|
+
allRows: ->
|
38
|
+
$('tbody tr:not(.tr-no-record)', @target)
|
36
39
|
$.fn.tableFilter = ->
|
37
40
|
@each ->
|
38
41
|
data = $(this).data('table-filter')
|
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.
|
4
|
+
version: 1.0.12
|
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: 2018-
|
12
|
+
date: 2018-09-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|