(function ($, document, apiClient) { function deleteTimer(page, id) { Dashboard.confirm("Are you sure you wish to cancel this series?", "Confirm Series Cancellation", function (result) { if (result) { Dashboard.showLoadingMsg(); ApiClient.cancelLiveTvSeriesTimer(id).done(function () { Dashboard.alert('Series cancelled.'); reload(page); }); } }); } function renderTimers(page, timers) { var html = ''; var cssClass = "detailTable"; html += '
'; html += ' | Name | '; html += 'Channel | '; html += 'Days | '; html += 'Time | '; html += '
---|---|---|---|---|
'; html += ''; html += ' | '; html += ''; html += '' + timer.Name + ''; html += ' | '; html += ''; if (timer.RecordAnyChannel) { html += 'All Channels'; } else if (timer.ChannelId) { html += '' + timer.ChannelName + ''; } html += ' | '; html += ''; if (timer.DayPattern) { html += timer.DayPattern; } else { var days = timer.Days || []; html += days.join(', '); } html += ' | '; html += '' + LiveTvHelpers.getDisplayTime(timer.StartDate) + ' | '; html += '