Merge pull request #2051 from ONLYOFFICE/fix/refactoringLocks
Refactoring locks
This commit is contained in:
commit
50bf470a63
|
@ -234,7 +234,7 @@ define([
|
|||
Common.NotificationCenter.on('document:ready', function () {
|
||||
if ( config.isEdit ) {
|
||||
var maincontroller = webapp.getController('Main');
|
||||
if (maincontroller.api.asc_isReadOnly && maincontroller.api.asc_isReadOnly()) {
|
||||
if (maincontroller.api.asc_getLocalRestrictions && Asc.c_oAscLocalRestrictionType.None !== maincontroller.api.asc_getLocalRestrictions()) {
|
||||
maincontroller.warningDocumentIsLocked();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -979,7 +979,7 @@ Common.Utils.warningDocumentIsLocked = function (opts) {
|
|||
callback: function(btn){
|
||||
if (btn == 'edit') {
|
||||
if ( opts.disablefunc ) opts.disablefunc(false);
|
||||
app.getController('Main').api.asc_setIsReadOnly(false);
|
||||
app.getController('Main').api.asc_setLocalRestrictions(Asc.c_oAscLocalRestrictionType.None);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue