mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
pass page instead of using $.mobile.activePage
This commit is contained in:
parent
5bc5d6a4e3
commit
d2dab35770
1 changed files with 87 additions and 91 deletions
|
@ -6,7 +6,7 @@
|
|||
TargetSystems: ""
|
||||
};
|
||||
|
||||
function reloadList() {
|
||||
function reloadList(page) {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
|
@ -14,15 +14,14 @@
|
|||
var promise2 = ApiClient.getInstalledPlugins();
|
||||
|
||||
$.when(promise1, promise2).done(function (response1, response2) {
|
||||
populateList(response1[0], response2[0]);
|
||||
populateList(page, response1[0], response2[0]);
|
||||
});
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
||||
function populateList(availablePlugins, installedPlugins) {
|
||||
function populateList(page, availablePlugins, installedPlugins) {
|
||||
|
||||
var page = $($.mobile.activePage);
|
||||
availablePlugins = availablePlugins.filter(function (p) {
|
||||
return p.type == "UserInstalled";
|
||||
}).sort(function (a, b) {
|
||||
|
@ -82,7 +81,6 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
|
||||
$('.chkStandardFilter', this).on('change', function () {
|
||||
|
||||
var filterName = this.getAttribute('data-filter');
|
||||
|
@ -96,25 +94,23 @@
|
|||
|
||||
query.TargetSystems = filters;
|
||||
|
||||
reloadList();
|
||||
reloadList(page);
|
||||
});
|
||||
|
||||
$('.chkPremiumFilter', this).on('change', function () {
|
||||
|
||||
var filterName = this.getAttribute('data-filter');
|
||||
|
||||
if (this.checked) {
|
||||
query.IsPremium = true;
|
||||
}else {
|
||||
} else {
|
||||
query.IsPremium = false;
|
||||
}
|
||||
|
||||
reloadList();
|
||||
reloadList(page);
|
||||
});
|
||||
|
||||
}).on('pageshow', "#pluginCatalogPage", function () {
|
||||
|
||||
reloadList();
|
||||
reloadList(this);
|
||||
|
||||
// Reset form values using the last used query
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue