effective_datatables 4.3.20 → 4.3.21

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: bdd07e900a976b859296be599b528999fc3a405c
4
- data.tar.gz: 30208e6488de5c84b9311409f98f04a0c718811b
3
+ metadata.gz: d16abc968c44876025dde5fcd633faf328642df6
4
+ data.tar.gz: 2c4f38ae922eb00e4dc5dbf46f9fb843dd3de926
5
5
  SHA512:
6
- metadata.gz: d2c242866ddec34922c6720f5794e6efe6e1e866c7d4874540f4fd7b05d67a5a6de87ab54a5203e7f05c889da5e81a13a717f46a012ab54d3a5bc7b5079dcd7e
7
- data.tar.gz: d9996dfc30d2e7c0ac9f8d81da9fcb782224e88e7d0c4468be7c0d6256d24a1391fa4bef2a922190e1be5e4f6c69f2ee064d293094a8279d2ce8fbdbcf0b69b5
6
+ metadata.gz: f22ddb2a8b4d015a65804a6f245652fb1f204f36878c898c786f1bbd0c62d8c886630097e27ffd95163a0abe2e82ac3c9fb992afdaa0e56fcc90a2d7d5d9d97c
7
+ data.tar.gz: 3da4b7eab6631e79dd1d7fe8e25b4d2cb8bb0e7baf7414389f0a528321c60454a254f030050b9377ac2f522a562d946ff0ee65797cc47bfb2b6c47e58b737728
@@ -8,7 +8,7 @@ $(document).on 'ajax:beforeSend', '.dataTables_wrapper .col-actions', (e, xhr, s
8
8
 
9
9
  return true if ('' + $action.data('inline')) == 'false'
10
10
 
11
- $params = $.param({_datatable_id: $table.attr('id'), _datatable_cookie: $table.data('cookie') })
11
+ $params = $.param({_datatable_id: $table.attr('id'), _datatable_cookie: $table.data('cookie'), _datatable_action: true })
12
12
  settings.url += (if settings.url.indexOf('?') == -1 then '?' else '&') + $params
13
13
 
14
14
  if $action.closest('.effective-datatables-inline-row').length > 0
@@ -161,9 +161,8 @@ refreshDatatables = ($source) ->
161
161
  $('table.dataTable.initialized').each ->
162
162
  $table = $(this)
163
163
 
164
- if EffectiveForm.remote_form_refresh_datatables.find((id) -> $table.attr('id').startsWith(id) || id == 'all') && $table != $except
165
- if $table != $source
166
- $table.DataTable().draw()
164
+ if EffectiveForm.remote_form_refresh_datatables.find((id) -> $table.attr('id').startsWith(id) || id == 'all')
165
+ $table.DataTable().draw() if $table != $source
167
166
 
168
167
  # Cancel button clicked. Blow away new tr, or restore edit tr
169
168
  # No data will have changed at this point
@@ -79,8 +79,8 @@ module Effective
79
79
 
80
80
  # Figure out the class, and if it's activerecord, do all the resource discovery on it
81
81
  load_resource!
82
- load_resource_search!
83
82
  apply_belongs_to_attributes!
83
+ load_resource_search!
84
84
 
85
85
  # Check everything is okay
86
86
  validate_datatable!
@@ -18,7 +18,10 @@ module Effective
18
18
 
19
19
  # Apply column searching
20
20
  col = column_tool.search(col)
21
- @display_records = column_tool.size(col) unless value_tool.searched.present?
21
+
22
+ unless value_tool.searched.present? || (column_tool.scoped.blank? && column_tool.searched.blank?)
23
+ @display_records = column_tool.size(col)
24
+ end
22
25
 
23
26
  # Apply column ordering
24
27
  col = column_tool.order(col)
@@ -1,3 +1,3 @@
1
1
  module EffectiveDatatables
2
- VERSION = '4.3.20'.freeze
2
+ VERSION = '4.3.21'.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: 4.3.20
4
+ version: 4.3.21
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: 2019-01-14 00:00:00.000000000 Z
11
+ date: 2019-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails