fixed #1351 -- themes and plugins no longer auto-restart the server

v1.18.x
Julian Lam 11 years ago
parent 9dbe479d11
commit 8cb2b9b97a

@ -1,3 +1,6 @@
"use strict";
/* global define, app, socket */
define(function() {
var Plugins = {
init: function() {
@ -19,10 +22,13 @@ define(function() {
app.alert({
alert_id: 'plugin_toggled',
title: 'Plugin ' + (status.active ? 'Enabled' : 'Disabled'),
message: 'Restarting your NodeBB <i class="fa fa-refresh fa-spin"></i>',
type: 'warning',
timeout: 5000
})
message: 'Please restart your NodeBB to fully ' + (status.active ? 'activate' : 'deactivate') + ' this plugin',
type: 'info',
timeout: 5000,
clickfn: function() {
socket.emit('admin.restart');
}
});
});
} else {
pluginsList.append('<li><p><i>No plugins found.</i></p></li>');

@ -39,10 +39,13 @@ define(['forum/admin/settings'], function(Settings) {
app.alert({
alert_id: 'admin:theme',
type: 'success',
type: 'info',
title: 'Theme Changed',
message: 'Restarting your NodeBB <i class="fa fa-refresh fa-spin"></i>',
timeout: 3500
message: 'Please restart your NodeBB to fully activate this theme',
timeout: 5000,
clickfn: function() {
socket.emit('admin.restart');
}
});
});
}
@ -251,7 +254,7 @@ define(['forum/admin/settings'], function(Settings) {
timeout: 2500
});
}
});
});
}

@ -79,7 +79,6 @@ SocketAdmin.themes.set = function(socket, data, callback) {
widgets.reset(function(err) {
meta.themes.set(data, function() {
callback();
meta.restart();
});
});
};
@ -87,7 +86,6 @@ SocketAdmin.themes.set = function(socket, data, callback) {
SocketAdmin.plugins.toggle = function(socket, plugin_id) {
plugins.toggleActive(plugin_id, function(status) {
socket.emit('admin.plugins.toggle', status);
meta.restart();
});
};

Loading…
Cancel
Save