jellyfin-web/dashboard-ui/scripts/indexpage.js

30 lines
596 B
JavaScript
Raw Normal View History

2013-04-01 08:59:56 -07:00
(function ($, document) {
2013-02-20 18:33:05 -07:00
2013-04-01 08:59:56 -07:00
$(document).on('pageshow', "#indexPage", function () {
2013-02-20 18:33:05 -07:00
2013-04-01 08:59:56 -07:00
var page = this;
2013-02-20 18:33:05 -07:00
2013-04-01 08:59:56 -07:00
var userId = Dashboard.getCurrentUserId();
2013-02-20 18:33:05 -07:00
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
}));
});
2013-04-01 08:59:56 -07:00
});
2013-02-20 18:33:05 -07:00
2013-04-01 08:59:56 -07:00
})(jQuery, document);