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
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
Hide whitespace changes
Inline
Side-by-side
public/js/paperfilter.js
View file @
c98d1cbb
...
@@ -3,6 +3,7 @@ var state2021 = 0
...
@@ -3,6 +3,7 @@ var state2021 = 0
var
state2022
=
0
var
state2022
=
0
var
state2023
=
0
var
state2023
=
0
var
state2019
=
0
var
state2019
=
0
var
stateall
=
0
var
state
=
0
var
state
=
0
var
count
=
0
var
count
=
0
function
filter
(
year
){
function
filter
(
year
){
...
@@ -10,7 +11,10 @@ function filter(year){
...
@@ -10,7 +11,10 @@ function filter(year){
new_row
.
innerHTML
=
""
;
new_row
.
innerHTML
=
""
;
document
.
getElementById
(
"
nextblock
"
).
style
.
display
=
"
none
"
document
.
getElementById
(
"
nextblock
"
).
style
.
display
=
"
none
"
if
(
year
==
"
2020
"
)
{
if
(
year
==
"
All
"
)
{
state
=
stateall
}
else
if
(
year
==
"
2020
"
)
{
state
=
state2020
state
=
state2020
}
else
if
(
year
==
"
2021
"
){
}
else
if
(
year
==
"
2021
"
){
state
=
state2021
state
=
state2021
...
@@ -24,6 +28,7 @@ function filter(year){
...
@@ -24,6 +28,7 @@ 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
()
...
@@ -109,7 +114,6 @@ function filter(year){
...
@@ -109,7 +114,6 @@ function filter(year){
document
.
getElementById
(
"
filter2019
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2019
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2020
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2020
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2022
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2022
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2023
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2022
"
).
innerHTML
=
"
2022
"
document
.
getElementById
(
"
filter2022
"
).
innerHTML
=
"
2022
"
document
.
getElementById
(
"
filter2019
"
).
innerHTML
=
"
2019
"
document
.
getElementById
(
"
filter2019
"
).
innerHTML
=
"
2019
"
document
.
getElementById
(
"
filter2023
"
).
innerHTML
=
"
2023 (
"
+
count
+
"
)
"
document
.
getElementById
(
"
filter2023
"
).
innerHTML
=
"
2023 (
"
+
count
+
"
)
"
...
@@ -139,7 +143,30 @@ function filter(year){
...
@@ -139,7 +143,30 @@ function filter(year){
document
.
getElementById
(
"
filter2020
"
).
innerHTML
=
"
2020
"
document
.
getElementById
(
"
filter2020
"
).
innerHTML
=
"
2020
"
document
.
getElementById
(
"
filter2022
"
).
innerHTML
=
"
2022 (
"
+
count
+
"
)
"
document
.
getElementById
(
"
filter2022
"
).
innerHTML
=
"
2022 (
"
+
count
+
"
)
"
count
=
0
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
"
)
{
if
(
year
==
"
2020
"
)
{
state2020
=
1
state2020
=
1
state2021
=
0
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