Fix view mode in sheets

pull/1/head
yflory 5 years ago
parent cb5ec4c3d4
commit 0036ca8861

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

Loading…
Cancel
Save