mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
paging progress
This commit is contained in:
parent
9620b78e2a
commit
72a4598a2e
4 changed files with 124 additions and 121 deletions
|
@ -87,9 +87,10 @@
|
|||
|
||||
.libraryItemsGrid th {
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 1px solid #555;
|
||||
}
|
||||
|
||||
.libraryItemsGrid td, .libraryItemsGrid th {
|
||||
.libraryItemsGrid td {
|
||||
border-top: 1px solid #555;
|
||||
border-bottom: 1px solid #555;
|
||||
}
|
||||
|
|
|
@ -204,7 +204,7 @@
|
|||
html += item.Name;
|
||||
html += "</div>";
|
||||
html += "<div class='posterViewItemText'>";
|
||||
html += item.ChildCount+" Movie";
|
||||
html += item.ChildCount + " Movie";
|
||||
if (item.ChildCount > 1) html += "s";
|
||||
html += "</div>";
|
||||
}
|
||||
|
@ -273,7 +273,7 @@
|
|||
|
||||
renderLinks: function (item) {
|
||||
var page = $.mobile.activePage;
|
||||
//console.log(item);
|
||||
//console.log(item);
|
||||
if (item.ProviderIds) {
|
||||
|
||||
var html = 'Links: ';
|
||||
|
@ -311,5 +311,32 @@
|
|||
} else {
|
||||
$('#itemLinks', page).hide();
|
||||
}
|
||||
},
|
||||
|
||||
getPagingHtml: function (query, totalRecordCount) {
|
||||
|
||||
var html = '';
|
||||
|
||||
var pageCount = Math.ceil(totalRecordCount / query.Limit);
|
||||
var pageNumber = (query.StartIndex / query.Limit) + 1;
|
||||
|
||||
var dropdownHtml = '<select data-enhance="false" data-role="none">';
|
||||
for (var i = 1; i <= pageCount; i++) {
|
||||
|
||||
if (i == pageNumber) {
|
||||
dropdownHtml += '<option value="' + i + '" selected="selected">' + i + '</option>';
|
||||
} else {
|
||||
dropdownHtml += '<option value="' + i + '">' + i + '</option>';
|
||||
}
|
||||
}
|
||||
dropdownHtml += '</select>';
|
||||
|
||||
var recordsEnd = Math.min(query.StartIndex + query.Limit, totalRecordCount);
|
||||
|
||||
html += '<div class="listPaging">';
|
||||
html += 'Results ' + (query.StartIndex + 1) + '-' + recordsEnd + ' of ' + totalRecordCount + ', page ' + dropdownHtml + ' of ' + pageCount;
|
||||
html += '</div>';
|
||||
|
||||
return html;
|
||||
}
|
||||
};
|
|
@ -1,4 +1,4 @@
|
|||
var MediaPlayer = (function (document, clearTimeout, screen, localStorage, _V_, $) {
|
||||
var MediaPlayer = (function (document, clearTimeout, screen, localStorage, _V_, $, setInterval) {
|
||||
|
||||
var testableAudioElement = document.createElement('audio');
|
||||
var testableVideoElement = document.createElement('video');
|
||||
|
@ -360,4 +360,4 @@
|
|||
|
||||
return self;
|
||||
|
||||
})(document, clearTimeout, screen, localStorage, _V_, $);
|
||||
})(document, clearTimeout, screen, localStorage, _V_, $, setInterval);
|
|
@ -138,31 +138,6 @@
|
|||
return html;
|
||||
}
|
||||
|
||||
function getPagingHtml(result) {
|
||||
|
||||
var html = '';
|
||||
|
||||
var pageCount = Math.round(result.TotalRecordCount / query.Limit);
|
||||
var pageNumber = (query.StartIndex / query.Limit) + 1;
|
||||
|
||||
var dropdownHtml = '<select data-enhance="false" data-role="none">';
|
||||
for (var i = 1; i <= pageCount; i++) {
|
||||
|
||||
if (i == pageNumber) {
|
||||
dropdownHtml += '<option value="' + i + '" selected="selected">' + i + '</option>';
|
||||
} else {
|
||||
dropdownHtml += '<option value="' + i + '">' + i + '</option>';
|
||||
}
|
||||
}
|
||||
dropdownHtml += '</select>';
|
||||
|
||||
html += '<div class="listPaging">';
|
||||
html += 'Results ' + (query.StartIndex + 1) + '-' + (query.StartIndex + query.Limit) + ' of ' + result.TotalRecordCount + ', page ' + dropdownHtml + ' of ' + pageCount;
|
||||
html += '</div>';
|
||||
|
||||
return html;
|
||||
}
|
||||
|
||||
function reloadItems(page) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
@ -174,7 +149,7 @@
|
|||
var showPaging = result.TotalRecordCount > query.Limit;
|
||||
|
||||
if (showPaging) {
|
||||
html += getPagingHtml(result);
|
||||
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
||||
}
|
||||
|
||||
if (view == "Poster") {
|
||||
|
@ -188,7 +163,7 @@
|
|||
}
|
||||
|
||||
if (showPaging) {
|
||||
html += getPagingHtml(result);
|
||||
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
||||
}
|
||||
|
||||
var elem = $('#items', page);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue