From e27108317db6ad6a1a5ccace771d4845df2e1cf0 Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela Date: Mon, 28 Mar 2016 14:59:45 +0200 Subject: [PATCH] webui: more channel icon work --- src/webui/static/app/dvr.js | 40 ++++++++++++++++++++++++------------- src/webui/static/app/epg.js | 17 +++++++++++----- 2 files changed, 38 insertions(+), 19 deletions(-) diff --git a/src/webui/static/app/dvr.js b/src/webui/static/app/dvr.js index 16a6065be..0cf4bc804 100644 --- a/src/webui/static/app/dvr.js +++ b/src/webui/static/app/dvr.js @@ -26,39 +26,51 @@ tvheadend.dvrDetails = function(uuid) { var content = ''; var but; - if (chicon != null && chicon.length > 0) + if (chicon != null && chicon.length > 0) { content += ''; + } else { + chicon = null; + } + + if (chicon) + content += '
'; if (duplicate) content += '
' + _('Will be skipped') + '
' + _('because it is a rerun of:') + '
' + tvheadend.niceDate(duplicate * 1000) + '
'; if (title) - content += '
' + title + '
'; + content += '
' + title + '
'; if (subtitle) - content += '
' + subtitle + '
'; + content += '
' + subtitle + '
'; if (episode) - content += '
' + episode + '
'; + content += '
' + episode + '
'; if (start_real) - content += '
' + _('Scheduled Start Time') + ':' + tvheadend.niceDate(start_real * 1000) + '
'; + content += '
' + _('Scheduled Start Time') + ':' + tvheadend.niceDate(start_real * 1000) + '
'; if (stop_real) - content += '
' + _('Scheduled Stop Time') + ':' + tvheadend.niceDate(stop_real * 1000) + '
'; + content += '
' + _('Scheduled Stop Time') + ':' + tvheadend.niceDate(stop_real * 1000) + '
'; if (duration) - content += '
' + _('Duration') + ':' + parseInt(duration / 60) + ' ' + _('min') + '
'; + content += '
' + _('Duration') + ':' + parseInt(duration / 60) + ' ' + _('min') + '
'; + if (chicon) { + content += '
'; /* x-epg-left */ + content += '
'; + } content += '
'; if (desc) { - content += '
' + desc + '
'; - content += '
'; + content += '
' + desc + '
'; + content += '
'; } if (status) - content += '
' + _('Status') + ':' + status + '
'; + content += '
' + _('Status') + ':' + status + '
'; if (filesize) - content += '
' + _('File size') + ':' + parseInt(filesize / 1000000) + ' MB
'; + content += '
' + _('File size') + ':' + parseInt(filesize / 1000000) + ' MB
'; if (comment) - content += '
' + _('Comment') + ':' + comment + '
'; + content += '
' + _('Comment') + ':' + comment + '
'; if (autorec_caption) - content += '
' + _('Autorec') + ':' + autorec_caption + '
'; + content += '
' + _('Autorec') + ':' + autorec_caption + '
'; if (timerec_caption) - content += '
' + _('Time Scheduler') + ':' + timerec_caption + '
'; + content += '
' + _('Time Scheduler') + ':' + timerec_caption + '
'; + if (chicon) + content += '
'; /* x-epg-bottom */ var buttons = []; diff --git a/src/webui/static/app/epg.js b/src/webui/static/app/epg.js index e05b46c2e..9b3aa702c 100644 --- a/src/webui/static/app/epg.js +++ b/src/webui/static/app/epg.js @@ -90,14 +90,18 @@ tvheadend.epgDetails = function(event) { var content = ''; var duration = 0; + var chicon = 0; if (event.start && event.stop && event.stop - event.start > 0) duration = (event.stop - event.start) / 1000; - if (event.channelIcon != null && event.channelIcon.length > 0) + if (event.channelIcon != null && event.channelIcon.length > 0) { content += ''; + chicon = 1; + } - content += '
'; + if (chicon) + content += '
'; content += '
' + event.title; if (event.subtitle) content += " : " + event.subtitle; @@ -110,8 +114,10 @@ tvheadend.epgDetails = function(event) { content += '
' + _('End Time') + ':' + tvheadend.niceDate(event.stop) + '
'; if (duration) content += '
' + _('Duration') + ':' + parseInt(duration / 60) + ' ' + _('min') + '
'; - content += '
'; /* x-epg-left */ - content += '
'; + if (chicon) { + content += '
'; /* x-epg-left */ + content += '
'; + } content += '
'; if (event.summary) content += '
' + event.summary + '
'; @@ -161,7 +167,8 @@ tvheadend.epgDetails = function(event) { content += ''; content += '
'; - content += '
'; /* x-epg-bottom */ + if (chicon) + content += '
'; /* x-epg-bottom */ var now = new Date(); var buttons = []; -- 2.47.3