From 0713c37a6575c2f512f4f52b6275826630390915 Mon Sep 17 00:00:00 2001 From: Joshua Date: Thu, 21 Jul 2022 11:57:02 +1000 Subject: [PATCH] Try differnt mobile detect method --- front/devices.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/front/devices.php b/front/devices.php index 4c31f150..5fec26da 100644 --- a/front/devices.php +++ b/front/devices.php @@ -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 },