Merge branch 'fileManager' of github.com:xwiki-labs/cryptpad into test-filemanager

This commit is contained in:
ansuz
2016-12-12 18:03:00 +01:00
25 changed files with 4418 additions and 106 deletions

View File

@@ -77,6 +77,11 @@ define([
return hj;
};
var onConnectError = function (info) {
module.spinner.hide();
Cryptpad.alert(Messages.websocketError);
};
var andThen = function (Ckeditor) {
var secret = Cryptpad.getSecrets();
var readOnly = secret.keys && !secret.keys.editKeyStr;
@@ -691,6 +696,8 @@ define([
}
};
var onError = realtimeOptions.onError = onConnectError;
var onLocal = realtimeOptions.onLocal = function () {
if (initializing) { return; }
if (readOnly) { return; }
@@ -736,6 +743,11 @@ define([
// TODO handle error
andThen(Ckeditor);
});
Cryptpad.onError(function (info) {
if (info && info.type === "store") {
onConnectError();
}
});
};
var first = function () {