effective_datatables 4.3.23 → 4.3.24
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: 837c6fb296619d4702ade84dabb37a83b5365857
|
4
|
+
data.tar.gz: 98fb11c65c1ed5fcddf849fdc06cc0d43cabfce3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 946f4f80a506e7c8f6b5ab7445b8e274068cc5d10fcdb0fa5d475240976d19ed58aeae7996593e8af1686f59ad48685ae1c0293ff53ac9b6f6df199fb2077a26
|
7
|
+
data.tar.gz: 33f482a18a73adf8901f57d87f50c6262abcd5981b755555990fb4f2e0f31f50e8e871daf62a9f2204b4ad0b168b1dc874786a3856e86ae65166d673f676661f
|
@@ -64,17 +64,19 @@ $(document).on 'effective-form:success', '.dataTables_wrapper .col-inline-form',
|
|
64
64
|
$table = $tr.closest('table')
|
65
65
|
|
66
66
|
if $tr.hasClass('effective-datatables-new-resource')
|
67
|
-
$table.DataTable().flash(flash || 'Item created', 'success')
|
67
|
+
$table.DataTable().flash(flash || 'Item created', 'success')
|
68
68
|
$tr.fadeOut('slow')
|
69
69
|
|
70
70
|
$actions = $table.children('thead').find('th.col-actions')
|
71
71
|
$actions.children('svg').remove()
|
72
72
|
$actions.children('a').fadeIn()
|
73
73
|
else
|
74
|
-
$table.DataTable().flash(flash || 'Item updated', 'success')
|
74
|
+
$table.DataTable().flash(flash || 'Item updated', 'success')
|
75
75
|
$tr.fadeOut('slow')
|
76
76
|
|
77
|
-
|
77
|
+
unless redirectDatatables($table)
|
78
|
+
$table.DataTable().draw()
|
79
|
+
refreshDatatables($table)
|
78
80
|
|
79
81
|
beforeNew = ($action) ->
|
80
82
|
$table = $action.closest('table')
|
@@ -136,11 +138,13 @@ afterAction = ($action) ->
|
|
136
138
|
|
137
139
|
if EffectiveForm.remote_form_flash.length > 0
|
138
140
|
flash = EffectiveForm.remote_form_flash[0]
|
139
|
-
$table.DataTable().flash(flash[1], flash[0])
|
141
|
+
$table.DataTable().flash(flash[1], flash[0])
|
140
142
|
else
|
141
|
-
$table.DataTable().flash('Successfully ' + $action.attr('title'), 'success')
|
143
|
+
$table.DataTable().flash('Successfully ' + $action.attr('title'), 'success')
|
142
144
|
|
143
|
-
|
145
|
+
unless redirectDatatables($table)
|
146
|
+
$table.DataTable().draw()
|
147
|
+
refreshDatatables($table)
|
144
148
|
|
145
149
|
buildRow = (length, payload) ->
|
146
150
|
"<td class='col-inline-form' colspan='#{length-1}'><div class='container'>#{payload}</div></td>" +
|
@@ -158,6 +162,19 @@ cancel = ($table) ->
|
|
158
162
|
if $wrapper.find('.effective-datatables-inline-row').length == 0
|
159
163
|
$wrapper.removeClass('effective-datatables-inline-expanded')
|
160
164
|
|
165
|
+
redirectDatatables = ($source) ->
|
166
|
+
return false unless EffectiveForm.remote_form_refresh_datatables.length > 0
|
167
|
+
|
168
|
+
if EffectiveForm.remote_form_refresh_datatables.includes('refresh')
|
169
|
+
if Turbolinks?
|
170
|
+
Turbolinks.visit(window.location.href, { action: 'replace'})
|
171
|
+
else
|
172
|
+
window.location.reload()
|
173
|
+
|
174
|
+
return true
|
175
|
+
|
176
|
+
false
|
177
|
+
|
161
178
|
refreshDatatables = ($source) ->
|
162
179
|
return unless EffectiveForm.remote_form_refresh_datatables.length > 0
|
163
180
|
|
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.3.
|
4
|
+
version: 4.3.24
|
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: 2019-
|
11
|
+
date: 2019-03-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|