Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
zedflow
fgdi
Commits
c98d1cbb
You need to sign in or sign up before continuing.
Commit
c98d1cbb
authored
Oct 23, 2023
by
Traboulsi
Browse files
Update public/js/paperfilter.js
parent
0031932d
Pipeline
#8733
passed with stage
in 10 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
public/js/paperfilter.js
View file @
c98d1cbb
...
...
@@ -3,6 +3,7 @@ var state2021 = 0
var
state2022
=
0
var
state2023
=
0
var
state2019
=
0
var
stateall
=
0
var
state
=
0
var
count
=
0
function
filter
(
year
){
...
...
@@ -10,7 +11,10 @@ function filter(year){
new_row
.
innerHTML
=
""
;
document
.
getElementById
(
"
nextblock
"
).
style
.
display
=
"
none
"
if
(
year
==
"
2020
"
)
{
if
(
year
==
"
All
"
)
{
state
=
stateall
}
else
if
(
year
==
"
2020
"
)
{
state
=
state2020
}
else
if
(
year
==
"
2021
"
){
state
=
state2021
...
...
@@ -24,6 +28,7 @@ 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
()
...
...
@@ -109,7 +114,6 @@ function filter(year){
document
.
getElementById
(
"
filter2019
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2020
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2022
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2023
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2022
"
).
innerHTML
=
"
2022
"
document
.
getElementById
(
"
filter2019
"
).
innerHTML
=
"
2019
"
document
.
getElementById
(
"
filter2023
"
).
innerHTML
=
"
2023 (
"
+
count
+
"
)
"
...
...
@@ -139,7 +143,30 @@ function filter(year){
document
.
getElementById
(
"
filter2020
"
).
innerHTML
=
"
2020
"
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
}
document.getElementById("filterall").style.backgroundColor = "grey"
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("filter2022").style.backgroundColor = "grey"
document.getElementById("filter2019").innerHTML = "2019"
document.getElementById("filter2021").innerHTML = "2021"
document.getElementById("filter2023").innerHTML = "2023"
document.getElementById("filter2020").innerHTML = "2020"
document.getElementById("filterall").innerHTML = "All (" + count +")"
count = 0
}*/
if
(
year
==
"
2020
"
)
{
state2020
=
1
state2021
=
0
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment