1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00
jellyfin-web/dashboard-ui/scripts/livetvtimer.js
2013-12-12 23:06:38 -05:00

44 lines
No EOL
891 B
JavaScript

(function ($, document, apiClient) {
var currentItem;
function renderTimer(page, item) {
currentItem = item;
$('.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);