|
|
@ -59,6 +59,11 @@ define([
|
|
|
|
|
|
|
|
|
|
|
|
var presentMode = Slide.isPresentURL();
|
|
|
|
var presentMode = Slide.isPresentURL();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var onConnectError = function (info) {
|
|
|
|
|
|
|
|
module.spinner.hide();
|
|
|
|
|
|
|
|
Cryptpad.alert(Messages.websocketError);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var andThen = function (CMeditor) {
|
|
|
|
var andThen = function (CMeditor) {
|
|
|
|
var CodeMirror = module.CodeMirror = CMeditor;
|
|
|
|
var CodeMirror = module.CodeMirror = CMeditor;
|
|
|
|
CodeMirror.modeURL = "/bower_components/codemirror/mode/%N/%N.js";
|
|
|
|
CodeMirror.modeURL = "/bower_components/codemirror/mode/%N/%N.js";
|
|
|
@ -786,10 +791,7 @@ define([
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var onError = config.onError = function (info) {
|
|
|
|
var onError = config.onError = onConnectError;
|
|
|
|
module.spinner.hide();
|
|
|
|
|
|
|
|
Cryptpad.alert(Messages.websocketError);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var realtime = module.realtime = Realtime.start(config);
|
|
|
|
var realtime = module.realtime = Realtime.start(config);
|
|
|
|
|
|
|
|
|
|
|
@ -803,6 +805,11 @@ define([
|
|
|
|
// TODO handle error
|
|
|
|
// TODO handle error
|
|
|
|
andThen(CM);
|
|
|
|
andThen(CM);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
Cryptpad.onError(function (info) {
|
|
|
|
|
|
|
|
if (info && info.type === "store") {
|
|
|
|
|
|
|
|
onConnectError();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var first = function () {
|
|
|
|
var first = function () {
|
|
|
|