[desktop] debug for locked file

This commit is contained in:
Maxim Kadushkin 2020-04-24 12:00:28 +03:00
parent 6892321fb5
commit 37094765cb
2 changed files with 7 additions and 4 deletions

View file

@ -200,6 +200,13 @@ define([
$('.toolbar').addClass('editor-native-color');
});
Common.NotificationCenter.on('document:ready', function () {
var maincontroller = webapp.getController('Main');
if ( maincontroller.api.asc_isReadOnly && maincontroller.api.asc_isReadOnly() ) {
maincontroller.warningDocumentIsLocked();
}
});
Common.NotificationCenter.on('action:undocking', function (opts) {
native.execCommand('editor:event', JSON.stringify({action:'undocking', state: opts == 'dock' ? 'dock' : 'undock'}));
});

View file

@ -1058,10 +1058,6 @@ define([
Common.NotificationCenter.trigger('document:ready', 'main');
me.applyLicense();
if ( me.api.asc_isReadOnly() ) {
me.warningDocumentIsLocked();
}
}
}, 50);
} else {