Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
zedflow
fgdi
Commits
99455748
Commit
99455748
authored
Oct 24, 2023
by
Myriam Guedey
Browse files
Update paperfilter_new.js
parent
22c6a302
Pipeline
#8744
passed with stage
in 10 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
public/js/paperfilter_new.js
View file @
99455748
var
state2018
=
0
;
var
state2019
=
0
;
var
state2020
=
0
;
var
state2021
=
0
;
var
state2022
=
0
;
var
state2023
=
0
;
var
state2019
=
0
;
var
state2018
=
0
;
var
stateall
=
0
;
var
state
=
0
;
var
count
=
0
;
...
...
@@ -13,23 +13,23 @@ function filter(year) {
new_row
.
innerHTML
=
""
;
document
.
getElementById
(
"
nextblock
"
).
style
.
display
=
"
none
"
;
if
(
year
==
=
"
All
"
)
{
if
(
year
==
"
All
"
)
{
state
=
stateall
;
}
else
if
(
year
==
=
"
2018
"
)
{
}
else
if
(
year
==
"
2018
"
)
{
state
=
state2018
;
}
else
if
(
year
==
=
"
2019
"
)
{
}
else
if
(
year
==
"
2019
"
)
{
state
=
state2019
;
}
else
if
(
year
==
=
"
2020
"
)
{
}
else
if
(
year
==
"
2020
"
)
{
state
=
state2020
;
}
else
if
(
year
==
=
"
2021
"
)
{
}
else
if
(
year
==
"
2021
"
)
{
state
=
state2021
;
}
else
if
(
year
==
=
"
2022
"
)
{
}
else
if
(
year
==
"
2022
"
)
{
state
=
state2022
;
}
else
if
(
year
==
=
"
2023
"
)
{
}
else
if
(
year
==
"
2023
"
)
{
state
=
state2023
;
}
if
(
state
==
=
0
||
year
===
"
All
"
)
{
if
(
state
==
0
)
{
console
.
log
(
"
filter
"
);
for
(
var
j
=
0
;
j
<
jsonContent
.
length
;
j
++
)
{
...
...
@@ -54,8 +54,8 @@ function filter(year) {
document
.
getElementById
(
"
filter
"
+
year
).
innerHTML
=
year
+
"
(
"
+
count
+
"
)
"
;
count
=
0
;
}
else
if
(
state
==
=
1
)
{
// Handle state ==
=
1
}
else
if
(
state
==
1
)
{
// Handle state == 1
console
.
log
(
"
State is 1
"
);
// You can add code here to handle state 1 as needed
...
...
@@ -63,7 +63,7 @@ function filter(year) {
// Reset state and other UI elements
state
=
0
;
document
.
getElementById
(
"
filter
"
+
year
).
style
.
backgroundColor
=
"
lightgrey
"
;
document
.
getElementById
(
"
nextblock
"
).
style
display
=
"
block
"
;
document
.
getElementById
(
"
nextblock
"
).
style
.
display
=
"
block
"
;
// Load some content, adjust as needed
for
(
var
j
=
0
;
j
<
6
;
j
++
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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