effective_datatables 4.10.6 → 4.11.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
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 026730ba20562ddac0f28a5bde43b522207a59c4c9ae673545405b0c4d005a55
|
|
4
|
+
data.tar.gz: 72e5ef907b2c0b5fd94274a14f9025d34767abe5ad4aa56396d7888b7eb28b91
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7635a47dd2047b7dec807a11d881f6babc37603135c194a8303b1ae8307ec8628279b348543e806339548dd7e5f296fe784a3f82da8c2fd8ad0224b1e6f1d242
|
|
7
|
+
data.tar.gz: 5352f10cb81378464d412200784e255c197837fe67451182fe6b2e6d570673c627c3b2d0819e6831c3d7eb51290411339d8cd64f2cef9b66069407c375686847
|
|
@@ -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
|
|
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')
|
|
@@ -45,7 +45,7 @@ module Effective
|
|
|
45
45
|
Rails.logger.info "COLUMN TOOL: order_column #{column.to_s} #{direction} #{sql_column}" if EffectiveDatatables.debug
|
|
46
46
|
|
|
47
47
|
if column[:sql_as_column]
|
|
48
|
-
collection.order("#{sql_column} #{datatable.effective_resource.sql_direction(direction)}")
|
|
48
|
+
collection.order(Arel.sql("#{sql_column} #{datatable.effective_resource.sql_direction(direction)}"))
|
|
49
49
|
else
|
|
50
50
|
Effective::Resource.new(collection)
|
|
51
51
|
.order(column[:name], direction, as: column[:as], sort: column[:sort], sql_column: column[:sql_column], limit: datatable.limit)
|
|
@@ -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
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
app.config.to_prepare do
|
|
10
|
+
ActiveSupport.on_load :action_controller_base do
|
|
11
|
+
helper EffectiveDatatablesHelper
|
|
12
|
+
helper EffectiveDatatablesPrivateHelper
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
ActionController::Base.send :include, ::EffectiveDatatablesControllerHelper
|
|
15
|
+
end
|
|
14
16
|
end
|
|
15
17
|
end
|
|
16
18
|
|
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.
|
|
4
|
+
version: 4.11.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: 2022-
|
|
11
|
+
date: 2022-05-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|