mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
calculate item by name counts on the fly
This commit is contained in:
parent
fce65d5942
commit
8fb161c4f6
25 changed files with 89 additions and 614 deletions
|
@ -114,6 +114,13 @@
|
|||
nodes.push({ attr: { id: 'libraryreport', rel: 'default', itemtype: 'libraryreport' }, data: 'Reports' });
|
||||
|
||||
callback(nodes);
|
||||
|
||||
if (!selectedId) {
|
||||
|
||||
if (window.location.toString().toLowerCase().indexOf('report.html') != -1) {
|
||||
selectedId = 'libraryreport';
|
||||
}
|
||||
}
|
||||
|
||||
if (selectedId && nodes.filter(function (f) {
|
||||
|
||||
|
|
|
@ -25,9 +25,6 @@
|
|||
|
||||
updateFilterControls(page);
|
||||
|
||||
var checkSortOption = $('.radioSortBy:checked', page);
|
||||
$('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create');
|
||||
|
||||
html = LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
shape: "backdrop",
|
||||
|
@ -65,36 +62,12 @@
|
|||
|
||||
function updateFilterControls(page) {
|
||||
|
||||
// Reset form values using the last used query
|
||||
$('.radioSortBy', page).each(function () {
|
||||
|
||||
this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase();
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
$('.radioSortOrder', page).each(function () {
|
||||
|
||||
this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase();
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#gameGenresPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.radioSortOrder', this).on('click', function () {
|
||||
query.SortOrder = this.getAttribute('data-sortorder');
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.chkStandardFilter', this).on('change', function () {
|
||||
|
||||
var filterName = this.getAttribute('data-filter');
|
||||
|
|
|
@ -26,9 +26,6 @@
|
|||
|
||||
updateFilterControls(page);
|
||||
|
||||
var checkSortOption = $('.radioSortBy:checked', page);
|
||||
$('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create');
|
||||
|
||||
html = LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
shape: "backdrop",
|
||||
|
@ -66,36 +63,12 @@
|
|||
|
||||
function updateFilterControls(page) {
|
||||
|
||||
// Reset form values using the last used query
|
||||
$('.radioSortBy', page).each(function () {
|
||||
|
||||
this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase();
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
$('.radioSortOrder', page).each(function () {
|
||||
|
||||
this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase();
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#gameStudiosPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.radioSortOrder', this).on('click', function () {
|
||||
query.SortOrder = this.getAttribute('data-sortorder');
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.chkStandardFilter', this).on('change', function () {
|
||||
|
||||
var filterName = this.getAttribute('data-filter');
|
||||
|
|
|
@ -61,10 +61,10 @@
|
|||
{
|
||||
return [
|
||||
{},
|
||||
{ name: 'Album Artist', sortField: 'AlbumArtist,SortName' },
|
||||
{ name: 'Album Artist', sortField: 'AlbumArtist,Album,SortName' },
|
||||
{ name: 'Album', sortField: 'Album,SortName' },
|
||||
{ name: 'Disc', sortField: 'Album,SortName' },
|
||||
{ name: 'Track', sortField: 'Album,SortName' },
|
||||
{ name: 'Disc' },
|
||||
{ name: 'Track' },
|
||||
{ name: 'Name', sortField: 'Name' },
|
||||
{ name: 'Date Added', sortField: 'DateCreated,SortName' },
|
||||
{ name: 'Release Date', sortField: 'ProductionYear,PremiereDate,SortName' },
|
||||
|
@ -85,6 +85,7 @@
|
|||
{ name: 'Community Rating', sortField: 'CommunityRating,SortName' },
|
||||
{ name: 'Runtime', sortField: 'Runtime,SortName' },
|
||||
{ name: 'Video' },
|
||||
{ name: 'Resolution' },
|
||||
{ name: 'Audio' },
|
||||
{ name: 'Subtitles' }
|
||||
];
|
||||
|
@ -145,6 +146,7 @@
|
|||
{ name: 'Community Rating', sortField: 'CommunityRating,SortName' },
|
||||
{ name: 'Runtime', sortField: 'Runtime,SortName' },
|
||||
{ name: 'Video' },
|
||||
{ name: 'Resolution' },
|
||||
{ name: 'Audio' },
|
||||
{ name: 'Subtitles' },
|
||||
{ name: 'Trailers' },
|
||||
|
@ -154,6 +156,53 @@
|
|||
}
|
||||
}
|
||||
|
||||
function getDefaultSortOrder(reportType) {
|
||||
|
||||
switch (reportType) {
|
||||
|
||||
case 'Season':
|
||||
{
|
||||
return "SeriesSortName,SortName";
|
||||
}
|
||||
case 'Series':
|
||||
{
|
||||
return "SortName";
|
||||
}
|
||||
case 'Game':
|
||||
{
|
||||
return "GameSystem,SortName";
|
||||
}
|
||||
case 'Audio':
|
||||
{
|
||||
return "AlbumArtist,Album,SortName";
|
||||
}
|
||||
case 'Episode':
|
||||
{
|
||||
return "SeriesSortName,SortName";
|
||||
}
|
||||
case 'BoxSet':
|
||||
{
|
||||
return "SortName";
|
||||
}
|
||||
case 'Book':
|
||||
{
|
||||
return "SortName";
|
||||
}
|
||||
case 'MusicArtist':
|
||||
{
|
||||
return "SortName";
|
||||
}
|
||||
case 'MusicAlbum':
|
||||
{
|
||||
return "AlbumArtist,SortName";
|
||||
}
|
||||
default:
|
||||
{
|
||||
return "SortName";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getItemCellsHtml(item, headercells) {
|
||||
|
||||
return headercells.map(function (cell) {
|
||||
|
@ -161,6 +210,8 @@
|
|||
var html = '';
|
||||
html += '<td>';
|
||||
|
||||
var stream;
|
||||
|
||||
switch (cell.type || cell.name) {
|
||||
|
||||
case 'Album Artist':
|
||||
|
@ -205,7 +256,7 @@
|
|||
}
|
||||
case 'Audio':
|
||||
{
|
||||
var stream = (item.MediaStreams || []).filter(function (s) {
|
||||
stream = (item.MediaStreams || []).filter(function (s) {
|
||||
|
||||
return s.Type == 'Audio';
|
||||
|
||||
|
@ -220,7 +271,7 @@
|
|||
}
|
||||
case 'Video':
|
||||
{
|
||||
var stream = (item.MediaStreams || []).filter(function (s) {
|
||||
stream = (item.MediaStreams || []).filter(function (s) {
|
||||
|
||||
return s.Type == 'Video';
|
||||
|
||||
|
@ -231,6 +282,19 @@
|
|||
}
|
||||
break;
|
||||
}
|
||||
case 'Resolution':
|
||||
{
|
||||
stream = (item.MediaStreams || []).filter(function (s) {
|
||||
|
||||
return s.Type == 'Video';
|
||||
|
||||
})[0];
|
||||
|
||||
if (stream && stream.Width) {
|
||||
html += stream.Width + "*" + (stream.Height || "-");
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 'Embedded Image':
|
||||
{
|
||||
if ((item.MediaStreams || []).filter(function (s) {
|
||||
|
@ -420,7 +484,7 @@
|
|||
cellHtml += (c.name || ' ');
|
||||
|
||||
if (c.sortField) {
|
||||
|
||||
|
||||
cellHtml += '</a>';
|
||||
|
||||
if (c.sortField == currentSortField) {
|
||||
|
@ -608,6 +672,9 @@
|
|||
query.StartIndex = 0;
|
||||
query.IncludeItemTypes = this.value;
|
||||
|
||||
query.SortBy = getDefaultSortOrder(this.value);
|
||||
query.SortOrder = "Ascending";
|
||||
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
|
@ -782,6 +849,9 @@
|
|||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
query.SortBy = getDefaultSortOrder($('#selectView', page).val());
|
||||
query.SortOrder = "Ascending";
|
||||
|
||||
reloadItems(page);
|
||||
|
||||
}).on('pageshow', "#libraryReportPage", function () {
|
||||
|
|
|
@ -8,14 +8,14 @@
|
|||
|
||||
userId: Dashboard.getCurrentUserId(),
|
||||
IsAiring: true,
|
||||
limit: 10
|
||||
limit: 12
|
||||
|
||||
}).done(function (result) {
|
||||
|
||||
var html = LibraryBrowser.getPosterViewHtml({
|
||||
|
||||
items: result.Items,
|
||||
shape: "backdrop",
|
||||
shape: "square",
|
||||
showTitle: true,
|
||||
showParentTitle: true,
|
||||
overlayText: true,
|
||||
|
@ -31,14 +31,14 @@
|
|||
userId: Dashboard.getCurrentUserId(),
|
||||
IsAiring: false,
|
||||
HasAired: false,
|
||||
limit: 10
|
||||
limit: 12
|
||||
|
||||
}).done(function (result) {
|
||||
|
||||
var html = LibraryBrowser.getPosterViewHtml({
|
||||
|
||||
items: result.Items,
|
||||
shape: "backdrop",
|
||||
shape: "square",
|
||||
showTitle: true,
|
||||
showParentTitle: true,
|
||||
overlayText: true,
|
||||
|
|
|
@ -26,9 +26,6 @@
|
|||
|
||||
updateFilterControls(page);
|
||||
|
||||
var checkSortOption = $('.radioSortBy:checked', page);
|
||||
$('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create');
|
||||
|
||||
html = LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
shape: "backdrop",
|
||||
|
@ -66,36 +63,12 @@
|
|||
|
||||
function updateFilterControls(page) {
|
||||
|
||||
// Reset form values using the last used query
|
||||
$('.radioSortBy', page).each(function () {
|
||||
|
||||
this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase();
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
$('.radioSortOrder', page).each(function () {
|
||||
|
||||
this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase();
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#movieGenresPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.radioSortOrder', this).on('click', function () {
|
||||
query.SortOrder = this.getAttribute('data-sortorder');
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.chkStandardFilter', this).on('change', function () {
|
||||
|
||||
var filterName = this.getAttribute('data-filter');
|
||||
|
|
|
@ -27,9 +27,6 @@
|
|||
|
||||
updateFilterControls(page);
|
||||
|
||||
var checkSortOption = $('.radioSortBy:checked', page);
|
||||
$('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create');
|
||||
|
||||
html = LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
shape: "portrait",
|
||||
|
@ -68,19 +65,6 @@
|
|||
|
||||
function updateFilterControls(page) {
|
||||
|
||||
// Reset form values using the last used query
|
||||
$('.radioSortBy', page).each(function () {
|
||||
|
||||
this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase();
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
$('.radioSortOrder', page).each(function () {
|
||||
|
||||
this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase();
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
$('.chkPersonTypeFilter', page).each(function () {
|
||||
|
||||
var filters = "," + (query.PersonTypes || "");
|
||||
|
@ -97,18 +81,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.radioSortOrder', this).on('click', function () {
|
||||
query.SortOrder = this.getAttribute('data-sortorder');
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.chkStandardFilter', this).on('change', function () {
|
||||
|
||||
var filterName = this.getAttribute('data-filter');
|
||||
|
|
|
@ -26,9 +26,6 @@
|
|||
|
||||
updateFilterControls(page);
|
||||
|
||||
var checkSortOption = $('.radioSortBy:checked', page);
|
||||
$('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create');
|
||||
|
||||
html = LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
shape: "backdrop",
|
||||
|
@ -65,37 +62,12 @@
|
|||
}
|
||||
|
||||
function updateFilterControls(page) {
|
||||
|
||||
// Reset form values using the last used query
|
||||
$('.radioSortBy', page).each(function () {
|
||||
|
||||
this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase();
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
$('.radioSortOrder', page).each(function () {
|
||||
|
||||
this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase();
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#movieStudiosPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.radioSortOrder', this).on('click', function () {
|
||||
query.SortOrder = this.getAttribute('data-sortorder');
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.chkStandardFilter', this).on('change', function () {
|
||||
|
||||
var filterName = this.getAttribute('data-filter');
|
||||
|
|
|
@ -26,9 +26,6 @@
|
|||
|
||||
updateFilterControls(page);
|
||||
|
||||
var checkSortOption = $('.radioSortBy:checked', page);
|
||||
$('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create');
|
||||
|
||||
html = LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
shape: "square",
|
||||
|
@ -66,19 +63,6 @@
|
|||
|
||||
function updateFilterControls(page) {
|
||||
|
||||
// Reset form values using the last used query
|
||||
$('.radioSortBy', page).each(function () {
|
||||
|
||||
this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase();
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
$('.radioSortOrder', page).each(function () {
|
||||
|
||||
this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase();
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
$('.alphabetPicker', page).alphaValue(query.NameStartsWithOrGreater);
|
||||
}
|
||||
|
||||
|
@ -86,18 +70,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.radioSortOrder', this).on('click', function () {
|
||||
query.SortOrder = this.getAttribute('data-sortorder');
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.chkStandardFilter', this).on('change', function () {
|
||||
|
||||
var filterName = this.getAttribute('data-filter');
|
||||
|
|
|
@ -25,9 +25,6 @@
|
|||
|
||||
updateFilterControls(page);
|
||||
|
||||
var checkSortOption = $('.radioSortBy:checked', page);
|
||||
$('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create');
|
||||
|
||||
html = LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
shape: "square",
|
||||
|
@ -65,19 +62,6 @@
|
|||
|
||||
function updateFilterControls(page) {
|
||||
|
||||
// Reset form values using the last used query
|
||||
$('.radioSortBy', page).each(function () {
|
||||
|
||||
this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase();
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
$('.radioSortOrder', page).each(function () {
|
||||
|
||||
this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase();
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
$('.alphabetPicker', page).alphaValue(query.NameStartsWithOrGreater);
|
||||
}
|
||||
|
||||
|
@ -85,18 +69,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.radioSortOrder', this).on('click', function () {
|
||||
query.SortOrder = this.getAttribute('data-sortorder');
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.chkStandardFilter', this).on('change', function () {
|
||||
|
||||
var filterName = this.getAttribute('data-filter');
|
||||
|
|
|
@ -26,9 +26,6 @@
|
|||
|
||||
updateFilterControls(page);
|
||||
|
||||
var checkSortOption = $('.radioSortBy:checked', page);
|
||||
$('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create');
|
||||
|
||||
html = LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
shape: "backdrop",
|
||||
|
@ -66,36 +63,12 @@
|
|||
|
||||
function updateFilterControls(page) {
|
||||
|
||||
// Reset form values using the last used query
|
||||
$('.radioSortBy', page).each(function () {
|
||||
|
||||
this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase();
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
$('.radioSortOrder', page).each(function () {
|
||||
|
||||
this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase();
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#musicGenresPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.radioSortOrder', this).on('click', function () {
|
||||
query.SortOrder = this.getAttribute('data-sortorder');
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.chkStandardFilter', this).on('change', function () {
|
||||
|
||||
var filterName = this.getAttribute('data-filter');
|
||||
|
|
|
@ -26,9 +26,6 @@
|
|||
|
||||
updateFilterControls(page);
|
||||
|
||||
var checkSortOption = $('.radioSortBy:checked', page);
|
||||
$('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create');
|
||||
|
||||
html += LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
useAverageAspectRatio: true,
|
||||
|
@ -69,19 +66,6 @@
|
|||
|
||||
function updateFilterControls(page) {
|
||||
|
||||
// Reset form values using the last used query
|
||||
$('.radioSortBy', page).each(function () {
|
||||
|
||||
this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase();
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
$('.radioSortOrder', page).each(function () {
|
||||
|
||||
this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase();
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
$('.chkStandardFilter', page).each(function () {
|
||||
|
||||
var filters = "," + (query.Filters || "");
|
||||
|
@ -96,18 +80,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.radioSortOrder', this).on('click', function () {
|
||||
query.SortOrder = this.getAttribute('data-sortorder');
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.chkStandardFilter', this).on('change', function () {
|
||||
|
||||
var filterName = this.getAttribute('data-filter');
|
||||
|
|
|
@ -26,9 +26,6 @@
|
|||
|
||||
updateFilterControls(page);
|
||||
|
||||
var checkSortOption = $('.radioSortBy:checked', page);
|
||||
$('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create');
|
||||
|
||||
html += LibraryBrowser.getPosterViewHtml({
|
||||
items: result.Items,
|
||||
useAverageAspectRatio: true,
|
||||
|
@ -69,19 +66,6 @@
|
|||
|
||||
function updateFilterControls(page) {
|
||||
|
||||
// Reset form values using the last used query
|
||||
$('.radioSortBy', page).each(function () {
|
||||
|
||||
this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase();
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
$('.radioSortOrder', page).each(function () {
|
||||
|
||||
this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase();
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
$('.chkStandardFilter', page).each(function () {
|
||||
|
||||
var filters = "," + (query.Filters || "");
|
||||
|
@ -96,18 +80,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.radioSortOrder', this).on('click', function () {
|
||||
query.SortOrder = this.getAttribute('data-sortorder');
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.chkStandardFilter', this).on('change', function () {
|
||||
|
||||
var filterName = this.getAttribute('data-filter');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue