mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update listviews
This commit is contained in:
parent
3197c48232
commit
1032fa887e
54 changed files with 2271 additions and 376 deletions
|
@ -1,4 +1,4 @@
|
|||
define(['events', 'libraryBrowser', 'imageLoader', 'jQuery'], function (events, libraryBrowser, imageLoader, $) {
|
||||
define(['events', 'libraryBrowser', 'imageLoader', 'listView'], function (events, libraryBrowser, imageLoader, listView) {
|
||||
|
||||
return function (view, params, tabContent) {
|
||||
|
||||
|
@ -76,7 +76,7 @@
|
|||
|
||||
if (viewStyle == "List") {
|
||||
|
||||
html = libraryBrowser.getListViewHtml({
|
||||
html = listView.getListViewHtml({
|
||||
items: result.Items,
|
||||
sortBy: query.SortBy
|
||||
});
|
||||
|
@ -107,17 +107,31 @@
|
|||
});
|
||||
}
|
||||
|
||||
$('.paging', tabContent).html(pagingHtml);
|
||||
var i, length;
|
||||
var elems = tabContent.querySelectorAll('.paging');
|
||||
for (i = 0, length = elems.length; i < length; i++) {
|
||||
elems[i].innerHTML = pagingHtml;
|
||||
}
|
||||
|
||||
$('.btnNextPage', tabContent).on('click', function () {
|
||||
function onNextPageClick() {
|
||||
query.StartIndex += query.Limit;
|
||||
reloadItems(tabContent);
|
||||
});
|
||||
}
|
||||
|
||||
$('.btnPreviousPage', tabContent).on('click', function () {
|
||||
function onPreviousPageClick() {
|
||||
query.StartIndex -= query.Limit;
|
||||
reloadItems(tabContent);
|
||||
});
|
||||
}
|
||||
|
||||
elems = tabContent.querySelectorAll('.btnNextPage');
|
||||
for (i = 0, length = elems.length; i < length; i++) {
|
||||
elems[i].addEventListener('click', onNextPageClick);
|
||||
}
|
||||
|
||||
elems = tabContent.querySelectorAll('.btnPreviousPage');
|
||||
for (i = 0, length = elems.length; i < length; i++) {
|
||||
elems[i].addEventListener('click', onPreviousPageClick);
|
||||
}
|
||||
|
||||
var itemsContainer = tabContent.querySelector('.itemsContainer');
|
||||
itemsContainer.innerHTML = html;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue