Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
UGL
website
Commits
24335c81
Commit
24335c81
authored
Aug 14, 2023
by
JOE XMG
Browse files
add filter 2023
parent
a15f7ffb
Pipeline
#8494
passed with stage
in 18 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
public/js/paperfilter.js
View file @
24335c81
var
state2020
=
0
var
state2021
=
0
var
state2022
=
0
var
state2023
=
0
var
state2019
=
0
var
state
=
0
var
count
=
0
...
...
@@ -17,6 +18,8 @@ function filter(year){
state
=
state2019
}
else
if
(
year
==
"
2022
"
){
state
=
state2022
}
else
if
(
year
==
"
2023
"
){
state
=
state2023
}
if
(
state
==
0
){
console
.
log
(
"
filter
"
)
...
...
@@ -36,7 +39,9 @@ function filter(year){
document
.
getElementById
(
"
filter2021
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2019
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2022
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2023
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2022
"
).
innerHTML
=
"
2022
"
document
.
getElementById
(
"
filter2023
"
).
innerHTML
=
"
2023
"
document
.
getElementById
(
"
filter2020
"
).
innerHTML
=
"
2020 (
"
+
count
+
"
)
"
document
.
getElementById
(
"
filter2021
"
).
innerHTML
=
"
2021
"
document
.
getElementById
(
"
filter2019
"
).
innerHTML
=
"
2019
"
...
...
@@ -57,6 +62,8 @@ function filter(year){
document
.
getElementById
(
"
filter2020
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2019
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2022
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2023
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2023
"
).
innerHTML
=
"
2023
"
document
.
getElementById
(
"
filter2022
"
).
innerHTML
=
"
2022
"
document
.
getElementById
(
"
filter2021
"
).
innerHTML
=
"
2021 (
"
+
count
+
"
)
"
document
.
getElementById
(
"
filter2020
"
).
innerHTML
=
"
2020
"
...
...
@@ -78,12 +85,38 @@ function filter(year){
document
.
getElementById
(
"
filter2021
"
).
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
(
"
filter2023
"
).
innerHTML
=
"
2023
"
document
.
getElementById
(
"
filter2019
"
).
innerHTML
=
"
2019 (
"
+
count
+
"
)
"
document
.
getElementById
(
"
filter2021
"
).
innerHTML
=
"
2021
"
document
.
getElementById
(
"
filter2020
"
).
innerHTML
=
"
2020
"
count
=
0
}
else
if
(
year
==
"
2022
"
){
}
else
if
(
year
==
"
2023
"
){
for
(
var
j
=
0
;
j
<
jsonContent
.
length
;
j
++
)
{
var
filterString
=
jsonContent
[
j
].
item
.
conference
.
date
.
toString
()
if
(
filterString
.
includes
(
'
2023
'
)
||
jsonContent
[
j
].
item
.
journal
.
year
==
2023
)
{
addpaper
(
jsonContent
[
j
]);
count
+=
1
}
state
=
1
//Do something
}
document
.
getElementById
(
"
filter2023
"
).
style
.
backgroundColor
=
"
grey
"
document
.
getElementById
(
"
filter2021
"
).
style
.
backgroundColor
=
"
lightgrey
"
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
+
"
)
"
document
.
getElementById
(
"
filter2021
"
).
innerHTML
=
"
2021
"
document
.
getElementById
(
"
filter2020
"
).
innerHTML
=
"
2020
"
count
=
0
}
else
if
(
year
==
"
2022
"
){
for
(
var
j
=
0
;
j
<
jsonContent
.
length
;
j
++
)
{
var
filterString
=
jsonContent
[
j
].
item
.
conference
.
date
.
toString
()
if
(
filterString
.
includes
(
'
2022
'
)
||
jsonContent
[
j
].
item
.
journal
.
year
==
2022
)
{
...
...
@@ -98,9 +131,11 @@ function filter(year){
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
(
"
filter2022
"
).
innerHTML
=
"
2022 (
"
+
count
+
"
)
"
count
=
0
...
...
@@ -110,21 +145,34 @@ function filter(year){
state2021
=
0
state2019
=
0
state2022
=
0
state2023
=
0
}
else
if
(
year
==
"
2021
"
){
state2021
=
1
state2019
=
0
state2020
=
0
state2022
=
0
state2023
=
0
}
else
if
(
year
==
"
2019
"
){
state2019
=
1
state2020
=
0
state2021
=
0
state2022
=
0
state2023
=
0
}
else
if
(
year
==
"
2022
"
){
state2019
=
0
state2020
=
0
state2021
=
0
state2022
=
1
state2023
=
0
}
else
if
(
year
==
"
2023
"
){
state2019
=
0
state2020
=
0
state2021
=
0
state2022
=
0
state2023
=
1
}
}
else
if
(
state
==
1
)
{
...
...
@@ -138,6 +186,9 @@ function filter(year){
else
if
(
year
==
"
2022
"
){
state2022
=
0
}
else
if
(
year
==
"
2023
"
){
state2023
=
0
}
document
.
getElementById
(
"
filter2020
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
nextblock
"
).
style
.
display
=
"
block
"
for
(
var
j
=
0
;
j
<
6
;
j
++
)
{
...
...
@@ -149,9 +200,11 @@ function filter(year){
document
.
getElementById
(
"
filter2021
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2020
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2022
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2023
"
).
style
.
backgroundColor
=
"
lightgrey
"
document
.
getElementById
(
"
filter2019
"
).
innerHTML
=
"
2019
"
document
.
getElementById
(
"
filter2021
"
).
innerHTML
=
"
2021
"
document
.
getElementById
(
"
filter2020
"
).
innerHTML
=
"
2020
"
document
.
getElementById
(
"
filter2022
"
).
innerHTML
=
"
2022
"
document
.
getElementById
(
"
filter2023
"
).
innerHTML
=
"
2023
"
}
}
\ No newline at end of file
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