related to #1651 plugin activation redirects to plugin page with deactivated filter

This commit is contained in:
Matthieu Leproux
2022-07-12 12:07:45 +02:00
parent d0e66615f6
commit 5681ef527e
3 changed files with 9 additions and 3 deletions
+2 -1
View File
@@ -45,7 +45,8 @@ if (isset($_GET['installstatus']))
$activate_url = get_root_url().'admin.php?page=plugins'
. '&plugin=' . $_GET['plugin_id']
. '&pwg_token=' . get_pwg_token()
. '&action=activate';
. '&action=activate'
. '&filter=deactivated';
$page['infos'][] = l10n('Plugin has been successfully copied');
$page['infos'][] = '<a href="'. $activate_url . '">' . l10n('Activate it now') . '</a>';
@@ -497,8 +497,6 @@ function performPluginDeactivate(id) {
/* group action */
jQuery(document).ready(function () {
jQuery(".pluginBox").each(function (index) {
$("label[for='seeActive'] .filter-badge").html(nb_plugin.active);
$("label[for='seeInactive'] .filter-badge").html(nb_plugin.inactive);
@@ -730,6 +728,10 @@ jQuery(document).ready(function () {
/* Show Inactive plugins or button to show them*/
jQuery(".showInactivePlugins button").on("click", showInactivePlugins);
if (plugin_filter == "deactivated") {
jQuery(".filterLabel[for='seeInactive']").trigger("click");
}
});
$(document).mouseup(function (e) {
@@ -41,6 +41,9 @@ const plugin_found = '{'%s plugin found'|@translate|@escape:'javascript'}';
const isWebmaster = {$isWebmaster};
const show_details = {if $show_details} true {else} false {/if};
let searchParams = new URLSearchParams(window.location.search);
let plugin_filter = searchParams.get('filter');
{/footer_script}
{if isset($plugins)}