From e963e7495da6af5e7138c9a5032f4156b0441011 Mon Sep 17 00:00:00 2001 From: DjVinnii Date: Thu, 1 Apr 2021 18:02:50 +0200 Subject: [PATCH] Create datatable based on dataTable class instead of table class --- core/admin/assets/app.js | 2 +- core/admin/mailu/ui/templates/client.html | 8 ++------ core/admin/mailu/ui/templates/domain/details.html | 2 +- core/admin/mailu/ui/templates/macros.html | 7 +++++-- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/core/admin/assets/app.js b/core/admin/assets/app.js index d87832a6..2b3ad9ee 100644 --- a/core/admin/assets/app.js +++ b/core/admin/assets/app.js @@ -11,7 +11,7 @@ jQuery("document").ready(function() { tags: true, tokenSeparators: [',', ' '] }); - jQuery(".table").DataTable({ + jQuery(".dataTable").DataTable({ "responsive": true, }); }); diff --git a/core/admin/mailu/ui/templates/client.html b/core/admin/mailu/ui/templates/client.html index ee1b1c28..1fdcb7cb 100644 --- a/core/admin/mailu/ui/templates/client.html +++ b/core/admin/mailu/ui/templates/client.html @@ -9,8 +9,7 @@ configure your email client {% endblock %} {% block content %} -{% call macros.card(title="Incoming mail") %} - +{% call macros.table(title="Incoming mail", datatable=False) %} @@ -33,11 +32,9 @@ configure your email client -
{% trans %}Mail protocol{% endtrans %}
*******
{% endcall %} -{% call macros.card(title="Outgoing mail") %} - +{% call macros.table(title="Outgoing mail", datatable=False) %} @@ -60,6 +57,5 @@ configure your email client -
{% trans %}Mail protocol{% endtrans %}
*******
{% endcall %} {% endblock %} diff --git a/core/admin/mailu/ui/templates/domain/details.html b/core/admin/mailu/ui/templates/domain/details.html index 8aa35f22..29db5f6d 100644 --- a/core/admin/mailu/ui/templates/domain/details.html +++ b/core/admin/mailu/ui/templates/domain/details.html @@ -21,7 +21,7 @@ {% endblock %} {% block content %} -{% call macros.table() %} +{% call macros.table(datatable=False) %} {% set hostname = config["HOSTNAMES"].split(",")[0] %} {% trans %}Domain name{% endtrans %} diff --git a/core/admin/mailu/ui/templates/macros.html b/core/admin/mailu/ui/templates/macros.html index 4611b2d7..5acc5bed 100644 --- a/core/admin/mailu/ui/templates/macros.html +++ b/core/admin/mailu/ui/templates/macros.html @@ -83,14 +83,17 @@ {% endmacro %} -{% macro table(theme="primary") %} +{% macro table(title=None, theme="primary", datatable=True) %}
+ {% if title %} +

{{ title }}

+ {% endif %}
- +
{{ caller() }}