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
d062a83c
Verified
Commit
d062a83c
authored
Dec 16, 2018
by
Sébastiaan Versteeg
Browse files
Only really show upcoming events in the upcoming events view
parent
54be451b
Changes
2
Hide whitespace changes
Inline
Side-by-side
website/events/static/events/js/calendarlistview.js
View file @
d062a83c
...
@@ -9,6 +9,16 @@ ListView = View.extend({
...
@@ -9,6 +9,16 @@ ListView = View.extend({
return
this
.
title
;
return
this
.
title
;
},
},
fetchInitialEvents
:
function
(
dateProfile
)
{
var
calendar
=
this
.
calendar
;
var
today
=
new
Date
();
return
calendar
.
requestEvents
(
calendar
.
msToMoment
(
Date
.
UTC
(
today
.
getFullYear
(),
today
.
getMonth
(),
today
.
getDate
(),
0
,
0
,
0
),
false
),
calendar
.
msToMoment
(
Date
.
UTC
(
today
.
getFullYear
()
+
2
,
today
.
getMonth
(),
today
.
getDate
(),
0
,
0
,
0
),
false
)
);
},
renderEvents
:
function
(
events
)
{
renderEvents
:
function
(
events
)
{
var
root
=
$
(
"
<div>
"
).
addClass
(
"
accordion bordered
"
);
var
root
=
$
(
"
<div>
"
).
addClass
(
"
accordion bordered
"
);
...
...
website/events/static/events/js/main.js
View file @
d062a83c
...
@@ -11,12 +11,12 @@ function checkResponsiveState(calendarElement, windowWidth, view) {
...
@@ -11,12 +11,12 @@ function checkResponsiveState(calendarElement, windowWidth, view) {
calendarElement
.
fullCalendar
(
'
removeEventSource
'
,
SOURCES
.
birthdays
);
calendarElement
.
fullCalendar
(
'
removeEventSource
'
,
SOURCES
.
birthdays
);
if
(
windowWidth
<=
768
)
{
if
(
windowWidth
<=
768
)
{
calendarElement
.
fullCalendar
(
'
option
'
,
'
header
'
,
{
calendarElement
.
fullCalendar
(
'
option
'
,
'
header
'
,
{
right
:
'
today
'
right
:
''
});
});
}
else
{
}
else
{
if
(
view
.
name
===
'
list
'
)
{
if
(
view
.
name
===
'
list
'
)
{
calendarElement
.
fullCalendar
(
'
option
'
,
'
header
'
,
{
calendarElement
.
fullCalendar
(
'
option
'
,
'
header
'
,
{
right
:
'
list,agendaWeek,month
today
'
right
:
'
list,agendaWeek,month
'
});
});
}
else
{
}
else
{
if
(
Cookies
.
get
(
BIRTHDAYS_COOKIE
))
{
if
(
Cookies
.
get
(
BIRTHDAYS_COOKIE
))
{
...
...
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