From e4a89d13863517020bbe82293e52cea98418c983 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Sun, 19 Jul 2020 11:11:09 +0100 Subject: Search table --- bh20simplewebuploader/static/main.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'bh20simplewebuploader/static/main.js') diff --git a/bh20simplewebuploader/static/main.js b/bh20simplewebuploader/static/main.js index 8271d2c..208823a 100644 --- a/bh20simplewebuploader/static/main.js +++ b/bh20simplewebuploader/static/main.js @@ -2,6 +2,15 @@ * Menu and navigation */ +/* Small helpers */ +function cell(text) { + html = "" + html += '
'; + html += text; + html += '
'; + return html +} + /* Convert a list of table items to an HTML DIV table */ function toDIVTable(rows) { if (rows.length == 0) @@ -9,14 +18,15 @@ function toDIVTable(rows) { else { html = '
'; rows.forEach(row => { + seq = row['seq']; html += '
'; - html += '
'; - html += row["id"]; - html += '
'; + html += cell(row['id']); + html += cell('FASTA'); html += '
'; }); html += '
'; } + console.log(html); document.getElementById("table").innerHTML = html; } -- cgit v1.2.3