diff --git a/public/js/paperfilter.js b/public/js/paperfilter.js index 821a8de88e03f8065393efa2567546f82bc078a9..f8d865b55d6b9557f8097989b6abed3220c53362 100644 --- a/public/js/paperfilter.js +++ b/public/js/paperfilter.js @@ -27,10 +27,10 @@ function filter(year){ } + if (state == 0){ console.log("filter") // Start loading/adding the paper content to the page here ..... - if (year == "2020"){ for (var j = 0; j < jsonContent.length; j++) { var filterString = jsonContent[j].item.conference.date.toString() @@ -146,14 +146,7 @@ function filter(year){ document.getElementById("filter2022").innerHTML = "2022 (" + count +")" count = 0 }else if (year == "All"){ - for (var j = 0; j < jsonContent.length; j++) { - addpaper(jsonContent[j]); - } - state = 1 - - - //Do something - } + count += 1 document.getElementById("filterall").style.backgroundColor = "grey" document.getElementById("filter2019").style.backgroundColor = "lightgrey" document.getElementById("filter2021").style.backgroundColor = "lightgrey" @@ -169,6 +162,7 @@ function filter(year){ } + if (year == "2020") { state2020 = 1 state2021 = 0