(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 = ''; html += '
'; if (timer.DayPattern) { html += timer.DayPattern; } else { var days = timer.Days || []; html += days.join(', '); } if (timer.RecordAnyTime) { html += ' - Any time.'; } else { html += ' - ' + LiveTvHelpers.getDisplayTime(timer.StartDate); } html += '
'; html += ''; if (timer.RecordAnyChannel) { html += 'All Channels'; } else if (timer.ChannelId) { html += timer.ChannelName; } html += '
'; html += '