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: ""
|
TargetSystems: ""
|
||||||
};
|
};
|
||||||
|
|
||||||
function reloadList() {
|
function reloadList(page) {
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
|
@ -14,15 +14,14 @@
|
||||||
var promise2 = ApiClient.getInstalledPlugins();
|
var promise2 = ApiClient.getInstalledPlugins();
|
||||||
|
|
||||||
$.when(promise1, promise2).done(function (response1, response2) {
|
$.when(promise1, promise2).done(function (response1, response2) {
|
||||||
populateList(response1[0], response2[0]);
|
populateList(page, response1[0], response2[0]);
|
||||||
});
|
});
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
}
|
}
|
||||||
|
|
||||||
function populateList(availablePlugins, installedPlugins) {
|
function populateList(page, availablePlugins, installedPlugins) {
|
||||||
|
|
||||||
var page = $($.mobile.activePage);
|
|
||||||
availablePlugins = availablePlugins.filter(function (p) {
|
availablePlugins = availablePlugins.filter(function (p) {
|
||||||
return p.type == "UserInstalled";
|
return p.type == "UserInstalled";
|
||||||
}).sort(function (a, b) {
|
}).sort(function (a, b) {
|
||||||
|
@ -82,7 +81,6 @@
|
||||||
|
|
||||||
var page = this;
|
var page = this;
|
||||||
|
|
||||||
|
|
||||||
$('.chkStandardFilter', this).on('change', function () {
|
$('.chkStandardFilter', this).on('change', function () {
|
||||||
|
|
||||||
var filterName = this.getAttribute('data-filter');
|
var filterName = this.getAttribute('data-filter');
|
||||||
|
@ -96,25 +94,23 @@
|
||||||
|
|
||||||
query.TargetSystems = filters;
|
query.TargetSystems = filters;
|
||||||
|
|
||||||
reloadList();
|
reloadList(page);
|
||||||
});
|
});
|
||||||
|
|
||||||
$('.chkPremiumFilter', this).on('change', function () {
|
$('.chkPremiumFilter', this).on('change', function () {
|
||||||
|
|
||||||
var filterName = this.getAttribute('data-filter');
|
|
||||||
|
|
||||||
if (this.checked) {
|
if (this.checked) {
|
||||||
query.IsPremium = true;
|
query.IsPremium = true;
|
||||||
} else {
|
} else {
|
||||||
query.IsPremium = false;
|
query.IsPremium = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
reloadList();
|
reloadList(page);
|
||||||
});
|
});
|
||||||
|
|
||||||
}).on('pageshow', "#pluginCatalogPage", function () {
|
}).on('pageshow', "#pluginCatalogPage", function () {
|
||||||
|
|
||||||
reloadList();
|
reloadList(this);
|
||||||
|
|
||||||
// Reset form values using the last used query
|
// Reset form values using the last used query
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue