1
0
Fork 0
mirror of https://github.com/Kunsi/pretalx-plugin-broadcast-tools synced 2024-05-06 04:28:17 +00:00

repair selectors in js

This commit is contained in:
Daniel Havlik 2021-12-24 21:15:14 +01:00
parent d08e7db9bb
commit 1c78eefb81

View file

@ -3,7 +3,7 @@ room_name = null;
event_info = null; event_info = null;
$(function() { $(function() {
$('#speaker').text('Content will appear soon.'); $('#l3speaker').text('Content will appear soon.');
}); });
function update_lower_third() { function update_lower_third() {
@ -23,8 +23,8 @@ function update_lower_third() {
} }
if (schedule['rooms'].length > 1 && !schedule['rooms'].includes(room_name)) { if (schedule['rooms'].length > 1 && !schedule['rooms'].includes(room_name)) {
$('#title').text('Error') $('#l3title').text('Error')
$('#speaker').text('Invalid room_name. Valid names: ' + schedule['rooms'].join(', ')); $('#l3speaker').text('Invalid room_name. Valid names: ' + schedule['rooms'].join(', '));
return return
} }
@ -48,19 +48,19 @@ function update_lower_third() {
} }
if (current_talk) { if (current_talk) {
$('#title').text(current_talk['title']); $('#l3title').text(current_talk['title']);
$('#speaker').text(current_talk['persons'].join(', ')); $('#l3speaker').text(current_talk['persons'].join(', '));
$('#info_line').text(current_talk['infoline']); $('#l3info_line').text(current_talk['infoline']);
} else { } else {
$('#title').text(event_info['no_talk']); $('#l3title').text(event_info['no_talk']);
$('#speaker').text(''); $('#l3speaker').text('');
$('#info_line').text(''); $('#l3info_line').text('');
} }
if (current_talk && current_talk['track']) { if (current_talk && current_talk['track']) {
$('#box').css('border-bottom', '10px solid ' + current_talk['track']['color']); $('#l3box').css('border-bottom', '10px solid ' + current_talk['track']['color']);
} else { } else {
$('#box').css('border-bottom', 'none'); $('#l3box').css('border-bottom', 'none');
} }
} }
window.setInterval(update_lower_third, 1000); window.setInterval(update_lower_third, 1000);
@ -69,7 +69,7 @@ function update_schedule() {
$.getJSON('../event.json', function(data) { $.getJSON('../event.json', function(data) {
event_info = data; event_info = data;
$('#box').css('background-color', data['color']); $('#l3box').css('background-color', data['color']);
}); });
$.getJSON('../schedule.json', function(data) { $.getJSON('../schedule.json', function(data) {
console.info('schedule updated with ' + data['talks'].length + ' talks in ' + data['rooms'].length + ' rooms'); console.info('schedule updated with ' + data['talks'].length + ' talks in ' + data['rooms'].length + ' rooms');