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 {
|
.libraryItemsGrid th {
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
|
border-bottom: 1px solid #555;
|
||||||
}
|
}
|
||||||
|
|
||||||
.libraryItemsGrid td, .libraryItemsGrid th {
|
.libraryItemsGrid td {
|
||||||
border-top: 1px solid #555;
|
border-top: 1px solid #555;
|
||||||
border-bottom: 1px solid #555;
|
border-bottom: 1px solid #555;
|
||||||
}
|
}
|
||||||
|
|
|
@ -311,5 +311,32 @@
|
||||||
} else {
|
} else {
|
||||||
$('#itemLinks', page).hide();
|
$('#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 testableAudioElement = document.createElement('audio');
|
||||||
var testableVideoElement = document.createElement('video');
|
var testableVideoElement = document.createElement('video');
|
||||||
|
@ -360,4 +360,4 @@
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
|
|
||||||
})(document, clearTimeout, screen, localStorage, _V_, $);
|
})(document, clearTimeout, screen, localStorage, _V_, $, setInterval);
|
|
@ -138,31 +138,6 @@
|
||||||
return html;
|
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) {
|
function reloadItems(page) {
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
@ -174,7 +149,7 @@
|
||||||
var showPaging = result.TotalRecordCount > query.Limit;
|
var showPaging = result.TotalRecordCount > query.Limit;
|
||||||
|
|
||||||
if (showPaging) {
|
if (showPaging) {
|
||||||
html += getPagingHtml(result);
|
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (view == "Poster") {
|
if (view == "Poster") {
|
||||||
|
@ -188,7 +163,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (showPaging) {
|
if (showPaging) {
|
||||||
html += getPagingHtml(result);
|
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
var elem = $('#items', page);
|
var elem = $('#items', page);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue