(function ($, document, apiClient) { function playRecording(page, id) { } function deleteRecording(page, id) { Dashboard.confirm("Are you sure you wish to delete this recording?", "Confirm Recording Deletion", function (result) { if (result) { Dashboard.showLoadingMsg(); ApiClient.deleteLiveTvRecording(id).done(function () { Dashboard.alert('Recording deleted'); reload(page); }); } }); } function renderRecordings(page, recordings) { var html = ''; var cssClass = "detailTable"; html += '
'; html += ' | Name | '; html += 'Channel | '; html += 'Date | '; html += 'Start | '; html += 'End | '; html += 'Status | '; html += '
---|---|---|---|---|---|---|
'; html += ''; html += ''; html += ' | '; html += '' + (recording.Name || '') + ' | '; html += ''; if (recording.ChannelId) { html += '' + recording.ChannelName + ''; } html += ' | '; var startDate = recording.StartDate; try { startDate = parseISO8601Date(startDate, { toLocal: true }); } catch (err) { } html += '' + startDate.toLocaleDateString() + ' | '; html += '' + LiveTvHelpers.getDisplayTime(recording.StartDate) + ' | '; html += '' + LiveTvHelpers.getDisplayTime(recording.EndDate) + ' | '; html += '' + (recording.Status || '') + ' | '; html += '