Commit a799e871 authored by fred's avatar fred

fill nonstop info in json onair view

parent ea6ab855
......@@ -233,6 +233,14 @@ def onair(request):
'title': d['emission'].title,
'url': d['emission'].get_absolute_url()
}
if d.get('nonstop'):
d['nonstop'] = {
'title': d['nonstop'].title,
}
if d.get('current_slot'):
d['current_slot'] = {
'title': d['current_slot'].title
}
return d
......
......@@ -43,6 +43,9 @@
result = result + ($.type(onair.data.emission) == 'object'?'<strong>'+onair.data.emission.title+'</strong>&nbsp;':'');
result = result + ($.type(onair.data.episode) == 'object'?'<span>'+onair.data.episode.title+'</span>':'');
WhatsOnAir.html(result);
} else if (onair.data.nonstop) {
result = onair.data.nonstop.title;
WhatsOnAir.html('<strong>' + result + '</strong>');
}
else{WhatsOnAir.html('<strong>Unknown (Probably Non-Stop)</strong>');}
WhatsOnAir.fadeIn();
......
Markdown is supported
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