2014-03-11 19:11:01 -07:00
|
|
|
|
(function ($, document) {
|
|
|
|
|
|
|
|
|
|
$(document).on('pagebeforeshow', "#moviesLatestPage", function () {
|
|
|
|
|
|
2014-05-01 19:54:33 -07:00
|
|
|
|
var parentId = LibraryMenu.getTopParentId();
|
|
|
|
|
|
2014-03-11 19:11:01 -07:00
|
|
|
|
var screenWidth = $(window).width();
|
|
|
|
|
|
|
|
|
|
var page = this;
|
|
|
|
|
|
|
|
|
|
var options = {
|
|
|
|
|
|
|
|
|
|
SortBy: "DateCreated",
|
|
|
|
|
SortOrder: "Descending",
|
|
|
|
|
IncludeItemTypes: "Movie",
|
2014-05-01 19:54:33 -07:00
|
|
|
|
Limit: screenWidth >= 1920 ? 32 : (screenWidth >= 1440 ? 32 : (screenWidth >= 800 ? 24 : 18)),
|
2014-03-11 19:11:01 -07:00
|
|
|
|
Recursive: true,
|
|
|
|
|
Fields: "PrimaryImageAspectRatio",
|
2014-04-26 20:42:05 -07:00
|
|
|
|
Filters: "IsUnplayed",
|
2014-05-01 19:54:33 -07:00
|
|
|
|
CollapseBoxSetItems: false,
|
|
|
|
|
ParentId: parentId
|
2014-03-11 19:11:01 -07:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
ApiClient.getItems(Dashboard.getCurrentUserId(), options).done(function (result) {
|
|
|
|
|
|
|
|
|
|
$('#recentlyAddedItems', page).html(LibraryBrowser.getPosterViewHtml({
|
2014-04-03 15:50:04 -07:00
|
|
|
|
items: result.Items
|
2014-03-11 19:11:01 -07:00
|
|
|
|
|
2014-03-15 21:23:58 -07:00
|
|
|
|
})).createPosterItemMenus();
|
2014-03-11 19:11:01 -07:00
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
})(jQuery, document);
|