Use datatables-responsive.

This improves the experience with the tables on mobile view.
This commit is contained in:
Jan Böhmer 2020-01-04 22:09:37 +01:00
parent 3caac22a0e
commit 4e7c50a301
7 changed files with 39 additions and 13 deletions

View file

@ -691,6 +691,10 @@ table.dataTable {
margin-top: 0 !important;
}
div.dataTables_wrapper div.dataTables_info {
white-space: normal;
}
/*******************************
Parts datatable styling

View file

@ -62,6 +62,9 @@ require( 'datatables.net-buttons/js/buttons.print.js' );
require( 'datatables.net-fixedheader-bs4' );
require( 'datatables.net-select-bs4' );
require('datatables.net-colreorder-bs4');
require('datatables.net-colreorder-bs4');
require('datatables.net-responsive-bs4');
require('datatables.net-responsive-bs4/css/responsive.bootstrap4.css');
require('bootstrap-select');
require('jquery-form');
require('corejs-typeahead/dist/typeahead.bundle.min');

View file

@ -518,6 +518,7 @@ class AjaxUI {
var promise = $('#part_list').initDataTables(settings,
{
colReorder: true,
responsive: true,
"fixedHeader": { header: $(window).width() >= 768, //Only enable fixedHeaders on devices with big screen. Fixes scrolling issues on smartphones.
headerOffset: $("#navbar").height()},
"buttons": [ {