fixes #1509 if no plugins activated : show all plugins

This commit is contained in:
Matthieu Leproux
2021-10-12 11:16:07 +02:00
parent c3670b80a2
commit 390f23d275
2 changed files with 11 additions and 6 deletions
+10 -5
View File
@@ -307,11 +307,16 @@ $(document).ready(function () {
/* Plugin Filters */
// Set filter on Active on load
$(".pluginMiniBox").each(function () {
if (!$(this).hasClass("plugin-active")) {
$(this).hide();
}
})
if (nb_plugin.active > 0) {
$(".pluginMiniBox").each(function () {
if (!$(this).hasClass("plugin-active")) {
$(this).hide();
}
})
} else {
$(".pluginMiniBox").show();
}
$("#seeAll").on("change", function () {
console.log("All");
@@ -223,7 +223,7 @@ jQuery(".pluginMiniBox").each(function(index){
{counter start=0 assign=i} {* <!-- counter for 'deactivate all' link --> *}
<div class="pluginTypeFilter">
<input type="radio" name="p-filter" class="filter" id="seeAll"><label for="seeAll">{'All'|@translate}<span class="filter-badge">X</span></label><input type="radio" name="p-filter" class="filter" id="seeActive" checked><label class="filterLabel" for="seeActive">{'Activated'|@translate}<span class="filter-badge">X</span></label><input type="radio" name="p-filter" class="filter" id="seeInactive"><label class="filterLabel" for="seeInactive">{'Deactivated'|@translate}<span class="filter-badge">X</span></label><input type="radio" name="p-filter" class="filter" id="seeOther"><label class="filterLabel" for="seeOther">{'Other'|@translate}<span class="filter-badge">X</span></label>
<input type="radio" name="p-filter" class="filter" id="seeAll" {if $count_types_plugins["active"] <= 0} checked {/if}><label for="seeAll">{'All'|@translate}<span class="filter-badge">X</span></label><input type="radio" name="p-filter" class="filter" id="seeActive" {if $count_types_plugins["active"] > 0} checked {/if}><label class="filterLabel" for="seeActive">{'Activated'|@translate}<span class="filter-badge">X</span></label><input type="radio" name="p-filter" class="filter" id="seeInactive"><label class="filterLabel" for="seeInactive">{'Deactivated'|@translate}<span class="filter-badge">X</span></label><input type="radio" name="p-filter" class="filter" id="seeOther"><label class="filterLabel" for="seeOther">{'Other'|@translate}<span class="filter-badge">X</span></label>
</div>
<div class="pluginFilter">