diff --git a/admin/plugins_new.php b/admin/plugins_new.php index 9b8fb3f1c..10b3bfa6c 100644 --- a/admin/plugins_new.php +++ b/admin/plugins_new.php @@ -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'][] = '' . l10n('Activate it now') . ''; diff --git a/admin/themes/default/js/plugins_installated.js b/admin/themes/default/js/plugins_installated.js index 5ec601c1e..5bcb64fa9 100644 --- a/admin/themes/default/js/plugins_installated.js +++ b/admin/themes/default/js/plugins_installated.js @@ -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) { diff --git a/admin/themes/default/template/plugins_installed.tpl b/admin/themes/default/template/plugins_installed.tpl index a90c50ecd..1de0b8595 100644 --- a/admin/themes/default/template/plugins_installed.tpl +++ b/admin/themes/default/template/plugins_installed.tpl @@ -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)}