Fixed opening view mode.

This commit is contained in:
Julia Radzhabova 2017-12-05 17:40:52 +03:00
parent f3fb154676
commit 91fb911ba3
6 changed files with 9 additions and 7 deletions

View file

@ -1013,7 +1013,7 @@ define([
this.appOptions.forcesave = this.appOptions.canForcesave;
this.appOptions.canEditComments= this.appOptions.isOffline || !(typeof (this.editorConfig.customization) == 'object' && this.editorConfig.customization.commentAuthorOnly);
this.appOptions.trialMode = params.asc_getLicenseMode();
this.appOptions.canProtect = this.appOptions.isDesktopApp && this.api.asc_isSignaturesSupport();
this.appOptions.canProtect = this.appOptions.isEdit && this.appOptions.isDesktopApp && this.api.asc_isSignaturesSupport();
if ( this.appOptions.isLightVersion ) {
this.appOptions.canUseHistory =

View file

@ -280,7 +280,7 @@ define([
}
}
if (this.mode.isDesktopApp && this.mode.isOffline) {
if (this.mode.isEdit && this.mode.isDesktopApp && this.mode.isOffline) {
// this.$el.find('#fm-btn-back').hide();
this.panels['protect'] = (new DE.Views.FileMenuPanels.ProtectDoc({menu:this})).render();
this.panels['protect'].setMode(this.mode);

View file

@ -785,7 +785,7 @@ define([
this.appOptions.forcesave = this.appOptions.canForcesave;
this.appOptions.canEditComments= this.appOptions.isOffline || !(typeof (this.editorConfig.customization) == 'object' && this.editorConfig.customization.commentAuthorOnly);
this.appOptions.trialMode = params.asc_getLicenseMode();
this.appOptions.canProtect = this.appOptions.isDesktopApp && this.api.asc_isSignaturesSupport();
this.appOptions.canProtect = this.appOptions.isEdit && this.appOptions.isDesktopApp && this.api.asc_isSignaturesSupport();
this._state.licenseWarning = (licType===Asc.c_oLicenseResult.Connections) && this.appOptions.canEdit && this.editorConfig.mode !== 'view';

View file

@ -277,8 +277,10 @@ define([
if (this.mode.isDesktopApp && this.mode.isOffline) {
this.$el.find('#fm-btn-create, #fm-btn-back, #fm-btn-create+.devider').hide();
this.panels['protect'] = (new PE.Views.FileMenuPanels.ProtectDoc({menu:this})).render();
this.panels['protect'].setMode(this.mode);
if (this.mode.isEdit) {
this.panels['protect'] = (new PE.Views.FileMenuPanels.ProtectDoc({menu:this})).render();
this.panels['protect'].setMode(this.mode);
}
}
this.panels['help'].setLangConfig(this.mode.lang);

View file

@ -806,7 +806,7 @@ define([
this.appOptions.canChat = this.appOptions.canLicense && !this.appOptions.isOffline && !((typeof (this.editorConfig.customization) == 'object') && this.editorConfig.customization.chat===false);
this.appOptions.canRename = !!this.permissions.rename;
this.appOptions.trialMode = params.asc_getLicenseMode();
this.appOptions.canProtect = this.appOptions.isDesktopApp && this.api.asc_isSignaturesSupport();
this.appOptions.canProtect = this.appOptions.isEdit && this.appOptions.isDesktopApp && this.api.asc_isSignaturesSupport();
this.appOptions.canBranding = (licType === Asc.c_oLicenseResult.Success) && (typeof this.editorConfig.customization == 'object');
if (this.appOptions.canBranding)

View file

@ -266,7 +266,7 @@ define([
}
}
if (this.mode.isDesktopApp && this.mode.isOffline) {
if (this.mode.isEdit && this.mode.isDesktopApp && this.mode.isOffline) {
this.panels['protect'] = (new SSE.Views.FileMenuPanels.ProtectDoc({menu:this})).render();
this.panels['protect'].setMode(this.mode);
}