From bd6cf9dd7fec8e2ba9df6fb6f5fdd6f4d8c63403 Mon Sep 17 00:00:00 2001 From: Kim Huebel Date: Wed, 24 Mar 2021 17:56:17 +0000 Subject: [PATCH] Remove QSO-column and Copy-button in lh-tab if qso-tab is disabled --- html/index.html | 6 ++++++ html/js/functions.js | 27 +++++++++++++++------------ html/js/version.js | 2 +- 3 files changed, 22 insertions(+), 13 deletions(-) diff --git a/html/index.html b/html/index.html index 14925a3..e336f67 100644 --- a/html/index.html +++ b/html/index.html @@ -320,6 +320,12 @@ "columnDefs": [ { className: "dt-nowrap", "targets": [ 0, 1, 2, 3, 7 ] } ], + "columnDefs": [ + { + "targets": [ 8 ], + "visible": qso > 0 + } + ], 'rowCallback': function(row, data, index){ // Calculating LOSS if(parseInt(data[6].substring(0, data[6].indexOf("%"))) <= 5){ diff --git a/html/js/functions.js b/html/js/functions.js index 034636b..3748716 100644 --- a/html/js/functions.js +++ b/html/js/functions.js @@ -290,18 +290,21 @@ function getBER(logline) { } function getAddToQSO(logline) { - callsign = logline.substring(logline.indexOf("from") + 5, logline.indexOf("to")).trim(); - name = ""; - if (callsign.indexOf("$") > 0) { - name = callsign.substring(callsign.indexOf("$") + 1, callsign.lastIndexOf("$")); - if (name == "$") - name = ""; - callsign = callsign.substring(0, callsign.indexOf("$")); - } - if (name == "" ) { - retval = '
'; - } else { - retval = '
'; + retval = ""; + if (qso > 0) { + callsign = logline.substring(logline.indexOf("from") + 5, logline.indexOf("to")).trim(); + name = ""; + if (callsign.indexOf("$") > 0) { + name = callsign.substring(callsign.indexOf("$") + 1, callsign.lastIndexOf("$")); + if (name == "$") + name = ""; + callsign = callsign.substring(0, callsign.indexOf("$")); + } + if (name == "" ) { + retval = '
'; + } else { + retval = '
'; + } } return retval; } diff --git a/html/js/version.js b/html/js/version.js index 25644b4..3cab419 100644 --- a/html/js/version.js +++ b/html/js/version.js @@ -1 +1 @@ -var dashboard_version = "2021-03-14 10:53:56"; +var dashboard_version = "2021-03-24 17:56:17";