effective_datatables 4.11.0 → 4.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/effective_datatables/bulk_actions.js.coffee +4 -3
- data/app/models/effective/datatable_dsl_tool.rb +5 -5
- data/app/models/effective/datatable_value_tool.rb +1 -0
- data/app/models/effective/effective_datatable/dsl/bulk_actions.rb +1 -1
- data/lib/effective_datatables/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42b5024f89eb0023d4726035fd8312fae684f291cc108ca3adfb16bdf830aac5
|
4
|
+
data.tar.gz: 411a3ec031d8ec63b7f12fa71d71ba5aa50743b24c145d494d814e77081aea40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b14bbea43b5c06f24cec46c1ffbee82dc86806deefc0bd81dc74f12dd73a850004b4dac59dac83fd24fe69a4cf75b281a2f498b4752035d4a13d2be2ef1c07c
|
7
|
+
data.tar.gz: 2cbf3ed396bb3be677531d02220de5fa1952ea01c481c7ffb426429de9ed0050a65923debfba606cbe0344f57ebe79fe33f1ef464b13959140dc2ce0c5bf020f
|
@@ -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')
|
@@ -18,7 +18,7 @@ module Effective
|
|
18
18
|
@view = datatable.view
|
19
19
|
end
|
20
20
|
|
21
|
-
def method_missing(method, *args, &block)
|
21
|
+
def method_missing(method, *args, **kwargs, &block)
|
22
22
|
# Catch a common error
|
23
23
|
if [:bulk_actions, :charts, :collection, :filters].include?(method) && in_datatables_do_block
|
24
24
|
raise "#{method} block must be declared outside the datatable do ... end block"
|
@@ -26,15 +26,15 @@ module Effective
|
|
26
26
|
|
27
27
|
if datatable.respond_to?(method)
|
28
28
|
if block_given?
|
29
|
-
datatable.send(method, *args) { yield }
|
29
|
+
datatable.send(method, *args, **kwargs) { yield }
|
30
30
|
else
|
31
|
-
datatable.send(method, *args)
|
31
|
+
datatable.send(method, *args, **kwargs)
|
32
32
|
end
|
33
33
|
elsif view.respond_to?(method)
|
34
34
|
if block_given?
|
35
|
-
view.send(method, *args) { yield }
|
35
|
+
view.send(method, *args, **kwargs) { yield }
|
36
36
|
else
|
37
|
-
view.send(method, *args)
|
37
|
+
view.send(method, *args, **kwargs)
|
38
38
|
end
|
39
39
|
else
|
40
40
|
super
|
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.12.0
|
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-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|