Skip to content

Commit

Permalink
Update js/control.js
Browse files Browse the repository at this point in the history
Non-video content doesn't always have a thumbnail field
  • Loading branch information
bruntonspall committed Aug 6, 2012
1 parent f8cd862 commit 15bc3da
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions js/control.js
Expand Up @@ -134,15 +134,17 @@ 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');
th.append(dseries);
}

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);
Expand Down

0 comments on commit 15bc3da

Please sign in to comment.