diff --git a/www/common/onlyoffice/inner.js b/www/common/onlyoffice/inner.js index 53a3c7e25..bb81114d9 100644 --- a/www/common/onlyoffice/inner.js +++ b/www/common/onlyoffice/inner.js @@ -3455,7 +3455,6 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null APP.startNew = isNew; var version = OOCurrentVersion.currentVersion + '/'; - console.log("v." + OOCurrentVersion.currentVersion); var msg; // Old version detected: use the old OO and start the migration if we can if (privateData.ooForceVersion) { @@ -3542,6 +3541,22 @@ Uncaught TypeError: Cannot read property 'calculatedType' of null } readOnly = true; } + } else if (content && content.version <= 8) { + version = 'v8/'; + APP.migrate = true; + // Registedred ~~users~~ editors can start the migration + if (common.isLoggedIn() && !readOnly) { + content.migration = true; + APP.onLocal(); + } else { + msg = h('div.alert.alert-warning.cp-burn-after-reading', Messages.oo_sheetMigration_anonymousEditor); + if (APP.helpMenu) { + $(APP.helpMenu.menu).after(msg); + } else { + $('#cp-app-oo-editor').prepend(msg); + } + readOnly = true; + } } // If the sheet is locked by an offline user, remove it