diff --git a/app/static/js/nopaque.lists.js b/app/static/js/nopaque.lists.js index f604b20d68a1668a6f85a95330be72008a106363..8f72fc92a30cfe4ed76b277b63510f51ddf9242b 100644 --- a/app/static/js/nopaque.lists.js +++ b/app/static/js/nopaque.lists.js @@ -164,11 +164,12 @@ JobList.DEFAULT_OPTIONS = { class ResultList extends List { - createResultRowElement(item) { + createResultRowElement(item, chunk) { let values, cpos, matchRowElement, lcCellElement, lcTokenElement, token; // gather values from item values = item.values(); - + console.log("CHONK"); + console.log(chunk); // get infos for full match row matchRowElement = document.createElement("tr"); for (cpos of values["lc"]) { @@ -178,10 +179,11 @@ class ResultList extends List { lcTokenElement.classList.add("token"); lcTokenElement.dataset.cpos = cpos; token = chunk["cpos_lookup"][cpos]; - lcTokenElement = token["word"]; - console.log(lcTokenElement.outerHTML); + lcTokenElement.innerText = token["word"]; + lcCellElement.appendChild(lcTokenElement); // let hit_tokens = ""; } + matchRowElement.appendChild(lcCellElement); // // get infos of match // let textTitles = new Set(); // for (cpos of match["hit"]) { @@ -222,6 +224,7 @@ class ResultList extends List { // // matchRowElement.appendChild(rc_tokens); // // matchRowElement.appendChild(index); // } - // return matchRowElement + console.log(matchRowElement.outerHTML); + return matchRowElement } } diff --git a/app/templates/corpora/analyse_corpus.html.j2 b/app/templates/corpora/analyse_corpus.html.j2 index a1054be4245626fea7f9d5e459c835266e36829a..04d511c1de659d1f963a8abc652349c3bef6369e 100644 --- a/app/templates/corpora/analyse_corpus.html.j2 +++ b/app/templates/corpora/analyse_corpus.html.j2 @@ -382,7 +382,7 @@ } resultList.add(resultItems, items => { for (let item of items) { - item.elm = resultList.createResultRowElement(item);} + item.elm = resultList.createResultRowElement(item, chunk);} }); resultList.update(); });