mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
31 lines
No EOL
634 B
JavaScript
31 lines
No EOL
634 B
JavaScript
var IndexPage = {
|
|
|
|
onPageShow: function () {
|
|
IndexPage.loadLibrary(Dashboard.getCurrentUserId(), this);
|
|
},
|
|
|
|
loadLibrary: function (userId, page) {
|
|
|
|
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
|
|
}));
|
|
|
|
});
|
|
}
|
|
};
|
|
|
|
$(document).on('pageshow', "#indexPage", IndexPage.onPageShow); |