[FIX] Table width and header

This commit is contained in:
Peter Pfeufer 2023-12-10 14:06:04 +01:00
parent 0a6a6e0bf9
commit e16bb2a737
No known key found for this signature in database
GPG Key ID: 6051D2C6AD4EBC27
2 changed files with 10 additions and 9 deletions

View File

@ -58,7 +58,7 @@
{# {% include "bundles/filterdropdown-js.html" %}#}
<script>
$(document).ready(function () {
$(document).ready(() => {
const groupColumn = 0;
$('#tab_permissions_audit').DataTable({
@ -88,9 +88,9 @@
api.column(groupColumn, {
page: 'current'
}).data().each(function (group, i) {
}).data().each((group, i) => {
if (last !== group) {
$(rows).eq(i).before(`<tr class="h4 table-secondary"><td colspan="3">${group}</td></tr>`;
$(rows).eq(i).before(`<tr class="h5 table-secondary"><td colspan="3">${group}</td></tr>`);
last = group;
}

View File

@ -23,7 +23,7 @@
</p>
<div class="table-responsive">
<table class="table table-striped" id="tab_permissions_overview">
<table class="table table-striped" id="tab_permissions_overview" style="width: 100%;">
<thead>
<tr>
<th scope="col">{% translate "App" %}</th>
@ -77,9 +77,10 @@
[2, 'asc']
],
filterDropDown: {
columns: [{
idx: 0
},
columns: [
{
idx: 0
},
{
idx: 1
}
@ -88,7 +89,7 @@
},
"stateSave": true,
"stateDuration": 0,
drawCallback: (settings) => {
drawCallback: function(settings) {
const api = this.api();
const rows = api.rows({
page: 'current'
@ -99,7 +100,7 @@
page: 'current'
}).data().each((group, i) => {
if (last !== group) {
$(rows).eq(i).before(`<tr class="h4 table-secondary"><td colspan="6">${group}</td></tr>`);
$(rows).eq(i).before(`<tr class="h5 table-secondary"><td colspan="6">${group}</td></tr>`);
last = group;
}