jellyfin-web/dashboard-ui/components/ironcardlist/ironcardlist.js
2016-04-25 14:33:17 -04:00

32 lines
725 B
JavaScript

define(['iron-list', 'lazyload-image'], function () {
function getTemplate(scrollTarget) {
var maxPhysical = 200;
// 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
};
});