Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update js/control.js

Non-video content doesn't always have a thumbnail field
  • Loading branch information...
commit 15bc3da5ce821cb579f415e3800a2d99e9ec0de6 1 parent f8cd862
@bruntonspall authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 js/control.js
View
6 js/control.js
@@ -134,7 +134,6 @@ control = {
var th = $('<div>').addClass('thumbholder').addClass('section_' + json.sectionId).css('top', todpos-12);
var dtime = $('<div>').addClass('time').addClass('tinyfont').html(d[0] + ':' + d[1]);
var dsection = $('<div>').addClass('sectionname').addClass('tinyfont').html(json.sectionName);
- var i = $('<img>').addClass('thumbnail').attr('src', json.fields.thumbnail).attr('title', d[0] + ':' + d[1]);
if (json.tags.length > 0) {
var dseries = $('<div>').addClass('series').addClass('tinyfont').html('series');
@@ -142,7 +141,10 @@ control = {
}
th.append(dtime);
- th.append(i);
+ if ('thumbnail' in json.fields)
+ var i = $('<img>').addClass('thumbnail').attr('src', json.fields.thumbnail).attr('title', d[0] + ':' + d[1]);
+ th.append(i);
+ }
th.append(dsection);
$($('#week .dayholder')[dow.getDay()]).children('.fullday').append(th);
Please sign in to comment.
Something went wrong with that request. Please try again.