Add table options also to userobjects view (closes #2573)

This commit is contained in:
Bernd Bestel 2024-08-24 19:42:41 +02:00
parent d186e26898
commit 1323fff3e2
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
3 changed files with 14 additions and 6 deletions

View File

@ -54,7 +54,7 @@
### Userfields
- xxx
- Userentity tables (custom objects / lists) now also have the table options icon (top left corner eye icon, to e.g. add a grouping condition)
### General

View File

@ -1,11 +1,11 @@
var userobjectsTable = $('#userobjects-table').DataTable({
var userobjectsTable = $('.userobjects-table').DataTable({
'order': [[1, 'asc']],
'columnDefs': [
{ 'orderable': false, 'targets': 0 },
{ 'searchable': false, "targets": 0 }
].concat($.fn.dataTable.defaults.columnDefs)
});
$('#userobjects-table tbody').removeClass("d-none");
$('.userobjects-table tbody').removeClass("d-none");
userobjectsTable.columns.adjust().draw();
$("#search").on("keyup", Delay(function()

View File

@ -72,11 +72,19 @@
<div class="row">
<div class="col">
<table id="userobjects-table"
class="table table-sm table-striped nowrap w-100">
<table id="userobjects-table-{{$userentity->id}}"
class="table table-sm table-striped nowrap w-100 userobjects-table">
<thead>
<tr>
<th class="border-right d-print-none"></th>
<th class="border-right d-print-none">
<a class="text-muted change-table-columns-visibility-button"
data-toggle="tooltip"
data-toggle="tooltip"
title="{{ $__t('Table options') }}"
data-table-selector="#userobjects-table-{{$userentity->id}}"
href="#"><i class="fa-solid fa-eye"></i>
</a>
</th>
@include('components.userfields_thead', array(
'userfields' => $userfields