[CHANGE] Update serverside datatables docs

This commit is contained in:
Peter Pfeufer
2026-01-20 08:22:25 +00:00
committed by Ariel Rin
parent ee132b6e60
commit df6a25067d
11 changed files with 99 additions and 18 deletions

View File

@@ -115,7 +115,7 @@ class DataTablesView(View):
_type = str(c["columnControl"]["search"]["type"])
if _type == "text":
if _logic == "notEmpty":
except_qs |= Q(**{f'{_c}': ""})
except_qs |= Q(**{f'{_c}': ""})
elif len(_sv) > 0:
if _logic == "notContains":
except_qs |= Q(**{f'{_c}__icontains': _sv})
@@ -123,7 +123,7 @@ class DataTablesView(View):
except_qs |= Q(**{f'{_c}': _sv})
elif _type == "num":
if _logic == "notEmpty":
except_qs |= Q(**{f'{_c}__isnull': False})
except_qs |= Q(**{f'{_c}__isnull': False})
elif len(_sv) > 0:
if _logic == "notEqual":
try:

View File

@@ -179,3 +179,34 @@
border-left-color: var(--bs-warning);
}
}
/* DataTables 2
------------------------------------------------------------------------------------- */
@media all {
/* DataTables Processing Indicator
--------------------------------------------------------------------------------- */
div.dt-processing {
padding-top: 0.5rem !important;
}
div.dt-processing > div {
display: none;
}
svg.aa-datatables-process-indicator {
width: 2rem;
height: 2rem;
}
/* DataTables Extension: ColumnControl
--------------------------------------------------------------------------------- */
table.dataTable span.dtcc div.dtcc-search > div select {
background-color: var(--bs-body-bg);
color: var(--bs-body-color);
padding: 0.375rem;
}
table.dataTable .dt-column-header div.dtcc-search-title {
display: none;
}
}

View File

@@ -0,0 +1,9 @@
{% load i18n %}
<svg class="aa-datatables-process-indicator">
<use href="#aa-loading-spinner"></use>
</svg>
<p class="my-1">
{% translate "Loading …" %}
</p>