|
|
@ -62,6 +62,14 @@ define([
|
|
|
|
Cryptpad: Cryptpad,
|
|
|
|
Cryptpad: Cryptpad,
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var emitResize = APP.emitResize = function () {
|
|
|
|
|
|
|
|
var cw = $('#pad-iframe')[0].contentWindow;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var evt = cw.document.createEvent('UIEvents');
|
|
|
|
|
|
|
|
evt.initUIEvent('resize', true, false, cw, 0);
|
|
|
|
|
|
|
|
cw.dispatchEvent(evt);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
var toolbar;
|
|
|
|
var toolbar;
|
|
|
|
|
|
|
|
|
|
|
|
var isNotMagicLine = function (el) {
|
|
|
|
var isNotMagicLine = function (el) {
|
|
|
@ -630,11 +638,6 @@ define([
|
|
|
|
if (!APP.isMaximized) {
|
|
|
|
if (!APP.isMaximized) {
|
|
|
|
editor.execCommand('maximize');
|
|
|
|
editor.execCommand('maximize');
|
|
|
|
APP.isMaximized = true;
|
|
|
|
APP.isMaximized = true;
|
|
|
|
// We have to call it 3 times in Safari in order to have the editor fully maximized -_-
|
|
|
|
|
|
|
|
if ((''+window.navigator.vendor).indexOf('Apple') !== -1) {
|
|
|
|
|
|
|
|
editor.execCommand('maximize');
|
|
|
|
|
|
|
|
editor.execCommand('maximize');
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
module.patchText = TextPatcher.create({
|
|
|
|
module.patchText = TextPatcher.create({
|
|
|
@ -661,7 +664,8 @@ define([
|
|
|
|
console.log("Unlocking editor");
|
|
|
|
console.log("Unlocking editor");
|
|
|
|
setEditable(true);
|
|
|
|
setEditable(true);
|
|
|
|
initializing = false;
|
|
|
|
initializing = false;
|
|
|
|
Cryptpad.removeLoadingScreen();
|
|
|
|
Cryptpad.removeLoadingScreen(emitResize);
|
|
|
|
|
|
|
|
|
|
|
|
// Update the toolbar list:
|
|
|
|
// Update the toolbar list:
|
|
|
|
// Add the current user in the metadata if he has edit rights
|
|
|
|
// Add the current user in the metadata if he has edit rights
|
|
|
|
if (readOnly) { return; }
|
|
|
|
if (readOnly) { return; }
|
|
|
|