effective_datatables 1.3.0 → 1.3.1

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: 42c5bd2f4e9f486d7aaf7b6eb9f50d518d454b54
4
- data.tar.gz: b759ac1ff2af026ff64e514ee520d2e0a894ca53
3
+ metadata.gz: e2078d65ba5b4fed14caa8ea81158f7037f0ad89
4
+ data.tar.gz: 3211bd15539cd691b614d6fd5c22c02121f7d58c
5
5
  SHA512:
6
- metadata.gz: 70674bc43be1f4d30d4be2f97f73841bcf5300193a2e0968470669bd6902a015a8cf147e1aa91b799779a864fa8d331c165e16f9435111209efa8fa5f51d4aad
7
- data.tar.gz: ee6b5e40da9ef3d41e70d951be314aabfd4cab55da491bfbb5f5197638ee9666dc06ba32218dd6c0ab6ef57292476a3f7ce61faaaee0ea920933b9dda77e5320
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()
@@ -1,3 +1,3 @@
1
1
  module EffectiveDatatables
2
- VERSION = '1.3.0'.freeze
2
+ VERSION = '1.3.1'.freeze
3
3
  end
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.0
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 00:00:00.000000000 Z
11
+ date: 2015-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails