From 5fe583386102a3d9adf7aa44e542da38bed2a18d Mon Sep 17 00:00:00 2001 From: ehpersonal38 <103586016+ehpersonal38@users.noreply.github.com> Date: Tue, 24 May 2022 09:33:35 -0400 Subject: [PATCH] Update todays_detections.php --- scripts/todays_detections.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/todays_detections.php b/scripts/todays_detections.php index a5866cd..b37b89d 100644 --- a/scripts/todays_detections.php +++ b/scripts/todays_detections.php @@ -247,7 +247,11 @@ document.getElementById("searchterm").onkeydown = (function(e) { }); function switchViews(element) { - document.getElementById("detections_table").innerHTML = "

Loading detections...

"; + if(searchterm == ""){ + document.getElementById("detections_table").innerHTML = "

Loading detections...

"; + } else { + document.getElementById("detections_table").innerHTML = "

Loading...

"; + } if(element.innerHTML == "Legacy view") { element.innerHTML = "Normal view"; loadDetections(undefined); @@ -277,7 +281,7 @@ function loadDetections(detections_limit, element=undefined) { } } - if(searchterm !== ""){ + if(searchterm != ""){ xhttp.open("GET", "todays_detections.php?ajax_detections=true&display_limit="+detections_limit+"&searchterm="+searchterm, true); } else { xhttp.open("GET", "todays_detections.php?ajax_detections=true&display_limit="+detections_limit, true);