effective_datatables 4.10.7 → 4.11.2

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
  SHA256:
3
- metadata.gz: aca73f243bfad0546f2a52be13aeb213efe11b646a60a79522553bed168661a6
4
- data.tar.gz: 56729e4ab420c501524f05e543bdf49ddd64af4b0d11c054dd283f29add4042d
3
+ metadata.gz: 1c5483c634b1459438b847c332144a23391c83f236f28c6cddad7c7a56314f51
4
+ data.tar.gz: f40f28f24b59f41e1fae0393c98def60fd6983c150925144006068dae66a1d9d
5
5
  SHA512:
6
- metadata.gz: e894dd4994ed0803c0011e39e8d12cd38272205cfdcee296c52d631309fcf6a2444e6928fea0a227a453d28697b6744283d7db75771942447f687672a59ba64b
7
- data.tar.gz: 205255688bb9334fb632bfdf1a52a81d8534463d82dc4ad62cec670f2ef91eba620ae63ba031cc1da6b1079a54cf64bacd19d4392ffafde24c11457dfbfd3bfb
6
+ metadata.gz: 3356da223d7b3060e4c5b4a0a3ccb3d2a0060d11687a710a85319e0996bb8e9b2ad96deb58a745495df55e713ec46e8643afb70c3e9d15ef466045f40bd5adfb
7
+ data.tar.gz: ffb6ba5ea8152d153a106f58463c426c11b1e13dfd6c98c853ac2fae8a98cd10e85dfe455bd52c1d435fc682b1ec316ecd121c551fdbdeafe07b5a14e05f8f5b
@@ -19,11 +19,12 @@ $(document).on 'change', ".dataTables_wrapper input[data-role='bulk-actions']",
19
19
 
20
20
  toggleDropdown = ($wrapper) ->
21
21
  $bulkActions = $wrapper.children().first().find('.buttons-bulk-actions').children('button')
22
+ selected = $wrapper.find("input[data-role='bulk-action']:checked").length
22
23
 
23
- if $wrapper.find("input[data-role='bulk-action']:checked").length > 0
24
- $bulkActions.removeAttr('disabled')
24
+ if selected > 0
25
+ $bulkActions.removeAttr('disabled').text("Bulk Actions (#{selected} items)")
25
26
  else
26
- $bulkActions.attr('disabled', 'disabled')
27
+ $bulkActions.attr('disabled', 'disabled').text('Bulk Actions')
27
28
 
28
29
  restoreSelected = ($table, selected) ->
29
30
  $bulkActions = $table.closest('.dataTables_wrapper').children().first().find('.buttons-bulk-actions').children('button')
@@ -93,6 +93,7 @@ module Effective
93
93
  collection.select! do |row|
94
94
  obj = row[index]
95
95
  value = obj_to_value(row[index], column, row)
96
+ next if value.blank?
96
97
 
97
98
  case column[:as]
98
99
  when :boolean
@@ -6,11 +6,13 @@ module EffectiveDatatables
6
6
 
7
7
  # Include Helpers to base application
8
8
  initializer 'effective_datatables.action_controller' do |app|
9
- ActiveSupport.on_load :action_controller_base do
10
- helper EffectiveDatatablesHelper
11
- helper EffectiveDatatablesPrivateHelper
9
+ app.config.to_prepare do
10
+ ActiveSupport.on_load :action_controller_base do
11
+ helper EffectiveDatatablesHelper
12
+ helper EffectiveDatatablesPrivateHelper
12
13
 
13
- ActionController::Base.send :include, ::EffectiveDatatablesControllerHelper
14
+ ActionController::Base.send :include, ::EffectiveDatatablesControllerHelper
15
+ end
14
16
  end
15
17
  end
16
18
 
@@ -1,3 +1,3 @@
1
1
  module EffectiveDatatables
2
- VERSION = '4.10.7'.freeze
2
+ VERSION = '4.11.2'.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.10.7
4
+ version: 4.11.2
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: 2022-04-04 00:00:00.000000000 Z
11
+ date: 2022-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -193,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0'
195
195
  requirements: []
196
- rubygems_version: 3.1.6
196
+ rubygems_version: 3.1.2
197
197
  signing_key:
198
198
  specification_version: 4
199
199
  summary: Uniquely powerful server-side searching, sorting and filtering of any ActiveRecord