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

update image lazy loading

This commit is contained in:
Luke Pulverenti 2015-11-28 19:23:48 -05:00
parent 30f68bdf98
commit 7029c9112b
10 changed files with 74 additions and 76 deletions

View file

@ -19,14 +19,16 @@
ApiClient.getJSON(ApiClient.getUrl('Users/' + userId + '/Items/Latest', options)).then(function (items) {
$('#recentlyAddedItems', page).html(LibraryBrowser.getPosterViewHtml({
var recentlyAddedItems = page.querySelector('#recentlyAddedItems');
recentlyAddedItems.innerHTML = LibraryBrowser.getPosterViewHtml({
items: items,
transparent: true,
borderless: true,
shape: 'auto',
lazy: true
})).lazyChildren();
});
ImageLoader.lazyChildren(recentlyAddedItems);
});
@ -52,15 +54,16 @@
$('#recentlyPlayedSection', page).hide();
}
$('#recentlyPlayedItems', page).html(LibraryBrowser.getPosterViewHtml({
var recentlyPlayedItems = page.querySelector('#recentlyPlayedItems');
recentlyPlayedItems.innerHTML = LibraryBrowser.getPosterViewHtml({
items: result.Items,
transparent: true,
borderless: true,
shape: 'auto',
lazy: true
})).lazyChildren();
});
ImageLoader.lazyChildren(recentlyPlayedItems);
});
});