Node.js based forum software built for the modern web
show success alert + rebuild msg when ordering plugins
Andrew Rodrigues1c09094011b6
diff --git a/public/language/en-GB/admin/extend/plugins.json b/public/language/en-GB/admin/extend/plugins.jsonindex 05f7df4ecb..005d9044ae 100644--- a/public/language/en-GB/admin/extend/plugins.json+++ b/public/language/en-GB/admin/extend/plugins.json@@ -44,6 +44,8 @@"alert.package-manager-unreachable": "<p>NodeBB could not reach the package manager, an upgrade is not suggested at this time.</p>","alert.incompatible": "<p>Your version of NodeBB (v%1) is only cleared to upgrade to v%2 of this plugin. Please update your NodeBB if you wish to install a newer version of this plugin.</p>","alert.possibly-incompatible": "<div class=\"alert alert-warning\"><p><strong>No Compatibility Information Found</strong></p><p>This plugin did not specify a specific version for installation given your NodeBB version. Full compatibility cannot be guaranteed, and may cause your NodeBB to no longer start properly.</p></div><p>In the event that NodeBB cannot boot properly:</p><pre><code>$ ./nodebb reset plugin=\"%1\"</code></pre><p>Continue installation of latest version of this plugin?</p>",+ "alert.reorder": "Plugins Re-ordered",+ "alert.reorder-success": "Please rebuild and restart your NodeBB to fully complete the process.","license.title": "Plugin License Information","license.intro": "The plugin <strong>%1</strong> is licensed under the %2. Please read and understand the license terms prior to activating this plugin.",diff --git a/public/src/admin/extend/plugins.js b/public/src/admin/extend/plugins.jsindex aa0bac657b..a7dd240e04 100644--- a/public/src/admin/extend/plugins.js+++ b/public/src/admin/extend/plugins.js@@ -182,6 +182,19 @@ define('admin/extend/plugins', ['jqueryui', 'translator', 'benchpress'], functioreturn app.alertError(err.message);}$('#order-active-plugins-modal').modal('hide');++ app.alert({+ alert_id: 'plugin_reordered',+ title: '[[admin/extend/plugins:alert.reorder]]',+ message: '[[admin/extend/plugins:alert.reorder-success]]',+ type: 'success',+ timeout: 5000,+ clickfn: function () {+ require(['admin/modules/instance'], function (instance) {+ instance.rebuildAndRestart();+ });+ },+ });});});