mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
updated mbt endpoints
This commit is contained in:
parent
b1901ee91e
commit
707f6ab48b
24 changed files with 801 additions and 585 deletions
|
@ -24,6 +24,8 @@
|
|||
|
||||
$('.listTopPaging', page).html(LibraryBrowser.getPagingHtml(query, result.TotalRecordCount, true)).trigger('create');
|
||||
|
||||
updateFilterControls(page);
|
||||
|
||||
var checkSortOption = $('.radioSortBy:checked', page);
|
||||
$('.viewSummary', page).html(LibraryBrowser.getViewSummaryHtml(query, checkSortOption)).trigger('create');
|
||||
|
||||
|
@ -37,7 +39,11 @@
|
|||
$('#items', page).html(html).trigger('create');
|
||||
|
||||
$('.btnChangeToDefaultSort', page).on('click', function () {
|
||||
$('.defaultSort', page)[0].click();
|
||||
query.StartIndex = 0;
|
||||
query.SortOrder = 'Ascending';
|
||||
query.SortBy = $('.defaultSort', page).data('sortby');
|
||||
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.selectPage', page).on('change', function () {
|
||||
|
@ -61,12 +67,43 @@
|
|||
reloadItems(page);
|
||||
});
|
||||
|
||||
LibraryBrowser.saveQueryValues('boxsets', query);
|
||||
|
||||
LibraryBrowser.saveQueryValues('boxsets', query);
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
});
|
||||
}
|
||||
|
||||
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 || "");
|
||||
var filterName = this.getAttribute('data-filter');
|
||||
|
||||
this.checked = filters.indexOf(',' + filterName) != -1;
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
$('#chkTrailer', page).checked(query.HasTrailer == true).checkboxradio('refresh');
|
||||
$('#chkThemeSong', page).checked(query.HasThemeSong == true).checkboxradio('refresh');
|
||||
$('#chkThemeVideo', page).checked(query.HasThemeVideo == true).checkboxradio('refresh');
|
||||
|
||||
$('.alphabetPicker', page).alphaValue(query.NameStartsWithOrGreater);
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#boxsetsPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
@ -152,33 +189,7 @@
|
|||
|
||||
}).on('pageshow', "#boxsetsPage", function () {
|
||||
|
||||
// Reset form values using the last used query
|
||||
$('.radioSortBy', this).each(function () {
|
||||
|
||||
this.checked = (query.SortBy || '').toLowerCase() == this.getAttribute('data-sortby').toLowerCase();
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
$('.radioSortOrder', this).each(function () {
|
||||
|
||||
this.checked = (query.SortOrder || '').toLowerCase() == this.getAttribute('data-sortorder').toLowerCase();
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
$('.chkStandardFilter', this).each(function () {
|
||||
|
||||
var filters = "," + (query.Filters || "");
|
||||
var filterName = this.getAttribute('data-filter');
|
||||
|
||||
this.checked = filters.indexOf(',' + filterName) != -1;
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
$('#chkTrailer', this).checked(query.HasTrailer == true).checkboxradio('refresh');
|
||||
$('#chkThemeSong', this).checked(query.HasThemeSong == true).checkboxradio('refresh');
|
||||
$('#chkThemeVideo', this).checked(query.HasThemeVideo == true).checkboxradio('refresh');
|
||||
|
||||
$('.alphabetPicker', this).alphaValue(query.NameStartsWithOrGreater);
|
||||
updateFilterControls(this);
|
||||
});
|
||||
|
||||
})(jQuery, document);
|
Loading…
Add table
Add a link
Reference in a new issue