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

update live tv guide

This commit is contained in:
Luke Pulverenti 2016-06-06 21:55:16 -04:00
parent a391e96df5
commit 0f7541beda
19 changed files with 85 additions and 51 deletions

View file

@ -1,4 +1,4 @@
define(['jQuery', 'scripts/livetvcomponents'], function ($) {
define(['scripts/livetvcomponents'], function () {
function getRecordingGroupHtml(group) {
@ -33,9 +33,9 @@
function renderRecordingGroups(context, groups) {
if (groups.length) {
$('#recordingGroups', context).show();
context.querySelector('#recordingGroups').classList.remove('hide');
} else {
$('#recordingGroups', context).hide();
context.querySelector('#recordingGroups').classList.add('hide');
}
var html = '';
@ -73,7 +73,7 @@
} else {
recordingItems.classList.remove('hiddenScrollX');
}
recordingItems.innerHTML = LibraryBrowser.getPosterViewHtml({
items: recordings,
shape: (enableScrollX() ? 'autooverflow' : 'auto'),

View file

@ -1,4 +1,4 @@
define(['datetime', 'jQuery', 'paper-icon-button-light'], function (datetime, $) {
define(['datetime', 'paper-icon-button-light'], function (datetime) {
var query = {
@ -88,17 +88,33 @@
html += '</div>';
}
var elem = $('#items', context).html(html);
var elem = context.querySelector('#items');
elem.innerHTML = html;
$('.btnCancelSeries', elem).on('click', function () {
deleteSeriesTimer(context, this.getAttribute('data-seriestimerid'));
elem.querySelector('.paperList').addEventListener('click', function (e) {
var btnCancelSeries = parentWithClass(e.target, 'btnCancelSeries');
if (btnCancelSeries) {
deleteSeriesTimer(context, btnCancelSeries.getAttribute('data-seriestimerid'));
}
});
Dashboard.hideLoadingMsg();
}
function parentWithClass(elem, className) {
while (!elem.classList || !elem.classList.contains(className)) {
elem = elem.parentNode;
if (!elem) {
return null;
}
}
return elem;
}
function reload(context) {
Dashboard.showLoadingMsg();

View file

@ -1,4 +1,4 @@
define(['jQuery', 'libraryBrowser', 'scrollStyles'], function ($, libraryBrowser) {
define(['libraryBrowser', 'scrollStyles'], function (libraryBrowser) {
function enableScrollX() {
return browserInfo.mobile && AppInfo.enableAppLayouts;