fixed #1807 no more latency on the plugin manager

This commit is contained in:
Matthieu Leproux
2022-11-23 15:58:11 +01:00
parent 06c0164bdc
commit 61aad82acd
+22 -25
View File
@@ -455,6 +455,7 @@ function actualizeFilter() {
$("label[for='seeInactive'] .filter-badge").html(nb_plugin.inactive); $("label[for='seeInactive'] .filter-badge").html(nb_plugin.inactive);
$("label[for='seeOther'] .filter-badge").html(nb_plugin.other); $("label[for='seeOther'] .filter-badge").html(nb_plugin.other);
$(".filterLabel").show(); $(".filterLabel").show();
$(".pluginMiniBox").each(function () { $(".pluginMiniBox").each(function () {
if (nb_plugin.active == 0) { if (nb_plugin.active == 0) {
$("label[for='seeActive']").hide(); $("label[for='seeActive']").hide();
@@ -503,38 +504,34 @@ function performPluginDeactivate(id) {
/* group action */ /* group action */
jQuery(document).ready(function () { jQuery(document).ready(function () {
jQuery(".pluginBox").each(function (index) { $("label[for='seeActive'] .filter-badge").html(nb_plugin.active);
$("label[for='seeActive'] .filter-badge").html(nb_plugin.active); $("label[for='seeInactive'] .filter-badge").html(nb_plugin.inactive);
$("label[for='seeInactive'] .filter-badge").html(nb_plugin.inactive); $("label[for='seeOther'] .filter-badge").html(nb_plugin.other);
$("label[for='seeOther'] .filter-badge").html(nb_plugin.other); $(".filterLabel").show();
$(".filterLabel").show(); $(".pluginBox").each(function () {
$(".pluginMiniBox").each(function () { if (nb_plugin.active == 0) {
if (nb_plugin.active == 0) { $("label[for='seeActive']").hide();
$("label[for='seeActive']").hide(); if ($("#seeActive").is(":checked")) {
if ($("#seeActive").is(":checked")) { $("#seeAll").trigger("click");
$("#seeAll").trigger("click");
}
} }
if (nb_plugin.inactive == 0) { }
$("label[for='seeInactive']").hide(); if (nb_plugin.inactive == 0) {
if ($("#seeInactive").is(":checked")) { $("label[for='seeInactive']").hide();
$("#seeAll").trigger("click"); if ($("#seeInactive").is(":checked")) {
} $("#seeAll").trigger("click");
} }
if (nb_plugin.other == 0) { }
$("label[for='seeOther']").hide(); if (nb_plugin.other == 0) {
if ($("#seeOther").is(":checked")) { $("label[for='seeOther']").hide();
$("#seeAll").trigger("click"); if ($("#seeOther").is(":checked")) {
} $("#seeAll").trigger("click");
} }
}); }
});
jQuery(".pluginBox").each(function (index) {
let myplugin = jQuery(this); let myplugin = jQuery(this);
myplugin.find(".showOptions").click(function () { myplugin.find(".showOptions").click(function () {
myplugin.find(".PluginOptionsBlock").toggle(); myplugin.find(".PluginOptionsBlock").toggle();
}); });
}); });