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

@@ -42,6 +42,11 @@ define([
secret.keys = secret.key;
}
var onConnectError = function (info) {
module.spinner.hide();
Cryptpad.alert(Messages.websocketError);
};
var andThen = function (CMeditor) {
var CodeMirror = module.CodeMirror = CMeditor;
CodeMirror.modeURL = "/bower_components/codemirror/mode/%N/%N.js";
@@ -687,6 +692,8 @@ define([
}
};
var onError = config.onError = onConnectError;
var realtime = module.realtime = Realtime.start(config);
editor.on('change', onLocal);
@@ -699,6 +706,11 @@ define([
// TODO handle error
andThen(CM);
});
Cryptpad.onError(function (info) {
if (info && info.type === "store") {
onConnectError();
}
});
};
var first = function () {