mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fix next up order
This commit is contained in:
parent
b1a7dbd507
commit
dc90abdf0f
7 changed files with 117 additions and 21 deletions
|
@ -1,6 +1,7 @@
|
|||
define(['datetime', 'scrollStyles'], function (datetime) {
|
||||
|
||||
function loadUpcoming(page) {
|
||||
function getUpcomingPromise() {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
var query = {
|
||||
|
@ -13,7 +14,12 @@
|
|||
EnableTotalRecordCount: false
|
||||
};
|
||||
|
||||
ApiClient.getJSON(ApiClient.getUrl("Shows/Upcoming", query)).then(function (result) {
|
||||
return ApiClient.getJSON(ApiClient.getUrl("Shows/Upcoming", query));
|
||||
}
|
||||
|
||||
function loadUpcoming(page, promise) {
|
||||
|
||||
promise.then(function (result) {
|
||||
|
||||
var items = result.Items;
|
||||
|
||||
|
@ -124,11 +130,17 @@
|
|||
}
|
||||
return function (view, params, tabContent) {
|
||||
|
||||
var self = this;
|
||||
var self = this;
|
||||
var upcomingPromise;
|
||||
|
||||
self.preRender = function () {
|
||||
upcomingPromise = getUpcomingPromise();
|
||||
};
|
||||
|
||||
self.renderTab = function () {
|
||||
|
||||
loadUpcoming(tabContent);
|
||||
Dashboard.showLoadingMsg();
|
||||
loadUpcoming(view, upcomingPromise);
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue