(function ($, document, apiClient) { function deleteTimer(page, id) { Dashboard.confirm("Are you sure you wish to cancel this series?", "Confirm Series Timer Cancellation", function (result) { if (result) { Dashboard.showLoadingMsg(); ApiClient.cancelLiveTvSeriesTimer(id).done(function () { Dashboard.alert('Series Timer deleted'); reload(page); }); } }); } function renderTimers(page, timers) { var html = ''; var cssClass = "detailTable"; html += '
'; html += ' | Name | '; html += 'Channel | '; html += 'Start | '; html += 'End | '; html += 'Days | '; html += '
---|---|---|---|---|---|
'; html += ''; html += ' | '; html += ''; html += '' + timer.Name + ''; html += ' | '; html += ''; if (timer.ChannelId) { html += '' + timer.ChannelName + ''; } html += ' | '; var startDate = timer.StartDate; var endDate = timer.StartDate; try { startDate = parseISO8601Date(startDate, { toLocal: true }); } catch (err) { } try { endDate = parseISO8601Date(endDate, { toLocal: true }); } catch (err) { } html += '' + startDate.toLocaleDateString() + ' | '; html += '' + endDate.toLocaleDateString() + ' | '; html += ''; if (timer.DayPattern) { html += timer.DayPattern; } else { var days = timer.Days || []; html += days.join(', '); } html += ' | '; html += '