diff --git a/apps/common/main/lib/controller/Comments.js b/apps/common/main/lib/controller/Comments.js index f07c5b31c..c888f357a 100644 --- a/apps/common/main/lib/controller/Comments.js +++ b/apps/common/main/lib/controller/Comments.js @@ -190,6 +190,7 @@ define([ this.api.asc_registerCallback('asc_onHideComment', _.bind(this.onApiHideComment, this)); this.api.asc_registerCallback('asc_onUpdateCommentPosition', _.bind(this.onApiUpdateCommentPosition, this)); this.api.asc_registerCallback('asc_onDocumentPlaceChanged', _.bind(this.onDocumentPlaceChanged, this)); + this.api.asc_registerCallback('asc_onDeleteComment', _.bind(this.onDeleteComment, this)); // only for PE, when del or ctrl+x pressed } }, @@ -1039,6 +1040,12 @@ define([ } }, + onDeleteComment: function (id, comment) { + if (this.api) { + this.api.asc_RemoveAllComments(!this.mode.canDeleteComments, true);// 1 param = true if remove only my comments, 2 param - remove current comments + } + }, + // internal updateComments: function (needRender, disableSort, loadText) {