effective_datatables 1.3.0 → 1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2078d65ba5b4fed14caa8ea81158f7037f0ad89
|
4
|
+
data.tar.gz: 3211bd15539cd691b614d6fd5c22c02121f7d58c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 87524916edb264b4cf25d562486d4be1d4e7d48e7e38ade621e34365b21a45908840cd9312614b84e502a81b63dd02afd857e16dc053904f643a1b56beca3ac6
|
7
|
+
data.tar.gz: f47f04e2268935ec522489dbc5fe9b495d153ab06e8ccbf1739acf25fb60599c11ddc9bf62730d12a4247764e0d935d9a9b3d7832f4198a532430e7003a1113b
|
@@ -25,17 +25,6 @@ initializeDataTables = ->
|
|
25
25
|
table.columns().flatten().each (index) -> # Pass which columns are visible back to server
|
26
26
|
aoData.push({'name': "sVisible_#{index}", 'value': table.column(index).visible()})
|
27
27
|
|
28
|
-
# If this is the very first request to the server we have to manually set any selected filter options here
|
29
|
-
# So that we can skip an fnFilter call in the dataTables.columnFilter that results in a double AJAX call
|
30
|
-
((sEcho = data; break) if data.name == 'sEcho') for data in aoData
|
31
|
-
if sEcho && sEcho.value == 2
|
32
|
-
$.each (datatable.data('filter') || []), (index, filter) ->
|
33
|
-
if(filter.selected)
|
34
|
-
sSearch = undefined
|
35
|
-
((sSearch = data; break) if data.name == "sSearch_#{index}") for data in aoData
|
36
|
-
sSearch.value = filter.selected if sSearch
|
37
|
-
datatable.fnSettings().aoPreSearchCols[index].sSearch = filter.selected
|
38
|
-
|
39
28
|
aoColumnDefs: aoColumnDefs
|
40
29
|
aoColumns: datatable.data('widths')
|
41
30
|
oTableTools:
|
@@ -65,5 +54,9 @@ initializeDataTables = ->
|
|
65
54
|
aoColumns : datatable.data('filter')
|
66
55
|
bUseColVis: true
|
67
56
|
|
57
|
+
$.each (datatable.data('filter') || []), (index, filter) ->
|
58
|
+
if(filter.selected)
|
59
|
+
datatable.fnSettings().aoPreSearchCols[index].sSearch = filter.selected
|
60
|
+
|
68
61
|
$ -> initializeDataTables()
|
69
62
|
$(document).on 'page:change', -> initializeDataTables()
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_datatables
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
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: 2015-03-
|
11
|
+
date: 2015-03-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|