Use asc_setRestriction method for commenting in view mode.

This commit is contained in:
Julia Radzhabova 2017-06-09 15:52:07 +03:00
parent 746b2889f2
commit afe69c8014
3 changed files with 3 additions and 1 deletions

View file

@ -1014,6 +1014,7 @@ define([
this.applyModeEditorElements();
this.api.asc_setViewMode(!this.appOptions.isEdit && !this.appOptions.canComments);
(!this.appOptions.isEdit && this.appOptions.canComments) && this.api.asc_setRestriction(Asc.c_oAscRestrictionType.OnlyComments);
this.api.asc_LoadDocument();
if (!this.appOptions.isEdit) {

View file

@ -778,7 +778,7 @@ define([
this.applyModeEditorElements();
this.api.asc_setViewMode(!this.appOptions.isEdit && !this.appOptions.canComments);
(!this.appOptions.isEdit && this.appOptions.canComments) && this.api.asc_setRestriction(Asc.c_oAscRestrictionType.OnlyComments);
this.api.asc_LoadDocument();
if (!this.appOptions.isEdit) {

View file

@ -799,6 +799,7 @@ define([
this.applyModeEditorElements();
this.api.asc_setViewMode(!this.appOptions.isEdit && !this.appOptions.canComments);
(!this.appOptions.isEdit && this.appOptions.canComments) && this.api.asc_setRestriction(Asc.c_oAscRestrictionType.OnlyComments);
(this.appOptions.isEditMailMerge || this.appOptions.isEditDiagram) ? this.api.asc_LoadEmptyDocument() : this.api.asc_LoadDocument();
if (!this.appOptions.isEdit) {