Fix view mode in sheets

This commit is contained in:
yflory 2020-05-12 15:27:00 +02:00
parent cb5ec4c3d4
commit 0036ca8861
1 changed files with 10 additions and 2 deletions

View File

@ -930,7 +930,7 @@ if (hasDrawings) {
"id": String(myOOId), //"c0c3bf82-20d7-4663-bf6d-7fa39c598b1d",
"firstname": metadataMgr.getUserData().name || Messages.anonymous,
},
"mode": lock ? "view" : "edit",
"mode": "edit",
"lang": (navigator.language || navigator.userLanguage || '').slice(0,2)
},
"events": {
@ -987,7 +987,15 @@ if (hasDrawings) {
APP.onLocal();
handleNewLocks(oldLocks, content.locks || {});
// Allow edition
if (lock) {
setTimeout(function () {
setEditable(true);
getEditor().setViewModeDisconnect();
}, 5000);
} else {
setEditable(true);
}
if (isLockedModal.modal && force) {
isLockedModal.modal.closeModal();