mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
removed grid view
This commit is contained in:
parent
1dfb16e578
commit
49ce11e15c
6 changed files with 44 additions and 241 deletions
|
@ -7,7 +7,9 @@
|
|||
SortOrder: "Ascending",
|
||||
IncludeItemTypes: "BoxSet",
|
||||
Recursive: true,
|
||||
Fields: "PrimaryImageAspectRatio,ItemCounts,ItemCounts,DateCreated"
|
||||
Fields: "PrimaryImageAspectRatio,ItemCounts,ItemCounts,DateCreated",
|
||||
Limit: LibraryBrowser.getDetaultPageSize(),
|
||||
StartIndex: 0
|
||||
};
|
||||
|
||||
|
||||
|
@ -17,14 +19,36 @@
|
|||
|
||||
ApiClient.getItems(Dashboard.getCurrentUserId(), query).done(function (result) {
|
||||
|
||||
$('#items', page).html(LibraryBrowser.getBoxsetPosterViewHtml({
|
||||
var html = '';
|
||||
|
||||
items: result.Items,
|
||||
useAverageAspectRatio: true
|
||||
var showPaging = result.TotalRecordCount > query.Limit;
|
||||
|
||||
}));
|
||||
if (showPaging) {
|
||||
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true);
|
||||
}
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
html += LibraryBrowser.getPosterDetailViewHtml({
|
||||
items: result.Items,
|
||||
useAverageAspectRatio: true
|
||||
});
|
||||
|
||||
if (showPaging) {
|
||||
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
||||
}
|
||||
|
||||
var elem = $('#items', page);
|
||||
|
||||
// cleanup existing event handlers
|
||||
$('select', elem).off('change');
|
||||
|
||||
elem.html(html).trigger('create');
|
||||
|
||||
$('select', elem).on('change', function () {
|
||||
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue