mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -07:00
42 lines
785 B
JavaScript
42 lines
785 B
JavaScript
(function ($, document, apiClient) {
|
|
|
|
var currentItem;
|
|
|
|
function renderTimer(page, item) {
|
|
|
|
currentItem = item;
|
|
|
|
$('.timerName', page).html(item.Name);
|
|
|
|
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); |