Commit afe69c80 authored by Julia Radzhabova's avatar Julia Radzhabova

Use asc_setRestriction method for commenting in view mode.

parent 746b2889
......@@ -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) {
......
......@@ -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) {
......
......@@ -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) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment