effective_datatables 4.38.0 → 4.39.0
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: 5fe405963ee6a36df90da14af7cfdff5b60165c039ff9e751a4165b7eb220ab1
|
|
4
|
+
data.tar.gz: 3607ded1b1a473b6e8e677b6682f64008f78d5fa8c62309d5e41ce0ffb8f3b55
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a7f3a25ced743083d05b20082fa3aa70c190724008d8dfda17769ffc32b50918f403860c299921f6693d07a63c64c4904ebf77174ec2ea6ee7982e20b8c70fde
|
|
7
|
+
data.tar.gz: 9cc2261a17cb6afa6eb5880489cae2dce99be7c88317b437d8219101b7502f4bdd47c6b71268185f8aef5500aacf20b81be092e9183013cdb6887d0bed7e6194
|
|
@@ -41,11 +41,18 @@ $(document).on 'ajax:beforeSend', '.dataTables_wrapper .col-actions', (event, xh
|
|
|
41
41
|
true
|
|
42
42
|
|
|
43
43
|
# We have either completed the resource action, or fetched the inline form to load.
|
|
44
|
-
$(document).on 'ajax:success', '.dataTables_wrapper .col-actions', (event, data) ->
|
|
44
|
+
$(document).on 'ajax:success', '.dataTables_wrapper .col-actions', (event, data, status, xhr) ->
|
|
45
45
|
[data, status, xhr] = event.detail if event.detail # rails/ujs
|
|
46
46
|
|
|
47
47
|
$action = $(event.target)
|
|
48
48
|
|
|
49
|
+
# Rails UJS follows HTTP redirects inside XHR; navigate after a redirected action.
|
|
50
|
+
if typeof Turbo != 'undefined' && xhr?.responseURL && ($action.data('method') || 'get').toLowerCase() != 'get'
|
|
51
|
+
if xhr.responseURL != $action.prop('href') && (xhr.getResponseHeader('Content-Type') || '').includes('text/html')
|
|
52
|
+
Turbo.cache.clear()
|
|
53
|
+
Turbo.visit(xhr.responseURL, { action: 'replace' })
|
|
54
|
+
return true
|
|
55
|
+
|
|
49
56
|
return true if ('' + $action.data('inline')) == 'false'
|
|
50
57
|
|
|
51
58
|
if data.length > 0
|
|
@@ -140,7 +147,7 @@ afterNew = ($action) ->
|
|
|
140
147
|
$table.children('tbody').prepend($tr)
|
|
141
148
|
|
|
142
149
|
expand($table)
|
|
143
|
-
$tr.trigger('
|
|
150
|
+
$tr.trigger(if window.Turbo then 'turbo:load' else 'turbolinks:load')
|
|
144
151
|
$tr.hide().fadeIn()
|
|
145
152
|
|
|
146
153
|
beforeEdit = ($action) ->
|
|
@@ -171,7 +178,7 @@ afterEdit = ($action) ->
|
|
|
171
178
|
$tr.addClass('effective-datatables-inline-row')
|
|
172
179
|
|
|
173
180
|
expand($table)
|
|
174
|
-
$tr.trigger('
|
|
181
|
+
$tr.trigger(if window.Turbo then 'turbo:load' else 'turbolinks:load')
|
|
175
182
|
$tr.hide().fadeIn()
|
|
176
183
|
|
|
177
184
|
# This is when one of the resource actions completes
|