diff --git a/admin/plugins_installed.php b/admin/plugins_installed.php index fa76ad8a0..9defc87fb 100644 --- a/admin/plugins_installed.php +++ b/admin/plugins_installed.php @@ -160,11 +160,13 @@ if (count($missing_plugin_ids) > 0) { $tpl_plugins[] = array( 'NAME' => $plugin_id, + 'ID' => $plugin_id, 'VERSION' => $plugins->db_plugins_by_id[$plugin_id]['version'], 'DESC' => l10n('ERROR: THIS PLUGIN IS MISSING BUT IT IS INSTALLED! UNINSTALL IT NOW.'), 'U_ACTION' => sprintf($action_url, $plugin_id), 'STATE' => 'missing', ); + $count_types_plugins['missing']++; } $template->append('plugin_states', 'missing'); } diff --git a/admin/themes/default/js/plugins_installated.js b/admin/themes/default/js/plugins_installated.js index c06333527..fedc86a17 100644 --- a/admin/themes/default/js/plugins_installated.js +++ b/admin/themes/default/js/plugins_installated.js @@ -213,11 +213,16 @@ function uninstallPlugin(id) { success: function (data) { nb_plugin.other -=1; nb_plugin.all -=1; - actualizeFilter() + actualizeFilter(); + $("#"+id).remove(); }, error: function (e) { - console.log(e); - console.log("It didn't work"); + console.log(e); + console.log("It didn't work"); + $("#" + id + " .pluginNotif").stop(false, true); + $("#" + id + " .PluginActionError label span:first").html(plugin_action_error); + $("#" + id + " .PluginActionError").css("display", "flex"); + $("#" + id + " .PluginActionError").delay(1500).fadeOut(2500); } }) } @@ -264,7 +269,8 @@ $(document).ready(function () { if (!$(this).hasClass("plugin-active")) { $(this).hide(); } - }) + }); + $("#seeActive").trigger("click"); } else { $(".pluginMiniBox").show(); } @@ -405,7 +411,7 @@ $(document).ready(function () { let plugin_name = $(this).closest(".pluginContent").find(".pluginMiniBoxNameCell").html().trim(); let plugin_id = $(this).closest(".pluginContent").parent().attr("id"); $.confirm({ - title: restore_plugin_msg.replace('%s', plugin_name), + title: uninstall_plugin_msg.replace('%s', plugin_name), buttons: { confirm: { text: confirm_msg, diff --git a/admin/themes/default/template/plugins_installed.tpl b/admin/themes/default/template/plugins_installed.tpl index 862ce5453..8e9ac32d4 100644 --- a/admin/themes/default/template/plugins_installed.tpl +++ b/admin/themes/default/template/plugins_installed.tpl @@ -28,6 +28,7 @@ const cancel_msg = "{"No, I have changed my mind"|@translate}"; let delete_plugin_msg = '{'Are you sure you want to delete the plugin "%s"?'|@translate|@escape:'javascript'}'; let deleted_plugin_msg = '{'Plugin "%s" deleted!'|@translate|@escape:'javascript'}'; let restore_plugin_msg = '{'Are you sure you want to restore the plugin "%s"?'|@translate|@escape:'javascript'}'; +let uninstall_plugin_msg = '{'Are you sure you want to uninstall the plugin "%s"?'|@translate|@escape:'javascript'}'; const restore_tip_msg = "{'Restore default configuration. You will lose your plugin settings!'|@translate|@escape:'javascript'}"; const plugin_added_str = '{'Activated'|@translate|@escape:'javascript'}'; const plugin_deactivated_str = '{'Deactivated'|@translate|@escape:'javascript'}'; @@ -262,6 +263,8 @@ function actualizeFilter() { $("label[for='seeInactive'] .filter-badge").html(nb_plugin.inactive); $("label[for='seeOther'] .filter-badge").html(nb_plugin.other); + console.log(nb_plugin) + $(".filterLabel").show(); $(".pluginMiniBox").each(function () { if (nb_plugin.active == 0) { @@ -405,11 +408,11 @@ jQuery(".pluginMiniBox").each(function(index){ {/if} {elseif $plugin.STATE == 'missing'}
{elseif $plugin.STATE == 'merged'} {/if} @@ -442,7 +445,7 @@ jQuery(".pluginMiniBox").each(function(index){ {'Settings'|@translate} {/if} {elseif $plugin.STATE == 'missing'} - {'Uninstall'|@translate} + {'Uninstall'|@translate} {elseif $plugin.STATE == 'merged'} {'Delete'|@translate} {/if} diff --git a/language/en_UK/admin.lang.php b/language/en_UK/admin.lang.php index f51f64ecc..c1afaa4e2 100644 --- a/language/en_UK/admin.lang.php +++ b/language/en_UK/admin.lang.php @@ -1066,6 +1066,7 @@ $lang['Are you sure you want to delete the ratings of the user "%s"?'] = 'Are yo $lang['Are you sure you want to install the plugin "%s"?'] = 'Are you sure you want to install the plugin "%s"?'; $lang['Are you sure you want to delete the plugin "%s"?'] = 'Are you sure you want to delete the plugin "%s"?'; $lang['Are you sure you want to restore the plugin "%s"?'] = 'Are you sure you want to restore the plugin "%s"?'; +$lang['Are you sure you want to uninstall the plugin "%s"?'] = 'Are you sure you want to uninstall the plugin "%s"?'; $lang['Are you sure you want to delete all sizes?'] = 'Are you sure you want to delete all sizes?'; $lang['Are you sure you want to lock the gallery?'] = 'Are you sure you want to lock the gallery?'; $lang['Are you sure you want to unlock the gallery?'] = 'Are you sure you want to unlock the gallery?'; diff --git a/language/fr_FR/admin.lang.php b/language/fr_FR/admin.lang.php index 13ca45b97..0491a5ab4 100644 --- a/language/fr_FR/admin.lang.php +++ b/language/fr_FR/admin.lang.php @@ -1064,6 +1064,7 @@ $lang['Are you sure you want to delete the ratings of the user "%s"?'] = 'Êtes- $lang['Are you sure you want to install the plugin "%s"?'] = 'Êtes-vous sûr de vouloir installer le plugin "%s" ?'; $lang['Are you sure you want to delete the plugin "%s"?'] = 'Êtes-vous sûr de vouloir supprimer le plugin "%s" ?'; $lang['Are you sure you want to restore the plugin "%s"?'] = 'Êtes-vous sûr de vouloir restaurer le plugin "%s" ?'; +$lang['Are you sure you want to uninstall the plugin "%s"?'] = 'Êtes-vous sûr de vouloir désinstaller le plugin "%s" ?'; $lang['Are you sure you want to delete all sizes?'] = 'Êtes-vous sûr de vouloir supprimer toutes les tailles ?'; $lang['Are you sure you want to lock the gallery?'] = 'Êtes-vous sûr de vouloir verrouiller la galerie ?'; $lang['Are you sure you want to unlock the gallery?'] = 'Êtes-vous sûr de vouloir déverrouiller la galerie ?';