Commit 4ca06814 authored by Traboulsi's avatar Traboulsi
Browse files

Update public/js/paperfilter.js

parent 0451d9ed
Pipeline #8783 passed with stage
in 9 seconds
......@@ -215,57 +215,6 @@ function filter(year){
}
}
/*else if (year == "All"){
for (var j = 0; j < jsonContent.length; j++) {
var filterString = jsonContent[j].item.conference.date.toString()
if ( filterString.includes('2022') || filterString.includes('2023') || filterString.includes('2020') || filterString.includes('2019') || filterString.includes('2021')|| jsonContent[j].item.journal.year == 2022 || jsonContent[j].item.journal.year == 2023 || jsonContent[j].item.journal.year == 2019 || jsonContent[j].item.journal.year == 2020 || jsonContent[j].item.journal.year == 2021) {
addpaper(jsonContent[j]);
count += 1
}
state = 1
//Do something
}
document.getElementById("filter2019").style.backgroundColor = "lightgrey"
document.getElementById("filter2021").style.backgroundColor = "lightgrey"
document.getElementById("filter2020").style.backgroundColor = "lightgrey"
document.getElementById("filter2023").style.backgroundColor = "lightgrey"
document.getElementById("filterall").style.backgroundColor = "grey"
document.getElementById("filter2022").style.backgroundColor = "lightgrey"
document.getElementById("filter2019").innerHTML = "2019"
document.getElementById("filter2022").innerHTML = "2022"
document.getElementById("filter2021").innerHTML = "2021"
document.getElementById("filter2023").innerHTML = "2023"
document.getElementById("filter2020").innerHTML = "2020"
document.getElementById("filterall").innerHTML = "All (" + count +")"
count = 0
} else if (year == "Alles"){
for (var j = 0; j < jsonContent.length; j++) {
var filterString = jsonContent[j].item.conference.date.toString()
if ( filterString.includes('2022') || filterString.includes('2023') || filterString.includes('2020') || filterString.includes('2019') || filterString.includes('2021')|| jsonContent[j].item.journal.year == 2022 || jsonContent[j].item.journal.year == 2023 || jsonContent[j].item.journal.year == 2019 || jsonContent[j].item.journal.year == 2020 || jsonContent[j].item.journal.year == 2021) {
addpaper(jsonContent[j]);
count += 1
}
state = 1
//Do something
}
document.getElementById("filter2019").style.backgroundColor = "lightgrey"
document.getElementById("filter2021").style.backgroundColor = "lightgrey"
document.getElementById("filter2020").style.backgroundColor = "lightgrey"
document.getElementById("filter2023").style.backgroundColor = "lightgrey"
document.getElementById("filterall").style.backgroundColor = "grey"
document.getElementById("filter2022").style.backgroundColor = "lightgrey"
document.getElementById("filter2019").innerHTML = "2019"
document.getElementById("filter2022").innerHTML = "2022"
document.getElementById("filter2021").innerHTML = "2021"
document.getElementById("filter2023").innerHTML = "2023"
document.getElementById("filter2020").innerHTML = "2020"
document.getElementById("filterall").innerHTML = "Alles (" + count +")"
count = 0
}*/
if (year == "2020") {
state2020 = 1
state2021 = 0
......@@ -315,7 +264,7 @@ function filter(year){
} else if (state == 1) {
if (year == "2020") {
/* if (year == "2020") {
state2020 = 0
} else if (year == "2021"){
state2021 = 0
......@@ -329,7 +278,7 @@ function filter(year){
state2023 = 0
}else if (year == "All" || year == "Alles"){
stateall = 0
}
}*/
//document.getElementById("filter2020").style.backgroundColor = "lightgrey"
document.getElementById("nextblock").style.display = "block"
for (var j = 0; j < 6; j++) {
......@@ -342,7 +291,7 @@ function filter(year){
document.getElementById("filter2020").style.backgroundColor = "lightgrey"
document.getElementById("filter2022").style.backgroundColor = "lightgrey"
document.getElementById("filter2023").style.backgroundColor = "lightgrey"
document.getElementById("filterall").style.backgroundColor = "lightgrey"
document.getElementById("filterall").style.backgroundColor = "grey"
document.getElementById("filter2019").innerHTML = "2019"
document.getElementById("filter2021").innerHTML = "2021"
document.getElementById("filter2020").innerHTML = "2020"
......
Supports Markdown
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