jellyfin-web/dashboard-ui/scripts/indexpage.js
2013-04-01 11:59:56 -04:00

30 lines
596 B
JavaScript

(function ($, document) {
$(document).on('pageshow', "#indexPage", function () {
var page = this;
var userId = Dashboard.getCurrentUserId();
if (!userId) {
return;
}
page = $(page);
var options = {
sortBy: "SortName"
};
ApiClient.getItems(userId, options).done(function (result) {
$('#divCollections', page).html(Dashboard.getPosterViewHtml({
items: result.Items,
showTitle: true
}));
});
});
})(jQuery, document);