mirror of https://github.com/xwiki-labs/cryptpad
Fix OO error modal in switch to read-only
This commit is contained in:
parent
b732666ed0
commit
b709b7a31b
|
@ -1375,12 +1375,11 @@ define([
|
|||
return;
|
||||
}
|
||||
|
||||
if (lock) {
|
||||
getEditor().setViewModeDisconnect();
|
||||
} else if (readOnly) {
|
||||
if (lock || readOnly) {
|
||||
try {
|
||||
getEditor().asc_setRestriction(true);
|
||||
} catch (e) {}
|
||||
//getEditor().setViewModeDisconnect(); // can't be used anymore, display an OO error popup
|
||||
} else {
|
||||
setEditable(true);
|
||||
deleteOfflineLocks();
|
||||
|
@ -1400,7 +1399,6 @@ define([
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if (isLockedModal.modal && force) {
|
||||
isLockedModal.modal.closeModal();
|
||||
delete isLockedModal.modal;
|
||||
|
@ -1424,7 +1422,7 @@ define([
|
|||
} catch (e) {}
|
||||
}
|
||||
|
||||
if (APP.migrate && !readOnly) {
|
||||
if (lock && !readOnly) {
|
||||
onMigrateRdy.fire();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue