mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-02-01 03:12:42 +01:00
tell installer if old etherpad needs updating during plugin install
This commit is contained in:
parent
831151cfba
commit
aca745ddf6
2 changed files with 4 additions and 1 deletions
|
@ -83,7 +83,7 @@ exports.socketio = function (hook_name, args, cb) {
|
||||||
socket.on("install", function (plugin_name) {
|
socket.on("install", function (plugin_name) {
|
||||||
installer.install(plugin_name, function (er) {
|
installer.install(plugin_name, function (er) {
|
||||||
if(er) console.warn(er)
|
if(er) console.warn(er)
|
||||||
socket.emit("finished:install", {plugin: plugin_name, error: er? er.message : null});
|
socket.emit("finished:install", {plugin: plugin_name, code: er? er.code : null, error: er? er.message : null});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -225,6 +225,9 @@ $(document).ready(function () {
|
||||||
|
|
||||||
socket.on('finished:install', function(data) {
|
socket.on('finished:install', function(data) {
|
||||||
if(data.error) {
|
if(data.error) {
|
||||||
|
if(data.code === "EPEERINVALID"){
|
||||||
|
alert("This plugin requires that you update Etherpad so it can operate in it's true glory");
|
||||||
|
}
|
||||||
alert('An error occured while installing '+data.plugin+' \n'+data.error)
|
alert('An error occured while installing '+data.plugin+' \n'+data.error)
|
||||||
$('#installed-plugins .'+data.plugin).remove()
|
$('#installed-plugins .'+data.plugin).remove()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue