Try differnt mobile detect method

This commit is contained in:
Joshua
2022-07-21 11:57:02 +10:00
parent f825d19eb4
commit 0713c37a65

View File

@@ -229,6 +229,12 @@ function main () {
// -----------------------------------------------------------------------------
function initializeDatatable () {
if (window.screen.width < 400) {
var tableColumnShow = [10,11,12,1,2,3,4,5,6,8];
} else {
var tableColumnShow = [10, 11, 12];
};
var table=
$('#tableDevices').DataTable({
'paging' : true,
@@ -247,7 +253,7 @@ function initializeDatatable () {
'columnDefs' : [
// Only display all collums on non mobile device width - still in testing phase
{visible: false, targets: if ($(window).width() < 400) {[10,11,12,1,2,3,4,5,6,8]} else {[10, 11, 12]} },
{visible: false, targets: tableColumnShow },
{className: 'text-center', targets: [3, 8, 9] },
{width: '80px', targets: [5, 6] },
{width: '0px', targets: 9 },