mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
fixes around saving page size
This commit is contained in:
parent
d12a273620
commit
8ee91b74ab
19 changed files with 370 additions and 268 deletions
|
@ -60,8 +60,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
reloadItems(page);
|
||||
|
@ -115,6 +113,14 @@
|
|||
|
||||
}).on('pagebeforeshow', "#boxsetsPage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#boxsetsPage", function () {
|
||||
|
|
|
@ -1,115 +1,121 @@
|
|||
(function ($, document) {
|
||||
|
||||
// The base query options
|
||||
var query = {
|
||||
// The base query options
|
||||
var query = {
|
||||
|
||||
SortBy: "SortName",
|
||||
SortOrder: "Ascending",
|
||||
MediaTypes: "Game",
|
||||
Recursive: true,
|
||||
Fields: "ItemCounts,DateCreated,UserData",
|
||||
StartIndex: 0
|
||||
};
|
||||
SortBy: "SortName",
|
||||
SortOrder: "Ascending",
|
||||
MediaTypes: "Game",
|
||||
Recursive: true,
|
||||
Fields: "ItemCounts,DateCreated,UserData",
|
||||
StartIndex: 0
|
||||
};
|
||||
|
||||
function reloadItems(page) {
|
||||
function reloadItems(page) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
ApiClient.getGenres(Dashboard.getCurrentUserId(), query).done(function (result) {
|
||||
ApiClient.getGenres(Dashboard.getCurrentUserId(), query).done(function (result) {
|
||||
|
||||
var html = '';
|
||||
var html = '';
|
||||
|
||||
$('.listTopPaging', page).html(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,
|
||||
countNameSingular: "Game",
|
||||
countNamePlural: "Games",
|
||||
context: "games"
|
||||
});
|
||||
html += LibraryBrowser.getPosterDetailViewHtml({
|
||||
items: result.Items,
|
||||
countNameSingular: "Game",
|
||||
countNamePlural: "Games",
|
||||
context: "games"
|
||||
});
|
||||
|
||||
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
||||
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
||||
|
||||
$('#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;
|
||||
reloadItems(page);
|
||||
});
|
||||
$('.selectPage', page).on('change', function () {
|
||||
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.btnNextPage', page).on('click', function () {
|
||||
query.StartIndex += query.Limit;
|
||||
reloadItems(page);
|
||||
});
|
||||
$('.btnNextPage', page).on('click', function () {
|
||||
query.StartIndex += query.Limit;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.btnPreviousPage', page).on('click', function () {
|
||||
query.StartIndex -= query.Limit;
|
||||
reloadItems(page);
|
||||
});
|
||||
$('.btnPreviousPage', page).on('click', function () {
|
||||
query.StartIndex -= query.Limit;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.selectPageSize', page).on('change', function () {
|
||||
query.Limit = parseInt(this.value);
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
$('.selectPageSize', page).on('change', function () {
|
||||
query.Limit = parseInt(this.value);
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
});
|
||||
}
|
||||
Dashboard.hideLoadingMsg();
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#gameGenresPage", function () {
|
||||
$(document).on('pageinit', "#gameGenresPage", function () {
|
||||
|
||||
var page = this;
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.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);
|
||||
});
|
||||
|
||||
$('.radioSortOrder', this).on('click', function () {
|
||||
query.SortOrder = this.getAttribute('data-sortorder');
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
$('.chkStandardFilter', this).on('change', function () {
|
||||
|
||||
$('.chkStandardFilter', this).on('change', function () {
|
||||
var filterName = this.getAttribute('data-filter');
|
||||
var filters = query.Filters || "";
|
||||
|
||||
var filterName = this.getAttribute('data-filter');
|
||||
var filters = query.Filters || "";
|
||||
filters = (',' + filters).replace(',' + filterName, '').substring(1);
|
||||
|
||||
filters = (',' + filters).replace(',' + filterName, '').substring(1);
|
||||
if (this.checked) {
|
||||
filters = filters ? (filters + ',' + filterName) : filterName;
|
||||
}
|
||||
|
||||
if (this.checked) {
|
||||
filters = filters ? (filters + ',' + filterName) : filterName;
|
||||
}
|
||||
query.StartIndex = 0;
|
||||
query.Filters = filters;
|
||||
|
||||
query.StartIndex = 0;
|
||||
query.Filters = filters;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
reloadItems(page);
|
||||
});
|
||||
}).on('pagebeforeshow', "#gameGenresPage", function () {
|
||||
|
||||
}).on('pagebeforeshow', "#gameGenresPage", function () {
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
reloadItems(this);
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
}).on('pageshow', "#gameGenresPage", function () {
|
||||
reloadItems(this);
|
||||
|
||||
// Reset form values using the last used query
|
||||
$('.radioSortBy', this).each(function () {
|
||||
}).on('pageshow', "#gameGenresPage", function () {
|
||||
|
||||
this.checked = query.SortBy == this.getAttribute('data-sortby');
|
||||
// Reset form values using the last used query
|
||||
$('.radioSortBy', this).each(function () {
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
this.checked = query.SortBy == this.getAttribute('data-sortby');
|
||||
|
||||
$('.radioSortOrder', this).each(function () {
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
this.checked = query.SortOrder == this.getAttribute('data-sortorder');
|
||||
$('.radioSortOrder', this).each(function () {
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
});
|
||||
this.checked = query.SortOrder == this.getAttribute('data-sortorder');
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
});
|
||||
|
||||
})(jQuery, document);
|
|
@ -84,8 +84,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.StartIndex = 0;
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
|
@ -156,6 +154,14 @@
|
|||
|
||||
}).on('pagebeforeshow', "#gamesPage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#gamesPage", function () {
|
||||
|
|
|
@ -1,116 +1,122 @@
|
|||
(function ($, document) {
|
||||
|
||||
// The base query options
|
||||
var query = {
|
||||
// The base query options
|
||||
var query = {
|
||||
|
||||
SortBy: "SortName",
|
||||
SortOrder: "Ascending",
|
||||
MediaTypes: "Game",
|
||||
Recursive: true,
|
||||
Fields: "ItemCounts,DateCreated,UserData",
|
||||
StartIndex: 0
|
||||
};
|
||||
SortBy: "SortName",
|
||||
SortOrder: "Ascending",
|
||||
MediaTypes: "Game",
|
||||
Recursive: true,
|
||||
Fields: "ItemCounts,DateCreated,UserData",
|
||||
StartIndex: 0
|
||||
};
|
||||
|
||||
function reloadItems(page) {
|
||||
function reloadItems(page) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
ApiClient.getStudios(Dashboard.getCurrentUserId(), query).done(function (result) {
|
||||
ApiClient.getStudios(Dashboard.getCurrentUserId(), query).done(function (result) {
|
||||
|
||||
var html = '';
|
||||
var html = '';
|
||||
|
||||
$('.listTopPaging', page).html(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,
|
||||
countNameSingular: "Game",
|
||||
countNamePlural: "Games",
|
||||
context: "games"
|
||||
});
|
||||
html += LibraryBrowser.getPosterDetailViewHtml({
|
||||
items: result.Items,
|
||||
countNameSingular: "Game",
|
||||
countNamePlural: "Games",
|
||||
context: "games"
|
||||
});
|
||||
|
||||
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
||||
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
||||
|
||||
$('#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;
|
||||
reloadItems(page);
|
||||
});
|
||||
$('.selectPage', page).on('change', function () {
|
||||
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.btnNextPage', page).on('click', function () {
|
||||
query.StartIndex += query.Limit;
|
||||
reloadItems(page);
|
||||
});
|
||||
$('.btnNextPage', page).on('click', function () {
|
||||
query.StartIndex += query.Limit;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.btnPreviousPage', page).on('click', function () {
|
||||
query.StartIndex -= query.Limit;
|
||||
reloadItems(page);
|
||||
});
|
||||
$('.btnPreviousPage', page).on('click', function () {
|
||||
query.StartIndex -= query.Limit;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.selectPageSize', page).on('change', function () {
|
||||
query.Limit = parseInt(this.value);
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
$('.selectPageSize', page).on('change', function () {
|
||||
query.Limit = parseInt(this.value);
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
});
|
||||
}
|
||||
Dashboard.hideLoadingMsg();
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#gameStudiosPage", function () {
|
||||
$(document).on('pageinit', "#gameStudiosPage", function () {
|
||||
|
||||
var page = this;
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.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);
|
||||
});
|
||||
|
||||
$('.radioSortOrder', this).on('click', function () {
|
||||
query.SortOrder = this.getAttribute('data-sortorder');
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
$('.chkStandardFilter', this).on('change', function () {
|
||||
|
||||
$('.chkStandardFilter', this).on('change', function () {
|
||||
var filterName = this.getAttribute('data-filter');
|
||||
var filters = query.Filters || "";
|
||||
|
||||
var filterName = this.getAttribute('data-filter');
|
||||
var filters = query.Filters || "";
|
||||
filters = (',' + filters).replace(',' + filterName, '').substring(1);
|
||||
|
||||
filters = (',' + filters).replace(',' + filterName, '').substring(1);
|
||||
if (this.checked) {
|
||||
filters = filters ? (filters + ',' + filterName) : filterName;
|
||||
}
|
||||
|
||||
if (this.checked) {
|
||||
filters = filters ? (filters + ',' + filterName) : filterName;
|
||||
}
|
||||
query.StartIndex = 0;
|
||||
query.Filters = filters;
|
||||
|
||||
query.StartIndex = 0;
|
||||
query.Filters = filters;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
reloadItems(page);
|
||||
});
|
||||
}).on('pagebeforeshow', "#gameStudiosPage", function () {
|
||||
|
||||
}).on('pagebeforeshow', "#gameStudiosPage", function () {
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
reloadItems(this);
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
}).on('pageshow', "#gameStudiosPage", function () {
|
||||
reloadItems(this);
|
||||
|
||||
// Reset form values using the last used query
|
||||
$('.radioSortBy', this).each(function () {
|
||||
}).on('pageshow', "#gameStudiosPage", function () {
|
||||
|
||||
this.checked = query.SortBy == this.getAttribute('data-sortby');
|
||||
// Reset form values using the last used query
|
||||
$('.radioSortBy', this).each(function () {
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
this.checked = query.SortBy == this.getAttribute('data-sortby');
|
||||
|
||||
$('.radioSortOrder', this).each(function () {
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
this.checked = query.SortOrder == this.getAttribute('data-sortorder');
|
||||
$('.radioSortOrder', this).each(function () {
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
this.checked = query.SortOrder == this.getAttribute('data-sortorder');
|
||||
|
||||
});
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
});
|
||||
|
||||
})(jQuery, document);
|
|
@ -1,122 +1,128 @@
|
|||
|
||||
(function ($, document) {
|
||||
|
||||
// The base query options
|
||||
var query = {
|
||||
// The base query options
|
||||
var query = {
|
||||
|
||||
SortBy: "SortName",
|
||||
SortOrder: "Ascending",
|
||||
IncludeItemTypes: "GamePlatform",
|
||||
Recursive: true,
|
||||
Fields: "ItemCounts,ItemCounts,DateCreated,UserData",
|
||||
StartIndex: 0
|
||||
};
|
||||
SortBy: "SortName",
|
||||
SortOrder: "Ascending",
|
||||
IncludeItemTypes: "GamePlatform",
|
||||
Recursive: true,
|
||||
Fields: "ItemCounts,ItemCounts,DateCreated,UserData",
|
||||
StartIndex: 0
|
||||
};
|
||||
|
||||
|
||||
function reloadItems(page) {
|
||||
function reloadItems(page) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
ApiClient.getItems(Dashboard.getCurrentUserId(), query).done(function (result) {
|
||||
ApiClient.getItems(Dashboard.getCurrentUserId(), query).done(function (result) {
|
||||
|
||||
var html = '';
|
||||
var html = '';
|
||||
|
||||
$('.listTopPaging', page).html(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,
|
||||
context: "games"
|
||||
});
|
||||
html += LibraryBrowser.getPosterDetailViewHtml({
|
||||
items: result.Items,
|
||||
context: "games"
|
||||
});
|
||||
|
||||
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
||||
html += LibraryBrowser.getPagingHtml(query, result.TotalRecordCount);
|
||||
|
||||
$('#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;
|
||||
reloadItems(page);
|
||||
});
|
||||
$('.selectPage', page).on('change', function () {
|
||||
query.StartIndex = (parseInt(this.value) - 1) * query.Limit;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.btnNextPage', page).on('click', function () {
|
||||
query.StartIndex += query.Limit;
|
||||
reloadItems(page);
|
||||
});
|
||||
$('.btnNextPage', page).on('click', function () {
|
||||
query.StartIndex += query.Limit;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.btnPreviousPage', page).on('click', function () {
|
||||
query.StartIndex -= query.Limit;
|
||||
reloadItems(page);
|
||||
});
|
||||
$('.btnPreviousPage', page).on('click', function () {
|
||||
query.StartIndex -= query.Limit;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.selectPageSize', page).on('change', function () {
|
||||
query.Limit = parseInt(this.value);
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
$('.selectPageSize', page).on('change', function () {
|
||||
query.Limit = parseInt(this.value);
|
||||
query.StartIndex = 0;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
});
|
||||
}
|
||||
Dashboard.hideLoadingMsg();
|
||||
});
|
||||
}
|
||||
|
||||
$(document).on('pageinit', "#gamesystemsPage", function () {
|
||||
$(document).on('pageinit', "#gamesystemsPage", function () {
|
||||
|
||||
var page = this;
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
reloadItems(page);
|
||||
});
|
||||
$('.radioSortOrder', this).on('click', function () {
|
||||
query.SortOrder = this.getAttribute('data-sortorder');
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
$('.radioSortOrder', this).on('click', function () {
|
||||
query.SortOrder = this.getAttribute('data-sortorder');
|
||||
reloadItems(page);
|
||||
});
|
||||
$('.chkStandardFilter', this).on('change', function () {
|
||||
|
||||
$('.chkStandardFilter', this).on('change', function () {
|
||||
var filterName = this.getAttribute('data-filter');
|
||||
var filters = query.Filters || "";
|
||||
|
||||
var filterName = this.getAttribute('data-filter');
|
||||
var filters = query.Filters || "";
|
||||
filters = (',' + filters).replace(',' + filterName, '').substring(1);
|
||||
|
||||
filters = (',' + filters).replace(',' + filterName, '').substring(1);
|
||||
if (this.checked) {
|
||||
filters = filters ? (filters + ',' + filterName) : filterName;
|
||||
}
|
||||
|
||||
if (this.checked) {
|
||||
filters = filters ? (filters + ',' + filterName) : filterName;
|
||||
}
|
||||
query.StartIndex = 0;
|
||||
query.Filters = filters;
|
||||
|
||||
query.StartIndex = 0;
|
||||
query.Filters = filters;
|
||||
reloadItems(page);
|
||||
});
|
||||
|
||||
reloadItems(page);
|
||||
});
|
||||
}).on('pagebeforeshow', "#gamesystemsPage", function () {
|
||||
|
||||
}).on('pagebeforeshow', "#gamesystemsPage", function () {
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
reloadItems(this);
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
}).on('pageshow', "#gamesystemsPage", function () {
|
||||
reloadItems(this);
|
||||
|
||||
// Reset form values using the last used query
|
||||
$('.radioSortBy', this).each(function () {
|
||||
}).on('pageshow', "#gamesystemsPage", function () {
|
||||
|
||||
this.checked = query.SortBy == this.getAttribute('data-sortby');
|
||||
// Reset form values using the last used query
|
||||
$('.radioSortBy', this).each(function () {
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
this.checked = query.SortBy == this.getAttribute('data-sortby');
|
||||
|
||||
$('.radioSortOrder', this).each(function () {
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
this.checked = query.SortOrder == this.getAttribute('data-sortorder');
|
||||
$('.radioSortOrder', this).each(function () {
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
this.checked = query.SortOrder == this.getAttribute('data-sortorder');
|
||||
|
||||
$('.chkStandardFilter', this).each(function () {
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
var filters = "," + (query.Filters || "");
|
||||
var filterName = this.getAttribute('data-filter');
|
||||
$('.chkStandardFilter', this).each(function () {
|
||||
|
||||
this.checked = filters.indexOf(',' + filterName) != -1;
|
||||
var filters = "," + (query.Filters || "");
|
||||
var filterName = this.getAttribute('data-filter');
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
});
|
||||
this.checked = filters.indexOf(',' + filterName) != -1;
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
});
|
||||
|
||||
})(jQuery, document);
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
(function ($, document) {
|
||||
|
||||
var view = "Poster";
|
||||
|
||||
|
||||
// The base query options
|
||||
var query = {
|
||||
|
||||
|
@ -75,15 +75,15 @@
|
|||
}
|
||||
|
||||
$('#itemName', page).html(name);
|
||||
|
||||
|
||||
Dashboard.setPageTitle(name);
|
||||
|
||||
|
||||
if (ApiClient.isWebSocketOpen()) {
|
||||
ApiClient.sendWebSocketMessage("Context", [item.Type, item.Id].join('|'));
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
Dashboard.getCurrentUser().done(function (user) {
|
||||
|
||||
if (user.Configuration.IsAdministrator) {
|
||||
|
@ -99,8 +99,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.StartIndex = 0;
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
|
@ -144,12 +142,13 @@
|
|||
|
||||
}).on('pageshow', "#itemListPage", function () {
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
query.ParentId = getParameterByName('parentId');
|
||||
query.Filters = "";
|
||||
query.SortBy = "SortName";
|
||||
query.SortOrder = "Ascending";
|
||||
query.StartIndex = 0;
|
||||
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
// Reset form values using the last used query
|
||||
|
|
|
@ -796,7 +796,8 @@
|
|||
|
||||
var recordsEnd = Math.min(query.StartIndex + query.Limit, totalRecordCount);
|
||||
|
||||
var showControls = totalRecordCount > query.Limit;
|
||||
// 20 is the minimum page size
|
||||
var showControls = totalRecordCount > 20;
|
||||
|
||||
html += '<div class="listPaging">';
|
||||
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
|
@ -94,6 +92,14 @@
|
|||
|
||||
}).on('pagebeforeshow', "#movieGenresPage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#movieGenresPage", function () {
|
||||
|
|
|
@ -62,8 +62,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
|
@ -112,6 +110,14 @@
|
|||
|
||||
}).on('pagebeforeshow', "#moviePeoplePage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#moviePeoplePage", function () {
|
||||
|
|
|
@ -83,8 +83,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.StartIndex = 0;
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
|
@ -199,6 +197,14 @@
|
|||
|
||||
}).on('pagebeforeshow', "#moviesPage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#moviesPage", function () {
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
|
@ -94,6 +92,14 @@
|
|||
|
||||
}).on('pagebeforeshow', "#movieStudiosPage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#movieStudiosPage", function () {
|
||||
|
|
|
@ -70,8 +70,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.StartIndex = 0;
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
|
@ -110,6 +108,14 @@
|
|||
|
||||
}).on('pagebeforeshow', "#movieTrailersPage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#movieTrailersPage", function () {
|
||||
|
|
|
@ -74,8 +74,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
|
@ -122,6 +120,14 @@
|
|||
|
||||
}).on('pagebeforeshow', "#musicAlbumsPage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#musicAlbumsPage", function () {
|
||||
|
|
|
@ -62,8 +62,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
|
@ -102,6 +100,14 @@
|
|||
|
||||
}).on('pagebeforeshow', "#musicArtistsPage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#musicArtistsPage", function () {
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
|
@ -94,6 +92,14 @@
|
|||
|
||||
}).on('pagebeforeshow', "#musicGenresPage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#musicGenresPage", function () {
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
|
@ -94,6 +92,14 @@
|
|||
|
||||
}).on('pagebeforeshow', "#tvGenresPage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#tvGenresPage", function () {
|
||||
|
|
|
@ -62,8 +62,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
|
@ -112,6 +110,14 @@
|
|||
|
||||
}).on('pagebeforeshow', "#tvPeoplePage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#tvPeoplePage", function () {
|
||||
|
|
|
@ -80,8 +80,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
|
@ -183,6 +181,14 @@
|
|||
|
||||
}).on('pagebeforeshow', "#tvShowsPage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#tvShowsPage", function () {
|
||||
|
|
|
@ -61,8 +61,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
query.Limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
$('.radioSortBy', this).on('click', function () {
|
||||
query.SortBy = this.getAttribute('data-sortby');
|
||||
query.StartIndex = 0;
|
||||
|
@ -94,6 +92,14 @@
|
|||
|
||||
}).on('pagebeforeshow', "#tvStudiosPage", function () {
|
||||
|
||||
var limit = LibraryBrowser.getDefaultPageSize();
|
||||
|
||||
// If the default page size has changed, the start index will have to be reset
|
||||
if (limit != query.Limit) {
|
||||
query.Limit = limit;
|
||||
query.StartIndex = 0;
|
||||
}
|
||||
|
||||
reloadItems(this);
|
||||
|
||||
}).on('pageshow', "#tvStudiosPage", function () {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue