Code format

This commit is contained in:
Molkobain
2021-05-21 10:35:18 +02:00
parent f544d53c36
commit 6a1b1d7740
4 changed files with 53 additions and 71 deletions

View File

@@ -22,7 +22,6 @@ var table{{ oUIBlock.GetId()|sanitize(constant('utils::ENUM_SANITIZATION_FILTER_
],
{% endif %}
});
if ($('#{{ oUIBlock.GetId() }}').find('thead').is(':visible'))
{
if ($('#{{ oUIBlock.GetId() }}').find('thead').is(':visible')) {
table{{ oUIBlock.GetId()|sanitize(constant('utils::ENUM_SANITIZATION_FILTER_ELEMENT_IDENTIFIER')) }}.columns.adjust().draw();
}

View File

@@ -35,15 +35,15 @@ $('#{{ oUIBlock.GetId() }}').DataTable({
rowId: "id",
filter: false,
{% if oUIBlock.GetOption("pageLength") is not empty %}
pageLength: {{ oUIBlock.GetOption("pageLength") }},
pageLength: {{ oUIBlock.GetOption("pageLength") }},
{% endif %}
{% if oUIBlock.GetData()|length <= iPageSize %}
paging: false,
paging: false,
{% endif %}
{% if oUIBlock.GetOption("dom") is not empty %}
dom: "<'ibo-datatable-toolbar'{{ oUIBlock.GetOption("dom") }}>t",
dom: "<'ibo-datatable-toolbar'{{ oUIBlock.GetOption("dom") }}>t",
{% else %}
dom: "<'ibo-datatable--toolbar'<'ibo-datatable--toolbar-left' pl><'ibo-datatable--toolbar-right' i>>t<'ibo-datatable--toolbar'<'ibo-datatable--toolbar-left' pl><'ibo-datatable--toolbar-right' i>>",
dom: "<'ibo-datatable--toolbar'<'ibo-datatable--toolbar-left' pl><'ibo-datatable--toolbar-right' i>>t<'ibo-datatable--toolbar'<'ibo-datatable--toolbar-left' pl><'ibo-datatable--toolbar-right' i>>",
{% endif %}
lengthMenu: [[ {{ iPageSize }}, {{ iPageSize*2 }}, {{ iPageSize*3 }}, {{ iPageSize*4 }}, -1], [ {{ iPageSize }}, {{ iPageSize*2 }}, {{ iPageSize*3 }}, {{ iPageSize*4 }}, "{{ 'UI:Datatables:Language:DisplayLength:All'|dict_s }}"]],
columns: [