effective_datatables 4.4.0 → 4.4.1
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7efc5c4ebe5adbadcf46a1368c3034601e32ba38
|
4
|
+
data.tar.gz: c167f47e82261487b9fa1574c75dc116216314c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6aaa13c5b1b4e90d3b3c7d00090c44482753541a0fdd8feb02bab110223e6e7222bab2bef886900f5fa222292f6ec767634e87d94b0ac37855f60b3f765293ee
|
7
|
+
data.tar.gz: 6f1dcd266204fca3f546c5dfcbf43e56e3ece6f089dc8efa8ae12b63e237951d0d3cd1dd1ea162818b43499b834b8b059343c38087a456a86e106bb42c66f0ef
|
@@ -39,8 +39,10 @@ $(document).on 'ajax:success', '.dataTables_wrapper .col-actions', (event) ->
|
|
39
39
|
# There was an error completing something
|
40
40
|
$(document).on 'ajax:error', '.dataTables_wrapper', (event) ->
|
41
41
|
$action = $(event.target)
|
42
|
-
|
43
|
-
|
42
|
+
|
43
|
+
return true if ('' + $action.data('inline')) == 'false'
|
44
|
+
|
45
|
+
afterError($action)
|
44
46
|
|
45
47
|
EffectiveForm.remote_form_payload = ''
|
46
48
|
EffectiveForm.remote_form_flash = ''
|
@@ -146,6 +148,22 @@ afterAction = ($action) ->
|
|
146
148
|
$table.DataTable().draw()
|
147
149
|
refreshDatatables($table)
|
148
150
|
|
151
|
+
afterError = ($action) ->
|
152
|
+
$table = $action.closest('table')
|
153
|
+
$td = $action.closest('td')
|
154
|
+
|
155
|
+
# Show dropdown
|
156
|
+
$td.children('.btn-group').show()
|
157
|
+
|
158
|
+
# Hide spinner
|
159
|
+
$td.children('svg').hide()
|
160
|
+
|
161
|
+
# Cancel
|
162
|
+
cancel($table)
|
163
|
+
|
164
|
+
# Don't redraw
|
165
|
+
$table.DataTable().flash('unable to ' + ($action.attr('title') || 'complete action'), 'danger')
|
166
|
+
|
149
167
|
buildRow = (length, payload) ->
|
150
168
|
"<td class='col-inline-form' colspan='#{length-1}'><div class='container'>#{payload}</div></td>" +
|
151
169
|
"<td class='col-actions col-actions-inline-form'>" +
|
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.
|
4
|
+
version: 4.4.1
|
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-03-
|
11
|
+
date: 2019-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|