diff --git a/css/backoffice/components/_datatable.scss b/css/backoffice/components/_datatable.scss index 89b0aeaee..63d5e3186 100644 --- a/css/backoffice/components/_datatable.scss +++ b/css/backoffice/components/_datatable.scss @@ -125,4 +125,23 @@ $ibo-fieldsorter--selected--background-color: $ibo-color-blue-200 !default; .ibo-datatable--selected-count, .ibo-datatable--result-count{ padding-right: 0.2em; padding-left: 0.1em; +} + +// +.ibo-datatable[data-status="loading"]{ + margin-top: $ibo-datatable--toolbar--table-spacing; + td, th { + position: relative; + padding: $ibo-vendors-datatables--cell--padding-y $ibo-vendors-datatables--cell--padding-x; + } + td{ + @extend %ibo-font-ral-med-100; + } + tr:nth-child(even){ + background-color: $ibo-vendors-datatables--row--background-color--is-even; + } + th { + @extend %ibo-font-ral-sembol-100; + border-bottom: $ibo-vendors-datatables--columns-header--border-bottom; + } } \ No newline at end of file diff --git a/templates/base/components/datatable/layout.html.twig b/templates/base/components/datatable/layout.html.twig index 4db597a8d..9b4550fda 100644 --- a/templates/base/components/datatable/layout.html.twig +++ b/templates/base/components/datatable/layout.html.twig @@ -12,7 +12,7 @@ {% endif %} {% endif %} -
| diff --git a/templates/base/components/datatable/layout.ready.js.twig b/templates/base/components/datatable/layout.ready.js.twig index 3b753c6c8..32ec7f0a0 100644 --- a/templates/base/components/datatable/layout.ready.js.twig +++ b/templates/base/components/datatable/layout.ready.js.twig @@ -339,6 +339,10 @@ var oTable{{ sListIDForVarSuffix }} = $('#{{ oUIBlock.GetId() }}').DataTable({ {% endfor %} {% endif %} {% endif %} + + // Set header and body datatables status as loaded + this.attr('data-status', 'loaded'); + this.closest('.dataTables_scroll').find('.dataTables_scrollHead .ibo-datatable').attr('data-status', 'loaded'); } }); diff --git a/templates/base/components/datatable/static/formtable/layout.html.twig b/templates/base/components/datatable/static/formtable/layout.html.twig index 9e2316217..8b8eb3327 100644 --- a/templates/base/components/datatable/static/formtable/layout.html.twig +++ b/templates/base/components/datatable/static/formtable/layout.html.twig @@ -4,7 +4,7 @@ {% set columns = oUIBlock.GetColumns() %} - |
|---|