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
2dc127b1
Commit
2dc127b1
authored
Oct 25, 2023
by
Traboulsi
Browse files
Update public/js/paperfilter.js
parent
7255ab07
Pipeline
#8762
passed with stage
in 11 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
public/js/paperfilter.js
View file @
2dc127b1
...
@@ -3,24 +3,29 @@ var state2021 = 0
...
@@ -3,24 +3,29 @@ 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
){
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
"
if
(
year
==
"
2020
"
)
{
if
(
year
==
"
All
"
)
{
state
=
state2020
state
=
stateall
}
else
if
(
year
==
"
2021
"
){
}
else
if
(
year
==
"
2019
"
)
{
state
=
state2021
}
else
if
(
year
==
"
2019
"
){
state
=
state2019
state
=
state2019
}
else
if
(
year
==
"
2022
"
){
}
else
if
(
year
==
"
2020
"
)
{
state
=
state2020
}
else
if
(
year
==
"
2021
"
)
{
state
=
state2021
}
else
if
(
year
==
"
2022
"
)
{
state
=
state2022
state
=
state2022
}
else
if
(
year
==
"
2023
"
){
}
else
if
(
year
==
"
2023
"
)
{
state
=
state2023
state
=
state2023
}
}
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 .....
...
@@ -40,7 +45,9 @@ function filter(year){
...
@@ -40,7 +45,9 @@ function filter(year){
document
.
getElementById
(
"
filter2019
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2019
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2022
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2022
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2023
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2023
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filterall
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2022
"
).
innerHTML
=
"
2022
"
document
.
getElementById
(
"
filter2022
"
).
innerHTML
=
"
2022
"
document
.
getElementById
(
"
filterall
"
).
innerHTML
=
"
All
"
document
.
getElementById
(
"
filter2023
"
).
innerHTML
=
"
2023
"
document
.
getElementById
(
"
filter2023
"
).
innerHTML
=
"
2023
"
document
.
getElementById
(
"
filter2020
"
).
innerHTML
=
"
2020 (
"
+
count
+
"
)
"
document
.
getElementById
(
"
filter2020
"
).
innerHTML
=
"
2020 (
"
+
count
+
"
)
"
document
.
getElementById
(
"
filter2021
"
).
innerHTML
=
"
2021
"
document
.
getElementById
(
"
filter2021
"
).
innerHTML
=
"
2021
"
...
@@ -59,11 +66,13 @@ function filter(year){
...
@@ -59,11 +66,13 @@ function filter(year){
//Do something
//Do something
}
}
document
.
getElementById
(
"
filter2021
"
).
style
.
backgroundColor
=
"
grey
"
document
.
getElementById
(
"
filter2021
"
).
style
.
backgroundColor
=
"
grey
"
document
.
getElementById
(
"
filterall
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2020
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2020
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2019
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2019
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2022
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2022
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2023
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2023
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2023
"
).
innerHTML
=
"
2023
"
document
.
getElementById
(
"
filter2023
"
).
innerHTML
=
"
2023
"
document
.
getElementById
(
"
filterall
"
).
innerHTML
=
"
All
"
document
.
getElementById
(
"
filter2022
"
).
innerHTML
=
"
2022
"
document
.
getElementById
(
"
filter2022
"
).
innerHTML
=
"
2022
"
document
.
getElementById
(
"
filter2021
"
).
innerHTML
=
"
2021 (
"
+
count
+
"
)
"
document
.
getElementById
(
"
filter2021
"
).
innerHTML
=
"
2021 (
"
+
count
+
"
)
"
document
.
getElementById
(
"
filter2020
"
).
innerHTML
=
"
2020
"
document
.
getElementById
(
"
filter2020
"
).
innerHTML
=
"
2020
"
...
@@ -86,11 +95,13 @@ function filter(year){
...
@@ -86,11 +95,13 @@ function filter(year){
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
(
"
filter2023
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filterall
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2022
"
).
innerHTML
=
"
2022
"
document
.
getElementById
(
"
filter2022
"
).
innerHTML
=
"
2022
"
document
.
getElementById
(
"
filter2023
"
).
innerHTML
=
"
2023
"
document
.
getElementById
(
"
filter2023
"
).
innerHTML
=
"
2023
"
document
.
getElementById
(
"
filter2019
"
).
innerHTML
=
"
2019 (
"
+
count
+
"
)
"
document
.
getElementById
(
"
filter2019
"
).
innerHTML
=
"
2019 (
"
+
count
+
"
)
"
document
.
getElementById
(
"
filter2021
"
).
innerHTML
=
"
2021
"
document
.
getElementById
(
"
filter2021
"
).
innerHTML
=
"
2021
"
document
.
getElementById
(
"
filter2020
"
).
innerHTML
=
"
2020
"
document
.
getElementById
(
"
filter2020
"
).
innerHTML
=
"
2020
"
document
.
getElementById
(
"
filterall
"
).
innerHTML
=
"
All
"
count
=
0
count
=
0
}
else
if
(
year
==
"
2023
"
){
}
else
if
(
year
==
"
2023
"
){
for
(
var
j
=
0
;
j
<
jsonContent
.
length
;
j
++
)
{
for
(
var
j
=
0
;
j
<
jsonContent
.
length
;
j
++
)
{
...
@@ -109,11 +120,13 @@ function filter(year){
...
@@ -109,11 +120,13 @@ 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
(
"
filterall
"
).
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
+
"
)
"
document
.
getElementById
(
"
filter2021
"
).
innerHTML
=
"
2021
"
document
.
getElementById
(
"
filter2021
"
).
innerHTML
=
"
2021
"
document
.
getElementById
(
"
filter2020
"
).
innerHTML
=
"
2020
"
document
.
getElementById
(
"
filter2020
"
).
innerHTML
=
"
2020
"
document
.
getElementById
(
"
filterall
"
).
innerHTML
=
"
All
"
count
=
0
count
=
0
}
else
if
(
year
==
"
2022
"
){
}
else
if
(
year
==
"
2022
"
){
for
(
var
j
=
0
;
j
<
jsonContent
.
length
;
j
++
)
{
for
(
var
j
=
0
;
j
<
jsonContent
.
length
;
j
++
)
{
...
@@ -131,8 +144,35 @@ function filter(year){
...
@@ -131,8 +144,35 @@ function filter(year){
document
.
getElementById
(
"
filter2021
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2021
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2020
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2020
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2023
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2023
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filterall
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2022
"
).
style
.
backgroundColor
=
"
grey
"
document
.
getElementById
(
"
filter2022
"
).
style
.
backgroundColor
=
"
grey
"
document
.
getElementById
(
"
filter2019
"
).
innerHTML
=
"
2019
"
document
.
getElementById
(
"
filter2019
"
).
innerHTML
=
"
2019
"
document
.
getElementById
(
"
filterall
"
).
innerHTML
=
"
All
"
document
.
getElementById
(
"
filter2021
"
).
innerHTML
=
"
2021
"
document
.
getElementById
(
"
filter2023
"
).
innerHTML
=
"
2023
"
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
++
)
{
var
filterString
=
jsonContent
[
j
].
item
.
conference
.
date
.
toString
()
if
(
filterString
.
includes
(
'
2022
'
)
||
filterString
.
includes
(
'
2023
'
)
||
filterString
.
includes
(
'
2020
'
)
||
filterString
.
includes
(
'
2019
'
)
||
filterString
.
includes
(
'
2021
'
)
||
jsonContent
[
j
].
item
.
journal
.
year
==
2022
||
jsonContent
[
j
].
item
.
journal
.
year
==
2023
||
jsonContent
[
j
].
item
.
journal
.
year
==
2019
||
jsonContent
[
j
].
item
.
journal
.
year
==
2020
||
jsonContent
[
j
].
item
.
journal
.
year
==
2021
)
{
addpaper
(
jsonContent
[
j
]);
count
+=
1
}
state
=
1
//Do something
}
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
(
"
filterall
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2022
"
).
style
.
backgroundColor
=
"
grey
"
document
.
getElementById
(
"
filter2019
"
).
innerHTML
=
"
2019
"
document
.
getElementById
(
"
filterall
"
).
innerHTML
=
"
All
"
document
.
getElementById
(
"
filter2021
"
).
innerHTML
=
"
2021
"
document
.
getElementById
(
"
filter2021
"
).
innerHTML
=
"
2021
"
document
.
getElementById
(
"
filter2023
"
).
innerHTML
=
"
2023
"
document
.
getElementById
(
"
filter2023
"
).
innerHTML
=
"
2023
"
document
.
getElementById
(
"
filter2020
"
).
innerHTML
=
"
2020
"
document
.
getElementById
(
"
filter2020
"
).
innerHTML
=
"
2020
"
...
@@ -145,6 +185,7 @@ function filter(year){
...
@@ -145,6 +185,7 @@ function filter(year){
state2019
=
0
state2019
=
0
state2022
=
0
state2022
=
0
state2023
=
0
state2023
=
0
stateall
=
0
}
else
if
(
year
==
"
2021
"
){
}
else
if
(
year
==
"
2021
"
){
state2021
=
1
state2021
=
1
...
@@ -152,6 +193,7 @@ function filter(year){
...
@@ -152,6 +193,7 @@ function filter(year){
state2020
=
0
state2020
=
0
state2022
=
0
state2022
=
0
state2023
=
0
state2023
=
0
stateall
=
0
}
else
if
(
year
==
"
2019
"
){
}
else
if
(
year
==
"
2019
"
){
state2019
=
1
state2019
=
1
...
@@ -159,6 +201,7 @@ function filter(year){
...
@@ -159,6 +201,7 @@ function filter(year){
state2021
=
0
state2021
=
0
state2022
=
0
state2022
=
0
state2023
=
0
state2023
=
0
stateall
=
0
}
else
if
(
year
==
"
2022
"
){
}
else
if
(
year
==
"
2022
"
){
state2019
=
0
state2019
=
0
...
@@ -166,15 +209,25 @@ function filter(year){
...
@@ -166,15 +209,25 @@ function filter(year){
state2021
=
0
state2021
=
0
state2022
=
1
state2022
=
1
state2023
=
0
state2023
=
0
stateall
=
0
}
else
if
(
year
==
"
2023
"
){
}
else
if
(
year
==
"
2023
"
){
state2019
=
0
state2019
=
0
state2020
=
0
state2020
=
0
state2021
=
0
state2021
=
0
state2022
=
0
state2022
=
0
state2023
=
1
state2023
=
1
stateall
=
0
}
else
if
(
year
==
"
All
"
){
state2019
=
0
state2020
=
0
state2021
=
0
state2022
=
0
state2023
=
0
stateall
=
1
}
}
}
else
if
(
state
==
1
)
{
}
else
if
(
state
==
1
)
{
if
(
year
==
"
2020
"
)
{
if
(
year
==
"
2020
"
)
{
state2020
=
0
state2020
=
0
}
else
if
(
year
==
"
2021
"
){
}
else
if
(
year
==
"
2021
"
){
...
...
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