Commit f63c93ab authored by David Trattnig's avatar David Trattnig
Browse files

Improve next timeslot rendering. #11

parent 24cdb5f5
......@@ -236,7 +236,10 @@
}
}
return "(" + str + ")";
if (str != "")
str = "(" + str + ")";
return str;
}
/* Indicates if some fallback timeslot is playing */
......@@ -273,6 +276,15 @@
return false;
}
/* Displays any following timeslot */
function displayNextTimeslot(value) {
let html = "";
if ('next_timeslot' in value) {
html += displayShowName(value.next_timeslot, nonexttimeslot)
html += " " + displayShowTimes(value.next_timeslot);
}
return html;
}
/* Hack to load external CSS into the Web Component */
function loadExternalCss(root, file) {
......@@ -693,12 +705,10 @@
</div>
</div>
{#if value.next_timeslot}
<div id="next-timeslot">
<h3 class="timeslot-title">{@html displayShowName(value.next_timeslot, nonexttimeslot)} {displayShowTimes(value.next_timeslot)}</h3>
</div>
{/if}
<h3 class="timeslot-title">{@html displayNextTimeslot(value)}</h3>
</div>
{:catch error}
<div class="error"><p>{error}</p></div>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment