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: a1f17f025870ed33dac35eb613043a406c79401a
4
- data.tar.gz: 5e87d8596b594b85f5b5928ae8decd9a2094611c
3
+ metadata.gz: a976fdcb95a6a0fa08a6f7cb3f22f33590a4d68c
4
+ data.tar.gz: 2dbd5417952dd9ac41471422e176595b8cf1dc49
5
5
  SHA512:
6
- metadata.gz: b57a3901c1cbdfdf45ab96b15204b951596e9631e468bc2ac856143e55923e21834feb6129ab5c7d79a00f41df4336e859b0bc9543c6bc9ce6b10a6964c0a08e
7
- data.tar.gz: a3967f42c2ed9a2de9769e5a091b1e231d1d9e64edba002b1d57c2a08639cc79990f482b26896b8026562e4b8b5a5f31a8c4e93e486c1d224ef1e1633a18b70c
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
- token = $bulkAction.parent('li').data('authenticity-token')
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 token # This is a file download
76
+ if downloadToken # This is a file download
76
77
  $.fileDownload(url,
77
78
  httpMethod: 'POST',
78
- data: { ids: values, authenticity_token: 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)
@@ -1,3 +1,3 @@
1
1
  module EffectiveDatatables
2
- VERSION = '4.4.3'.freeze
2
+ VERSION = '4.4.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_datatables
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.4.3
4
+ version: 4.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect