Use asc_setRestriction method for commenting in view mode.

This commit is contained in:
Julia Radzhabova 2017-06-14 14:56:51 +03:00
parent 00fb06281e
commit 14fd826605
3 changed files with 3 additions and 1 deletions

View file

@ -1018,6 +1018,7 @@ define([
}
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();
},

View file

@ -777,6 +777,7 @@ define([
}
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();
},

View file

@ -807,7 +807,7 @@ define([
}
this.api.asc_setViewMode(!this.appOptions.isEdit && !this.appOptions.canComments);
this.api.asc_setViewMode(!this.appOptions.isEdit);
(!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();
},