1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

updated nuget for live tv

This commit is contained in:
Luke Pulverenti 2013-11-26 16:36:11 -05:00
parent cd3eb0a106
commit c1284787cb

View file

@ -1,6 +1,7 @@
(function ($, document, apiClient) {
var currentItem;
var programs;
function getDisplayTime(date) {
@ -19,6 +20,14 @@
return date;
}
function cancelRecording(page, id) {
}
function scheduleRecording(page, id) {
}
function renderPrograms(page, result) {
var html = '';
@ -46,10 +55,10 @@
html += '<td>';
if (program.recordingId) {
html += '<button type="button" data-icon="delete" data-inline="true" data-mini="true" data-iconpos="notext">Cancel</button>';
if (program.RecordingId) {
html += '<button data-recordingid="' + program.RecordingId + '" class="btnCancelRecording" type="button" data-icon="delete" data-inline="true" data-mini="true" data-iconpos="notext">Cancel</button>';
} else {
html += '<button type="button" data-icon="star" data-inline="true" data-mini="true" data-theme="b" data-iconpos="notext">Record</button>';
html += '<button data-recordingid="' + program.RecordingId + '" class="btnScheduleRecording" type="button" data-icon="facetime-video" data-inline="true" data-mini="true" data-theme="b" data-iconpos="notext">Record</button>';
}
html += '</td>';
@ -78,7 +87,21 @@
html += '</table></div>';
$('#programList', page).html(html).trigger('create');
var elem = $('#programList', page).html(html).trigger('create');
$('.btnCancelRecording', elem).on('click', function () {
var recordingId = this.getAttribute('data-recordingid');
cancelRecording(page, recordingId);
});
$('.btnScheduleRecording', elem).on('click', function () {
var recordingId = this.getAttribute('data-recordingid');
scheduleRecording(page, recordingId);
});
}
function loadPrograms(page) {
@ -90,6 +113,9 @@
}).done(function (result) {
renderPrograms(page, result);
programs = result.Items;
Dashboard.hideLoadingMsg();
});
}
@ -136,7 +162,6 @@
loadPrograms(page);
Dashboard.hideLoadingMsg();
});
}
@ -168,6 +193,7 @@
}).on('pagehide', "#liveTvChannelPage", function () {
currentItem = null;
programs = null;
});
})(jQuery, document, ApiClient);