Commit 325a9ae8 authored by Traboulsi's avatar Traboulsi
Browse files

Update public/js/paperfilter.js

parent 99455748
Pipeline #8745 passed with stage
in 9 seconds
Showing with 3 additions and 9 deletions
+3 -9
...@@ -27,10 +27,10 @@ function filter(year){ ...@@ -27,10 +27,10 @@ function filter(year){
} }
if (state == 0){ if (state == 0){
console.log("filter") console.log("filter")
// Start loading/adding the paper content to the page here ..... // Start loading/adding the paper content to the page here .....
if (year == "2020"){ if (year == "2020"){
for (var j = 0; j < jsonContent.length; j++) { for (var j = 0; j < jsonContent.length; j++) {
var filterString = jsonContent[j].item.conference.date.toString() var filterString = jsonContent[j].item.conference.date.toString()
...@@ -146,14 +146,7 @@ function filter(year){ ...@@ -146,14 +146,7 @@ function filter(year){
document.getElementById("filter2022").innerHTML = "2022 (" + count +")" document.getElementById("filter2022").innerHTML = "2022 (" + count +")"
count = 0 count = 0
}else if (year == "All"){ }else if (year == "All"){
for (var j = 0; j < jsonContent.length; j++) { count += 1
addpaper(jsonContent[j]);
}
state = 1
//Do something
}
document.getElementById("filterall").style.backgroundColor = "grey" document.getElementById("filterall").style.backgroundColor = "grey"
document.getElementById("filter2019").style.backgroundColor = "lightgrey" document.getElementById("filter2019").style.backgroundColor = "lightgrey"
document.getElementById("filter2021").style.backgroundColor = "lightgrey" document.getElementById("filter2021").style.backgroundColor = "lightgrey"
...@@ -169,6 +162,7 @@ function filter(year){ ...@@ -169,6 +162,7 @@ function filter(year){
} }
if (year == "2020") { if (year == "2020") {
state2020 = 1 state2020 = 1
state2021 = 0 state2021 = 0
......
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