notify user on disconnect
also disable inputs
This commit is contained in:
@@ -94,9 +94,7 @@ define([
|
|||||||
|
|
||||||
var setEditable = function (bool) {
|
var setEditable = function (bool) {
|
||||||
module.isEditable = bool;
|
module.isEditable = bool;
|
||||||
items.forEach(function ($item) {
|
$('input, textarea').attr('disabled', !bool);
|
||||||
$item.attr('disabled', !bool);
|
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
var coluid = Uid('x');
|
var coluid = Uid('x');
|
||||||
@@ -477,5 +475,9 @@ define([
|
|||||||
realtime: realtime,
|
realtime: realtime,
|
||||||
logging: true,
|
logging: true,
|
||||||
});
|
});
|
||||||
}).on('ready', ready);
|
}).on('ready', ready)
|
||||||
|
.on('disconnect', function () {
|
||||||
|
setEditable(false);
|
||||||
|
Cryptpad.alert("Network connection lost!");
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user