mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update live tv pages
This commit is contained in:
parent
ec67431a0e
commit
a61e96accb
19 changed files with 172 additions and 216 deletions
|
@ -4,15 +4,28 @@
|
|||
|
||||
var html = '';
|
||||
|
||||
html += '<li><a href="livetvrecordinglist.html?groupid=' + group.Id + '">';
|
||||
html += '<paper-icon-item>';
|
||||
|
||||
html += '<h3>';
|
||||
html += '<paper-fab class="listAvatar blue" icon="live-tv" item-icon></paper-fab>';
|
||||
|
||||
html += '<paper-item-body two-line>';
|
||||
html += '<a href="livetvrecordinglist.html?groupid=' + group.Id + '" class="clearLink">';
|
||||
|
||||
html += '<div>';
|
||||
html += group.Name;
|
||||
html += '</h3>';
|
||||
html += '</div>';
|
||||
|
||||
html += '<span class="ui-li-count">' + group.RecordingCount + '</span>';
|
||||
html += '<div secondary>';
|
||||
if (group.RecordingCount == 1) {
|
||||
html += Globalize.translate('ValueItemCount', group.RecordingCount);
|
||||
} else {
|
||||
html += Globalize.translate('ValueItemCountPlural', group.RecordingCount);
|
||||
}
|
||||
html += '</div>';
|
||||
|
||||
html += '</li>';
|
||||
html += '</a>';
|
||||
html += '</paper-item-body>';
|
||||
html += '</paper-icon-item>';
|
||||
|
||||
return html;
|
||||
}
|
||||
|
@ -27,32 +40,30 @@
|
|||
|
||||
var html = '';
|
||||
|
||||
html += '<ul data-role="listview" data-inset="true">';
|
||||
html += '<div class="paperList">';
|
||||
|
||||
for (var i = 0, length = groups.length; i < length; i++) {
|
||||
|
||||
html += getRecordingGroupHtml(groups[i]);
|
||||
}
|
||||
|
||||
html += '</ul>';
|
||||
html += '</div>';
|
||||
|
||||
$('#recordingGroupItems', page).html(html).trigger('create');
|
||||
page.querySelector('#recordingGroupItems').innerHTML = html;
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
||||
function renderRecordings(elem, recordings) {
|
||||
|
||||
var screenWidth = $(window).width();
|
||||
|
||||
if (recordings.length) {
|
||||
elem.show();
|
||||
elem.classList.remove('hide');
|
||||
} else {
|
||||
elem.hide();
|
||||
elem.classList.add('hide');
|
||||
}
|
||||
|
||||
$('.recordingItems', elem).html(LibraryBrowser.getPosterViewHtml({
|
||||
|
||||
var recordingItems = elem.querySelector('.recordingItems');
|
||||
recordingItems.innerHTML = LibraryBrowser.getPosterViewHtml({
|
||||
items: recordings,
|
||||
shape: "auto",
|
||||
showTitle: true,
|
||||
|
@ -61,7 +72,9 @@
|
|||
coverImage: true,
|
||||
lazy: true
|
||||
|
||||
})).lazyChildren();
|
||||
});
|
||||
|
||||
ImageLoader.lazyChildren(recordingItems);
|
||||
}
|
||||
|
||||
function reload(page) {
|
||||
|
@ -75,7 +88,7 @@
|
|||
|
||||
}).done(function (result) {
|
||||
|
||||
renderRecordings($('#activeRecordings', page), result.Items);
|
||||
renderRecordings(page.querySelector('#activeRecordings'), result.Items);
|
||||
|
||||
});
|
||||
|
||||
|
@ -87,7 +100,7 @@
|
|||
|
||||
}).done(function (result) {
|
||||
|
||||
renderRecordings($('#latestRecordings', page), result.Items);
|
||||
renderRecordings(page.querySelector('#latestRecordings'), result.Items);
|
||||
});
|
||||
|
||||
ApiClient.getLiveTvRecordingGroups({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue