From 9a6034b611f48b80b7907e9bc76bafdcee5a2ffa Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 24 Oct 2022 20:55:55 +0300 Subject: [PATCH] [DE] Fix opening protected document (show comment buttons after unprotect) --- apps/common/main/lib/view/ReviewChanges.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/common/main/lib/view/ReviewChanges.js b/apps/common/main/lib/view/ReviewChanges.js index fb1336691..4c4c1239f 100644 --- a/apps/common/main/lib/view/ReviewChanges.js +++ b/apps/common/main/lib/view/ReviewChanges.js @@ -449,6 +449,7 @@ define([ } if ( this.appConfig.canCoAuthoring && this.appConfig.canComments ) { + this.canComments = true; // fix for loading protected document this.btnCommentRemove = new Common.UI.Button({ cls: 'btn-toolbar x-huge icon-top', caption: this.txtCommentRemove, @@ -660,7 +661,7 @@ define([ } var separator_sharing = !(me.btnSharing || me.btnCoAuthMode) ? me.$el.find('.separator.sharing') : '.separator.sharing', - separator_comments = !(config.canComments && config.canCoAuthoring) ? me.$el.find('.separator.comments') : '.separator.comments', + separator_comments = !(me.btnCommentRemove || me.btnCommentResolve) ? me.$el.find('.separator.comments') : '.separator.comments', separator_review = !(config.canReview || config.canViewReview) ? me.$el.find('.separator.review') : '.separator.review', separator_compare = !(config.canReview && config.canFeatureComparison) ? me.$el.find('.separator.compare') : '.separator.compare', separator_chat = !me.btnChat ? me.$el.find('.separator.chat') : '.separator.chat', @@ -694,7 +695,7 @@ define([ if (!me.btnHistory && separator_last) me.$el.find(separator_last).hide(); - Common.NotificationCenter.trigger('tab:visible', 'review', (config.isEdit || config.canViewReview || config.canCoAuthoring && config.canComments) && Common.UI.LayoutManager.isElementVisible('toolbar-collaboration')); + Common.NotificationCenter.trigger('tab:visible', 'review', (config.isEdit || config.canViewReview || me.canComments) && Common.UI.LayoutManager.isElementVisible('toolbar-collaboration')); setEvents.call(me); }); },