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

change tv and home to multi-pages

This commit is contained in:
Luke Pulverenti 2015-06-29 14:45:42 -04:00
parent e2823d0367
commit 5bfd2d683c
63 changed files with 987 additions and 658 deletions

View file

@ -0,0 +1,65 @@
(function ($, document) {
$(document).on('pagebeforeshowready', "#homeUpcomingPage", function () {
Dashboard.showLoadingMsg();
var page = this;
var limit = AppInfo.hasLowImageBandwidth ?
24 :
40;
var query = {
Limit: limit,
Fields: "AirTime,UserData,SeriesStudio,SyncInfo",
UserId: Dashboard.getCurrentUserId(),
ImageTypeLimit: 1,
EnableImageTypes: "Primary,Backdrop,Banner,Thumb"
};
query.ParentId = LibraryMenu.getTopParentId();
var context = '';
if (query.ParentId) {
context = 'tv';
}
ApiClient.getJSON(ApiClient.getUrl("Shows/Upcoming", query)).done(function (result) {
var items = result.Items;
if (items.length) {
page.querySelector('.noItemsMessage').style.display = 'none';
} else {
page.querySelector('.noItemsMessage').style.display = 'block';
}
var elem = page.querySelector('#upcomingItems');
elem.innerHTML = LibraryBrowser.getPosterViewHtml({
items: items,
showLocationTypeIndicator: false,
shape: "backdrop",
showTitle: true,
showPremiereDate: true,
showPremiereDateIndex: true,
preferThumb: true,
context: context || 'home-upcoming',
lazy: true,
showDetailsMenu: true
});
ImageLoader.lazyChildren(elem);
Dashboard.hideLoadingMsg();
});
});
})(jQuery, document);