diff options
author | Pjotr Prins | 2020-07-19 11:11:09 +0100 |
---|---|---|
committer | Pjotr Prins | 2020-07-19 11:11:09 +0100 |
commit | e4a89d13863517020bbe82293e52cea98418c983 (patch) | |
tree | cb786816b82abd825997a788f72af882d0eb2956 /bh20simplewebuploader/static/main.js | |
parent | 60212ade3721cc9eebc976d65c973ab6b690bd3e (diff) | |
download | bh20-seq-resource-e4a89d13863517020bbe82293e52cea98418c983.tar.gz bh20-seq-resource-e4a89d13863517020bbe82293e52cea98418c983.tar.lz bh20-seq-resource-e4a89d13863517020bbe82293e52cea98418c983.zip |
Search table
Diffstat (limited to 'bh20simplewebuploader/static/main.js')
-rw-r--r-- | bh20simplewebuploader/static/main.js | 16 |
1 files changed, 13 insertions, 3 deletions
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 += ' <div class="rTableCell">'; + html += text; + html += ' </div>'; + 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 = '<div class="rTable">'; rows.forEach(row => { + seq = row['seq']; html += '<div class="rTableRow">'; - html += ' <div class="rTableCell">'; - html += row["id"]; - html += ' </div>'; + html += cell(row['id']); + html += cell('<a href="'+seq+'">FASTA</a>'); html += '</div>'; }); html += '</div>'; } + console.log(html); document.getElementById("table").innerHTML = html; } |