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

update lazy loading

This commit is contained in:
Luke Pulverenti 2016-04-24 19:27:47 -04:00
parent bcb026427e
commit 67bc4c227e
5 changed files with 52 additions and 39 deletions

View file

@ -0,0 +1,32 @@
define(['iron-list', 'lazyload-image'], function () {
function getTemplate(scrollTarget) {
var maxPhysical = 80;
// is="lazyload-image"
return new Promise(function (resolve, reject) {
var xhr = new XMLHttpRequest();
xhr.open('GET', 'components/ironcardlist/ironcardlist.template.html', true);
xhr.onload = function (e) {
var html = this.response;
html = html.replace('${maxphysical}', maxPhysical);
html = html.replace('${scrolltarget}', scrollTarget);
resolve(html);
}
xhr.send();
});
}
return {
getTemplate: getTemplate
};
});