Enable reconnecting websocket in code pad
This commit is contained in:
parent
6315915b5d
commit
c16e8d603b
@ -703,9 +703,22 @@ define([
|
|||||||
var onAbort = config.onAbort = function (info) {
|
var onAbort = config.onAbort = function (info) {
|
||||||
// inform of network disconnect
|
// inform of network disconnect
|
||||||
setEditable(false);
|
setEditable(false);
|
||||||
|
toolbar.failed();
|
||||||
Cryptpad.alert(Messages.disconnectAlert);
|
Cryptpad.alert(Messages.disconnectAlert);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
var onConnectionChange = config.onConnectionChange = function (info) {
|
||||||
|
setEditable(info.state);
|
||||||
|
toolbar.failed();
|
||||||
|
if (info.state) {
|
||||||
|
initializing = true;
|
||||||
|
toolbar.reconnecting(info.myId);
|
||||||
|
Cryptpad.findOKButton().click();
|
||||||
|
} else {
|
||||||
|
Cryptpad.alert(Messages.disconnectAlert);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
var realtime = module.realtime = Realtime.start(config);
|
var realtime = module.realtime = Realtime.start(config);
|
||||||
|
|
||||||
editor.on('change', onLocal);
|
editor.on('change', onLocal);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user