Commit 586b0442 authored by Joe TS Dell's avatar Joe TS Dell
Browse files

Merge branch 'master' of https://transfer.hft-stuttgart.de/gitlab/ugl/website into master

parents 56e319c4 14517ce9
Pipeline #4438 passed with stage
in 34 seconds
...@@ -161,6 +161,10 @@ xmlHttpRequest.onload = function (e) { ...@@ -161,6 +161,10 @@ xmlHttpRequest.onload = function (e) {
if ( i == jsonOutput.length - 1) { if ( i == jsonOutput.length - 1) {
console.log("Add the paper ....") console.log("Add the paper ....")
// Start loading/adding the paper content to the page here ..... // Start loading/adding the paper content to the page here .....
for (var j = 0; j < 6; j++) {
addpaper(jsonContent[j]);
//Do something
}
} }
} }
//console.log(jsonContent); //console.log(jsonContent);
......
...@@ -34,14 +34,18 @@ function search() { ...@@ -34,14 +34,18 @@ function search() {
} }
function search_paper() { function search_paper() {
const fuse = new Fuse(stuff_paper, options_paper); const fuse = new Fuse(jsonContent, options_paper); //stuff_paper
searchanswer_paper = fuse.search(document.getElementById("search-input_paper").value) searchanswer_paper = fuse.search(document.getElementById("search-input_paper").value)
document.getElementById("nextblock").style.display = "none"; document.getElementById("nextblock").style.display = "none";
var new_row = document.getElementById("cont_paper") var new_row = document.getElementById("cont_paper")
new_row.innerHTML = ""; new_row.innerHTML = "";
var searchLength = searchanswer_paper.length; var searchLength = searchanswer_paper.length;
for (var i = 0; i < searchLength; i++) { for (var i = 0; i < searchLength; i++) {
addpaper(searchanswer_paper[i].item); console.log(searchanswer_paper[i])
if (searchanswer_paper[i].score < 0.5){
addpaper(searchanswer_paper[i].item);
}
//Do something //Do something
} }
// alert(searchanswer); // alert(searchanswer);
...@@ -174,6 +178,7 @@ function searchToggle_paper(obj, evt) { ...@@ -174,6 +178,7 @@ function searchToggle_paper(obj, evt) {
container.addClass('active'); container.addClass('active');
evt.preventDefault(); evt.preventDefault();
console.log("first") console.log("first")
} else if (container.hasClass('active') && $(obj).closest('.input-holder').length == 0) { } else if (container.hasClass('active') && $(obj).closest('.input-holder').length == 0) {
container.removeClass('active'); container.removeClass('active');
// clear input // clear input
...@@ -189,6 +194,11 @@ function searchToggle_paper(obj, evt) { ...@@ -189,6 +194,11 @@ function searchToggle_paper(obj, evt) {
//Do something //Do something
} }
for (var j = 0; j < 6; j++) {
addpaper(jsonContent[j]);
//Do something
}
document.getElementById("nextblock").style.display = "block";
container.find('#search-input_paper').val(''); container.find('#search-input_paper').val('');
} else { } else {
console.log("search") console.log("search")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment