Refactoring locks
This commit is contained in:
parent
6656f45b04
commit
a715c720ca
|
@ -234,7 +234,7 @@ define([
|
||||||
Common.NotificationCenter.on('document:ready', function () {
|
Common.NotificationCenter.on('document:ready', function () {
|
||||||
if ( config.isEdit ) {
|
if ( config.isEdit ) {
|
||||||
var maincontroller = webapp.getController('Main');
|
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();
|
maincontroller.warningDocumentIsLocked();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -979,7 +979,7 @@ Common.Utils.warningDocumentIsLocked = function (opts) {
|
||||||
callback: function(btn){
|
callback: function(btn){
|
||||||
if (btn == 'edit') {
|
if (btn == 'edit') {
|
||||||
if ( opts.disablefunc ) opts.disablefunc(false);
|
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