[DE] Fix opening protected document (show comment buttons after unprotect)

This commit is contained in:
Julia Radzhabova 2022-10-24 20:55:55 +03:00
parent ea0d07ad89
commit 9a6034b611

View file

@ -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);
});
},