Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jonathan Bell
srctweb
Commits
bb077d3f
Commit
bb077d3f
authored
Jun 13, 2018
by
Daniel W Bond
Browse files
no longer hangs if no meetings are on the calendar, but displays alternative text
parent
3ac10a2c
Changes
1
Show whitespace changes
Inline
Side-by-side
srctweb/_pages/home.html
View file @
bb077d3f
...
...
@@ -326,7 +326,9 @@ $(function() {
"
key
"
:
apiKey
},
function
(
data
)
{
//console.log(data.items[0])
if
(
data
.
items
.
length
==
0
)
{
$
(
"
#meetingDate
"
).
text
(
"
No meetings scheduled yet. Check back soon!
"
);
}
else
{
var
d
=
new
Date
(
data
.
items
[
0
].
start
.
dateTime
),
monthName
=
d
.
toLocaleString
(
"
en-us
"
,
{
month
:
"
long
"
}),
dateOptions
=
{
weekday
:
'
long
'
,
month
:
'
long
'
,
day
:
'
numeric
'
},
...
...
@@ -334,6 +336,7 @@ $(function() {
dateString
=
d
.
toLocaleString
(
"
en-us
"
,
dateOptions
),
timeString
=
d
.
toLocaleString
(
"
en-us
"
,
timeOptions
);
$
(
"
#meetingDate
"
).
text
(
"
Join us for our next meeting in
"
+
data
.
items
[
0
].
location
+
"
at
"
+
timeString
+
"
on
"
+
dateString
+
"
. Make sure to bring your laptop!
"
)
}
});
});
</script>
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