1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

always show paging

This commit is contained in:
Luke Pulverenti 2013-04-19 12:28:06 -04:00
parent 414feaf3a2
commit 8f85dce021
19 changed files with 66 additions and 121 deletions

View file

@ -85,11 +85,11 @@
}
}
/*@media all and (min-width: 1000px) {
.libraryPage > .ui-content, .libraryPage > .ui-panel-content-wrap {
margin-top: -20px!important;
@media all and (min-width: 1000px) {
.libraryPage:not(.folderListPage) > .ui-content, .libraryPage:not(.folderListPage) > .ui-panel-content-wrap {
margin-top: -35px!important;
}
}*/
}
@media all and (min-width: 1200px) {

View file

@ -4,7 +4,7 @@
<title></title>
</head>
<body>
<div id="itemListPage" data-role="page" class="page libraryPage" data-theme="a">
<div id="itemListPage" data-role="page" class="page libraryPage folderListPage" data-theme="a">
<div data-role="content" class="itemListContent">
<h1 id="itemName" class="listHeader" style="margin-top: .5em;"></h1>

View file

@ -21,20 +21,16 @@
var html = '';
var showPaging = result.TotalRecordCount > query.Limit;
$('.listTopPaging', page).html(showPaging ? LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true) : '').trigger('create');
$('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create');
html += LibraryBrowser.getPosterDetailViewHtml({
items: result.Items,
useAverageAspectRatio: true
});
if (showPaging) {
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
}
var elem = $('#items', page).html(html).trigger('create');
$('#items', page).html(html).trigger('create');
$('.selectPage', page).on('change', function () {
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;

View file

@ -20,9 +20,7 @@
var html = '';
var showPaging = result.TotalRecordCount > query.Limit;
$('.listTopPaging', page).html(showPaging ? LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true) : '').trigger('create');
$('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create');
html += LibraryBrowser.getPosterDetailViewHtml({
items: result.Items,
@ -31,11 +29,9 @@
countNamePlural: "Games"
});
if (showPaging) {
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
}
var elem = $('#items', page).html(html).trigger('create');
$('#items', page).html(html).trigger('create');
$('.selectPage', page).on('change', function () {
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;

View file

@ -23,9 +23,7 @@
var html = '';
var showPaging = result.TotalRecordCount > query.Limit;
$('.listTopPaging', page).html(showPaging ? LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true) : '').trigger('create');
$('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create');
for (var i = 0, length = result.Items.length; i < length; i++) {
var item = result.Items[i];
@ -41,11 +39,9 @@
}
if (showPaging) {
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
}
var elem = $('#items', page).html(html).trigger('create');
$('#items', page).html(html).trigger('create');
$('.selectPage', page).on('change', function () {
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;

View file

@ -20,9 +20,7 @@
var html = '';
var showPaging = result.TotalRecordCount > query.Limit;
$('.listTopPaging', page).html(showPaging ? LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true) : '').trigger('create');
$('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create');
html += LibraryBrowser.getPosterDetailViewHtml({
items: result.Items,
@ -31,11 +29,9 @@
countNamePlural: "Games"
});
if (showPaging) {
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
}
var elem = $('#items', page).html(html).trigger('create');
$('#items', page).html(html).trigger('create');
$('.selectPage', page).on('change', function () {
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;

View file

@ -22,20 +22,16 @@
var html = '';
var showPaging = result.TotalRecordCount > query.Limit;
$('.listTopPaging', page).html(showPaging ? LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true) : '').trigger('create');
$('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create');
html += LibraryBrowser.getPosterDetailViewHtml({
items: result.Items,
useAverageAspectRatio: true
});
if (showPaging) {
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
}
var elem = $('#items', page).html(html).trigger('create');
$('#items', page).html(html).trigger('create');
$('.selectPage', page).on('change', function () {
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;

View file

@ -254,18 +254,14 @@
ApiClient.getItems(Dashboard.getCurrentUserId(), query).done(function (result) {
var html = '';
var showPaging = result.TotalRecordCount > query.Limit;
$('.listTopPaging', page).html(showPaging ? LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true) : '').trigger('create');
$('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create');
html += LibraryBrowser.getPosterDetailViewHtml({
items: result.Items,
useAverageAspectRatio: true
});
if (showPaging) {
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
}
$('#items', page).html(html).trigger('create');

View file

@ -22,9 +22,7 @@
var html = '';
var showPaging = result.TotalRecordCount > query.Limit;
$('.listTopPaging', page).html(showPaging ? LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true) : '').trigger('create');
$('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create');
if (view == "Backdrop") {
html += LibraryBrowser.getPosterDetailViewHtml({
@ -40,11 +38,9 @@
});
}
if (showPaging) {
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
}
var elem = $('#items', page).html(html).trigger('create');
$('#items', page).html(html).trigger('create');
$('.selectPage', page).on('change', function () {
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;

View file

@ -492,15 +492,24 @@
var recordsEnd = Math.min(query.StartIndex + query.Limit, totalRecordCount);
var showControls = totalRecordCount > query.Limit;
html += '<div class="listPaging">';
html += '<span style="margin-right: 10px;">';
html += (query.StartIndex + 1) + '-' + recordsEnd + ' of ' + totalRecordCount + ', page ' + dropdownHtml + ' of ' + pageCount;
html += (query.StartIndex + 1) + '-' + recordsEnd + ' of ' + totalRecordCount;
if (showControls) {
html += ', page ' + dropdownHtml + ' of ' + pageCount;
}
html += '</span>';
if (showControls) {
html += '<button data-icon="arrow-left" data-iconpos="notext" data-inline="true" data-mini="true" class="btnPreviousPage" ' + (query.StartIndex ? '' : 'disabled') + '>Previous Page</button>';
html += '<button data-icon="arrow-right" data-iconpos="notext" data-inline="true" data-mini="true" class="btnNextPage" ' + (query.StartIndex + query.Limit > totalRecordCount ? 'disabled' : '') + '>Next Page</button>';
}
html += '</div>';

View file

@ -20,9 +20,7 @@
var html = '';
var showPaging = result.TotalRecordCount > query.Limit;
$('.listTopPaging', page).html(showPaging ? LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true) : '').trigger('create');
$('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create');
html += LibraryBrowser.getPosterDetailViewHtml({
items: result.Items,
@ -31,11 +29,9 @@
countNamePlural: "Movies"
});
if (showPaging) {
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
}
var elem = $('#items', page).html(html).trigger('create');
$('#items', page).html(html).trigger('create');
$('.selectPage', page).on('change', function () {
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;

View file

@ -21,9 +21,7 @@
var html = '';
var showPaging = result.TotalRecordCount > query.Limit;
$('.listTopPaging', page).html(showPaging ? LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true) : '').trigger('create');
$('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create');
html += LibraryBrowser.getPosterDetailViewHtml({
items: result.Items,
@ -32,11 +30,9 @@
countNamePlural: "Movies"
});
if (showPaging) {
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
}
var elem = $('#items', page).html(html).trigger('create');
$('#items', page).html(html).trigger('create');
$('.selectPage', page).on('change', function () {
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;

View file

@ -22,9 +22,7 @@
var html = '';
var showPaging = result.TotalRecordCount > query.Limit;
$('.listTopPaging', page).html(showPaging ? LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true) : '').trigger('create');
$('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create');
if (view == "Backdrop") {
html += LibraryBrowser.getPosterDetailViewHtml({
@ -40,11 +38,9 @@
});
}
if (showPaging) {
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
}
var elem = $('#items', page).html(html).trigger('create');
$('#items', page).html(html).trigger('create');
$('.selectPage', page).on('change', function () {
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;

View file

@ -20,9 +20,7 @@
var html = '';
var showPaging = result.TotalRecordCount > query.Limit;
$('.listTopPaging', page).html(showPaging ? LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true) : '').trigger('create');
$('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create');
html += LibraryBrowser.getPosterDetailViewHtml({
items: result.Items,
@ -31,11 +29,9 @@
countNamePlural: "Movies"
});
if (showPaging) {
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
}
var elem = $('#items', page).html(html).trigger('create');
$('#items', page).html(html).trigger('create');
$('.selectPage', page).on('change', function () {
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;

View file

@ -22,9 +22,7 @@
var html = '';
var showPaging = result.TotalRecordCount > query.Limit;
$('.listTopPaging', page).html(showPaging ? LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true) : '').trigger('create');
$('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create');
if (view == "Backdrop") {
html += LibraryBrowser.getPosterDetailViewHtml({
@ -40,11 +38,9 @@
});
}
if (showPaging) {
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
}
var elem = $('#items', page).html(html).trigger('create');
$('#items', page).html(html).trigger('create');
$('.selectPage', page).on('change', function () {
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;

View file

@ -20,9 +20,7 @@
var html = '';
var showPaging = result.TotalRecordCount > query.Limit;
$('.listTopPaging', page).html(showPaging ? LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true) : '').trigger('create');
$('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create');
html += LibraryBrowser.getPosterDetailViewHtml({
items: result.Items,
@ -31,11 +29,9 @@
countNamePlural: "Shows"
});
if (showPaging) {
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
}
var elem = $('#items', page).html(html).trigger('create');
$('#items', page).html(html).trigger('create');
$('.selectPage', page).on('change', function () {
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;

View file

@ -21,9 +21,7 @@
var html = '';
var showPaging = result.TotalRecordCount > query.Limit;
$('.listTopPaging', page).html(showPaging ? LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true) : '').trigger('create');
$('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create');
html += LibraryBrowser.getPosterDetailViewHtml({
items: result.Items,
@ -32,11 +30,9 @@
countNamePlural: "Shows"
});
if (showPaging) {
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
}
var elem = $('#items', page).html(html).trigger('create');
$('#items', page).html(html).trigger('create');
$('.selectPage', page).on('change', function () {
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;

View file

@ -22,9 +22,7 @@
var html = '';
var showPaging = result.TotalRecordCount > query.Limit;
$('.listTopPaging', page).html(showPaging ? LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true) : '').trigger('create');
$('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create');
if (view == "Backdrop") {
html += LibraryBrowser.getPosterDetailViewHtml({
@ -40,11 +38,9 @@
});
}
if (showPaging) {
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
}
var elem = $('#items', page).html(html).trigger('create');
$('#items', page).html(html).trigger('create');
$('.selectPage', page).on('change', function () {
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;

View file

@ -20,9 +20,7 @@
var html = '';
var showPaging = result.TotalRecordCount > query.Limit;
$('.listTopPaging', page).html(showPaging ? LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true) : '').trigger('create');
$('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create');
html += LibraryBrowser.getPosterDetailViewHtml({
items: result.Items,
@ -31,11 +29,9 @@
countNamePlural: "Shows"
});
if (showPaging) {
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
}
var elem = $('#items', page).html(html).trigger('create');
$('#items', page).html(html).trigger('create');
$('.selectPage', page).on('change', function () {
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;