From afe69c8014f83ee93dc60f92d2ec420a254947ca Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Fri, 9 Jun 2017 15:52:07 +0300 Subject: [PATCH] Use asc_setRestriction method for commenting in view mode. --- apps/documenteditor/main/app/controller/Main.js | 1 + apps/presentationeditor/main/app/controller/Main.js | 2 +- apps/spreadsheeteditor/main/app/controller/Main.js | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/documenteditor/main/app/controller/Main.js b/apps/documenteditor/main/app/controller/Main.js index 7a920250a..80d640c36 100644 --- a/apps/documenteditor/main/app/controller/Main.js +++ b/apps/documenteditor/main/app/controller/Main.js @@ -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) { diff --git a/apps/presentationeditor/main/app/controller/Main.js b/apps/presentationeditor/main/app/controller/Main.js index dcc32cb40..b39fe5cdb 100644 --- a/apps/presentationeditor/main/app/controller/Main.js +++ b/apps/presentationeditor/main/app/controller/Main.js @@ -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) { diff --git a/apps/spreadsheeteditor/main/app/controller/Main.js b/apps/spreadsheeteditor/main/app/controller/Main.js index bca1103b9..d2254a453 100644 --- a/apps/spreadsheeteditor/main/app/controller/Main.js +++ b/apps/spreadsheeteditor/main/app/controller/Main.js @@ -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) {