Show conference time on schedule
This commit is contained in:
parent
8838b9b47d
commit
91ad6fc563
2 changed files with 43 additions and 2 deletions
|
@ -124,6 +124,28 @@ $(function() {
|
|||
}
|
||||
}
|
||||
|
||||
var updateClock = function() {
|
||||
var clock = $('div.conf-clock');
|
||||
if (clock.length === 0) {
|
||||
var template = document.createElement('template');
|
||||
template.innerHTML = '<div class="conf-clock"></div>';
|
||||
var clockDiv = template.content.firstChild;
|
||||
document.body.appendChild(clockDiv);
|
||||
clock = $(clockDiv);
|
||||
}
|
||||
|
||||
var now = luxon.DateTime.local();
|
||||
var confFormatted = now.setZone(CONF_TZ).toLocaleString({
|
||||
weekday: 'short',
|
||||
day: '2-digit',
|
||||
hour: '2-digit',
|
||||
minute: '2-digit',
|
||||
timeZoneName: 'short',
|
||||
hour12: false,
|
||||
});
|
||||
clock.html('Conf Time:<br><span class="time">' + confFormatted + '</span>');
|
||||
}
|
||||
|
||||
var embeddedView = function() {
|
||||
var urlParams = new URLSearchParams(window.location.search);
|
||||
if (urlParams.has('embed')) {
|
||||
|
@ -139,8 +161,10 @@ $(function() {
|
|||
} else if (path.startsWith('http')) {
|
||||
anchor.attr('target', '_blank');
|
||||
}
|
||||
})
|
||||
});
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/* Schedule Editing */
|
||||
|
@ -163,10 +187,14 @@ $(function() {
|
|||
});
|
||||
|
||||
/* Update schedule display */
|
||||
embeddedView();
|
||||
var embedded = embeddedView();
|
||||
showCurrentTab();
|
||||
updateScheduleGrid();
|
||||
updatePresentationTimes();
|
||||
highlightCurrentSlots();
|
||||
var slotRefresh = setInterval(highlightCurrentSlots, SLOT_REFRESH_INTERVAL);
|
||||
if (!embedded) {
|
||||
updateClock();
|
||||
var clockRefresh = setInterval(updateClock, 5000);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -88,6 +88,19 @@ h3, .h3 {
|
|||
background-color: $blaze;
|
||||
}
|
||||
|
||||
.conf-clock {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background-color: white;
|
||||
padding: 10px;
|
||||
z-index: 10;
|
||||
|
||||
.time {
|
||||
font-size: 2em;
|
||||
}
|
||||
}
|
||||
|
||||
/* END LCA BRAND */
|
||||
|
||||
.messagelist {
|
||||
|
|
Loading…
Reference in a new issue