mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-22 00:16:15 -04:00
added deletePad API function
This commit is contained in:
parent
783c192726
commit
d2c502e2be
9 changed files with 134 additions and 7 deletions
|
@ -251,10 +251,11 @@ function handshake()
|
|||
//This handles every Message after the clientVars
|
||||
else
|
||||
{
|
||||
//this message advices the client to disconnect
|
||||
if (obj.disconnect)
|
||||
{
|
||||
padconnectionstatus.disconnected(obj.disconnect);
|
||||
socket.disconnect();
|
||||
padconnectionstatus.disconnected("userdup");
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
|
|
@ -46,15 +46,19 @@ var padconnectionstatus = (function()
|
|||
},
|
||||
disconnected: function(msg)
|
||||
{
|
||||
if(status.what == "disconnected")
|
||||
return;
|
||||
|
||||
status = {
|
||||
what: 'disconnected',
|
||||
why: msg
|
||||
};
|
||||
var k = String(msg).toLowerCase(); // known reason why
|
||||
if (!(k == 'userdup' || k == 'looping' || k == 'slowcommit' || k == 'initsocketfail' || k == 'unauth'))
|
||||
if (!(k == 'userdup' || k == 'deleted' || k == 'looping' || k == 'slowcommit' || k == 'initsocketfail' || k == 'unauth'))
|
||||
{
|
||||
k = 'unknown';
|
||||
}
|
||||
|
||||
var cls = 'modaldialog cboxdisconnected cboxdisconnected_' + k;
|
||||
$("#connectionbox").get(0).className = cls;
|
||||
padmodals.showModal("#connectionbox", 500);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue