Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
concrexit
Commits
7145b74b
Verified
Commit
7145b74b
authored
Jul 18, 2019
by
Sébastiaan Versteeg
Browse files
Fix calendar list upcoming items
parent
8bc41d1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
website/events/static/events/js/listview.js
View file @
7145b74b
...
...
@@ -5,12 +5,15 @@ class ListView extends FullCalendar.View {
skeleton
.
classList
.
add
(
'
accordion
'
,
'
bordered
'
);
const
locale
=
this
.
dateEnv
.
locale
.
codeArg
;
const
events
=
Object
.
values
(
eventStore
.
instances
);
events
.
sort
(
function
(
a
,
b
)
{
return
a
.
range
.
start
<
b
.
range
.
start
?
-
1
:
a
.
range
.
start
>
b
.
range
.
start
?
1
:
0
;
});
const
now
=
new
Date
();
const
events
=
Object
.
values
(
eventStore
.
instances
)
.
filter
(
function
(
value
)
{
return
value
.
range
.
end
>
now
;
})
.
sort
(
function
(
a
,
b
)
{
return
a
.
range
.
start
<
b
.
range
.
start
?
-
1
:
a
.
range
.
start
>
b
.
range
.
start
?
1
:
0
;
});
if
(
events
.
length
===
0
)
{
var
alertEl
=
document
.
createElement
(
'
div
'
);
...
...
Write
Preview
Supports
Markdown
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