From 1c09094011b64e37a164d29544e1e00d8c4697cc Mon Sep 17 00:00:00 2001 From: Andrew Rodrigues Date: Mon, 23 Apr 2018 17:18:31 -0400 Subject: [PATCH] show success alert + rebuild msg when ordering plugins --- public/language/en-GB/admin/extend/plugins.json | 2 ++ public/src/admin/extend/plugins.js | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/public/language/en-GB/admin/extend/plugins.json b/public/language/en-GB/admin/extend/plugins.json index 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": "

NodeBB could not reach the package manager, an upgrade is not suggested at this time.

", "alert.incompatible": "

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.

", "alert.possibly-incompatible": "

No Compatibility Information Found

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.

In the event that NodeBB cannot boot properly:

$ ./nodebb reset plugin=\"%1\"

Continue installation of latest version of this plugin?

", + "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 %1 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.js index 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'], functio return 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(); + }); + }, + }); }); });