diff options
author | Pjotr Prins | 2020-07-19 09:11:41 +0100 |
---|---|---|
committer | Pjotr Prins | 2020-07-19 09:11:41 +0100 |
commit | 7b2d388dbed11384c6a388a5437cca0b8f2914fd (patch) | |
tree | f2707c6811948b9c6adc63534ff456266508c109 /bh20simplewebuploader/static/main.js | |
parent | 0e4cb2c14b62ed4f39271c6006a99cea954fc688 (diff) | |
download | bh20-seq-resource-7b2d388dbed11384c6a388a5437cca0b8f2914fd.tar.gz bh20-seq-resource-7b2d388dbed11384c6a388a5437cca0b8f2914fd.tar.lz bh20-seq-resource-7b2d388dbed11384c6a388a5437cca0b8f2914fd.zip |
Wiring up export function
Diffstat (limited to 'bh20simplewebuploader/static/main.js')
-rw-r--r-- | bh20simplewebuploader/static/main.js | 10 |
1 files changed, 7 insertions, 3 deletions
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)); } |