From 7b2d388dbed11384c6a388a5437cca0b8f2914fd Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Sun, 19 Jul 2020 09:11:41 +0100 Subject: Wiring up export function --- bh20simplewebuploader/static/main.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'bh20simplewebuploader/static') diff --git a/bh20simplewebuploader/static/main.js b/bh20simplewebuploader/static/main.js index 1633c25..dc0864b 100644 --- a/bh20simplewebuploader/static/main.js +++ b/bh20simplewebuploader/static/main.js @@ -21,8 +21,6 @@ function fetchAPI(apiEndPoint) { .then(data => { console.log(data); }); - document.getElementById("map_view").classList.add("invisible"); - document.getElementById("loader").classList.remove("invisible"); } // Copy from function above but now output HTML table instead of plain json @@ -51,7 +49,13 @@ function fetchHTMLTable(apiEndPoint) { } -let search = () => { +/* Fetch record info using a 'global search' */ +let searchGlobal = () => { + let m = document.getElementById('search-input').value; + fetchAPI(scriptRoot + "/api/search?s=" + encodeURIComponent(m)); +} + +let searchSeq = () => { let m = document.getElementById('search-input').value; fetchAPI(scriptRoot + "/api/getDetailsForSeq?seq=" + encodeURIComponent(m)); } -- cgit v1.2.3