disable input field when disconnected

This commit is contained in:
ansuz
2017-08-03 14:12:07 +02:00
parent aba4e34e7f
commit 2ce341fed6
4 changed files with 26 additions and 6 deletions

View File

@@ -39,12 +39,12 @@ define([
toolbar.$rightside.html(''); // Remove the drawer if we don't use it to hide the toolbar
Cryptpad.getProxy().on('disconnect', function () {
// TODO readonly
Cryptpad.alert(Messages.common_connectionLost, undefined, true);
Cryptpad.enableMessaging(false);
});
Cryptpad.getProxy().on('reconnect', function () {
// TODO cancel readonly
Cryptpad.findOKButton().click();
Cryptpad.enableMessaging(true);
});
Cryptpad.initMessaging(Cryptpad, $list, $messages);