jellyfin-web/dashboard-ui/scripts/livetvtimer.js

44 lines
891 B
JavaScript
Raw Normal View History

(function ($, document, apiClient) {
var currentItem;
function renderTimer(page, item) {
currentItem = item;
2013-12-12 21:06:38 -07:00
$('.program', page).html(item.Name);
$('.channel', page).html(item.ChannelName);
$('.overview', page).html(item.Overview || '');
Dashboard.hideLoadingMsg();
}
function reload(page) {
Dashboard.showLoadingMsg();
var id = getParameterByName('id');
apiClient.getLiveTvTimer(id).done(function (result) {
renderTimer(page, result);
});
}
$(document).on('pageinit', "#liveTvTimerPage", function () {
var page = this;
}).on('pagebeforeshow', "#liveTvTimerPage", function () {
var page = this;
reload(page);
}).on('pagehide', "#liveTvTimerPage", function () {
currentItem = null;
});
})(jQuery, document, ApiClient);