Commit 5c3bf654 authored by Traboulsi's avatar Traboulsi
Browse files

Update public/js/paperfilter.js

parent 4ca06814
Pipeline #8784 passed with stage
in 10 seconds
...@@ -6,10 +6,16 @@ var state2019 = 0 ...@@ -6,10 +6,16 @@ var state2019 = 0
var stateall = 0 var stateall = 0
var state = 0 var state = 0
var count = 0 var count = 0
var activeyear = null ;
function filter(year){ function filter(year){
if (activeyear === year) {
// Clicking on the same button again, do nothing
return;
}
var new_row = document.getElementById("cont_paper") var new_row = document.getElementById("cont_paper")
new_row.innerHTML = ""; new_row.innerHTML = "";
document.getElementById("nextblock").style.display = "none" document.getElementById("nextblock").style.display = "none"
...@@ -261,7 +267,8 @@ function filter(year){ ...@@ -261,7 +267,8 @@ function filter(year){
state2023= 0 state2023= 0
stateall = 1 stateall = 1
} }
//Update the value of the activeyear
activeyear= year
} else if (state == 1) { } else if (state == 1) {
/* if (year == "2020") { /* if (year == "2020") {
...@@ -303,5 +310,9 @@ function filter(year){ ...@@ -303,5 +310,9 @@ function filter(year){
}else if(lang_setting == "2" ){ }else if(lang_setting == "2" ){
document.getElementById("filterall").innerHTML = "Alles" document.getElementById("filterall").innerHTML = "Alles"
} }
//Update the value of the activeyear
activeyear= year
} }
} }
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