effective_datatables 4.35.0 → 4.35.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 +4 -4
- data/app/assets/javascripts/effective_datatables/inline_crud.js.coffee +13 -2
- data/app/assets/stylesheets/effective_datatables/_overrides.bootstrap4.scss +16 -1
- data/app/helpers/effective_datatables_helper.rb +1 -1
- data/app/views/effective/datatables/_filters.html.haml +1 -1
- data/lib/effective_datatables/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 58ba852489ca6c3a824b03443eaeadde149e051212055e2bd62a1d8b59972f26
|
4
|
+
data.tar.gz: a112f67a6cc67a2d082f9f19ebd70b8dc8ef6b8537851cb1508782159d7598c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d46724dd25b495e4ccb796e688ddb9e0ea2c341d00755486419b1fa37efd2700b96a0becc6e0725e49354cec4eedae86295d13ffa168fa2ec7b806b92b05f4dd
|
7
|
+
data.tar.gz: a75f57a5ce59fd95997b5a550787e330019c286ff5ce9bb8782e2120b3312568c0f3eff47e0629df011a4a273f4cfb7006d059a1678be452f4c4d18ee1e72779
|
@@ -9,7 +9,7 @@ $(document).on 'ajax:before', '.dataTables_wrapper .col-actions', (event) ->
|
|
9
9
|
$table = $(event.target).closest('table')
|
10
10
|
|
11
11
|
return true if ('' + $action.data('inline')) == 'false'
|
12
|
-
return true if ('' + $action.data('nested-datatable
|
12
|
+
return true if ('' + $action.data('nested-datatable')) == 'true'
|
13
13
|
|
14
14
|
$params = $.param(
|
15
15
|
{
|
@@ -157,7 +157,12 @@ afterEdit = ($action) ->
|
|
157
157
|
$tr = $action.closest('tr')
|
158
158
|
$table = $tr.closest('table')
|
159
159
|
|
160
|
-
|
160
|
+
nestedDatatableAction = $tr.find('a[data-nested-datatable]')
|
161
|
+
|
162
|
+
html = if nestedDatatableAction.length > 0
|
163
|
+
buildNestedDatatableRow($tr.children('td').length, EffectiveForm.remote_form_payload, nestedDatatableAction.attr('title'))
|
164
|
+
else
|
165
|
+
buildRow($tr.children('td').length, EffectiveForm.remote_form_payload)
|
161
166
|
|
162
167
|
$tr.data('inline-form-original-html', $tr.children().detach())
|
163
168
|
$tr.html(html)
|
@@ -201,6 +206,12 @@ buildRow = (length, payload) ->
|
|
201
206
|
"<a href='#' class='btn btn-sm btn-outline-primary' title='Cancel' data-role='inline-form-cancel'>Cancel</a>" +
|
202
207
|
"</td>"
|
203
208
|
|
209
|
+
buildNestedDatatableRow = (length, payload, title) ->
|
210
|
+
"<td class='col-inline-form' colspan='#{length-1}'><div class='nested-datatable-container-parent'><div class='nested-datatable-container'><div class='nested-datatable-title'>#{title || ''}</div>#{payload}</div></div></td>" +
|
211
|
+
"<td class='col-actions col-actions-inline-form'>" +
|
212
|
+
"<a href='#' class='btn btn-sm btn-outline-primary' title='Cancel' data-role='inline-form-cancel'>Cancel</a>" +
|
213
|
+
"</td>"
|
214
|
+
|
204
215
|
expand = ($table) ->
|
205
216
|
$wrapper = $table.closest('.dataTables_wrapper').addClass('effective-datatables-inline-expanded')
|
206
217
|
$table.on 'draw.dt', (event) ->
|
@@ -72,7 +72,7 @@ table.dataTable > thead .sorting_desc {
|
|
72
72
|
table.dataTable thead {
|
73
73
|
th.col-actions {
|
74
74
|
text-align: right;
|
75
|
-
span { display: block;
|
75
|
+
span { display: block; }
|
76
76
|
}
|
77
77
|
}
|
78
78
|
|
@@ -184,6 +184,10 @@ table.dataTable > thead {
|
|
184
184
|
p { margin-bottom: 0; }
|
185
185
|
}
|
186
186
|
|
187
|
+
.form-group.datatables-filters-present {
|
188
|
+
margin-top: 1.75em;
|
189
|
+
}
|
190
|
+
|
187
191
|
// Processing div
|
188
192
|
div.dataTables_wrapper div.dataTables_processing {
|
189
193
|
margin: -26px 25% 0px 25%;
|
@@ -321,3 +325,14 @@ div.dt-button-collection .dt-button-active:after {
|
|
321
325
|
right: auto;
|
322
326
|
left: 0.5rem;
|
323
327
|
}
|
328
|
+
|
329
|
+
// Nested Datatables
|
330
|
+
.nested-datatable-container-parent {
|
331
|
+
padding-left: 0.25em;
|
332
|
+
padding-right: 0.25em;
|
333
|
+
container-type: inline-size;
|
334
|
+
}
|
335
|
+
|
336
|
+
.nested-datatable-container {
|
337
|
+
width: 100%;
|
338
|
+
}
|
@@ -138,7 +138,7 @@ module EffectiveDatatablesHelper
|
|
138
138
|
def nested_datatable_link_to(title, path, options = {})
|
139
139
|
options[:class] ||= 'btn btn-sm btn-link'
|
140
140
|
options['data-remote'] = true
|
141
|
-
options['data-nested-datatable
|
141
|
+
options['data-nested-datatable'] = true
|
142
142
|
|
143
143
|
link_to(title, path, options)
|
144
144
|
end
|
@@ -11,7 +11,7 @@
|
|
11
11
|
- else
|
12
12
|
= datatable_filter_tag(form, datatable, name, opts)
|
13
13
|
|
14
|
-
.form-group.col-auto
|
14
|
+
.form-group.col-auto{class: (datatable._filters.present? ? 'datatables-filters-present' : 'datatables-filters-blank')}
|
15
15
|
- if datatable._filters_form_required?
|
16
16
|
= form.save t('effective_datatables.apply'), 'data-disable-with': t('effective_datatables.applying'), class: 'btn btn-sm btn-secondary'
|
17
17
|
- else
|
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.35.
|
4
|
+
version: 4.35.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: 2025-05-
|
11
|
+
date: 2025-05-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|