effective_datatables 4.4.3 → 4.4.4
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a976fdcb95a6a0fa08a6f7cb3f22f33590a4d68c
|
4
|
+
data.tar.gz: 2dbd5417952dd9ac41471422e176595b8cf1dc49
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1df233ae2302a519c4a308d271ae5c4fe20983f035a03667cea30152d87f6a6f001d2468d259c8c0dbe7d9e7a3dbf39477b840564e75b4e64f72bd15a52db41
|
7
|
+
data.tar.gz: cb9397af7b7082c4c28386cf265027aabea7472c07b7d1623cb7929f2699f5e9935632fed7684edb7eb5aefe38f174d1bbed889cae0e9a73e1d526cc1afffe76
|
@@ -53,7 +53,8 @@ $(document).on 'click', '.dataTables_wrapper .buttons-bulk-actions a', (event) -
|
|
53
53
|
|
54
54
|
url = $bulkAction.attr('href')
|
55
55
|
title = $bulkAction.text()
|
56
|
-
|
56
|
+
downloadToken = $bulkAction.parent('li').data('authenticity-token')
|
57
|
+
token = $table.data('authenticity-token')
|
57
58
|
values = $.map($selected, (input) -> input.getAttribute('value'))
|
58
59
|
method = $bulkAction.data('ajax-method')
|
59
60
|
|
@@ -72,10 +73,10 @@ $(document).on 'click', '.dataTables_wrapper .buttons-bulk-actions a', (event) -
|
|
72
73
|
|
73
74
|
$table.dataTable().data('bulk-actions-restore-selected-values', values)
|
74
75
|
|
75
|
-
if
|
76
|
+
if downloadToken # This is a file download
|
76
77
|
$.fileDownload(url,
|
77
78
|
httpMethod: 'POST',
|
78
|
-
data: { ids: values, authenticity_token:
|
79
|
+
data: { ids: values, authenticity_token: downloadToken }
|
79
80
|
successCallback: ->
|
80
81
|
success = "Successfully completed #{title} bulk action"
|
81
82
|
$table.one 'draw.dt', (e) -> $(e.target).DataTable().flash(success, 'success')
|
@@ -91,7 +92,7 @@ $(document).on 'click', '.dataTables_wrapper .buttons-bulk-actions a', (event) -
|
|
91
92
|
$.ajax(
|
92
93
|
method: method,
|
93
94
|
url: url,
|
94
|
-
data: { ids: values }
|
95
|
+
data: { ids: values, authenticity_token: token }
|
95
96
|
).done((response) ->
|
96
97
|
success = response['message'] || "Successfully completed #{title} bulk action"
|
97
98
|
$table.one 'draw.dt', (e) -> $(e.target).DataTable().flash(success, 'success') and restoreSelected($(e.target), values)
|