From fbee9a51030cf0ddf9b1d6bced17a4ca89b68997 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Tue, 28 Jan 2020 15:50:16 +0300 Subject: [PATCH] [DE] Don't hide sharing settings for review only mode (#318) --- apps/common/main/lib/view/Header.js | 6 +++--- apps/documenteditor/main/app/view/FileMenu.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/common/main/lib/view/Header.js b/apps/common/main/lib/view/Header.js index a56d5cfcd..d04cdd694 100644 --- a/apps/common/main/lib/view/Header.js +++ b/apps/common/main/lib/view/Header.js @@ -166,7 +166,7 @@ define([ .removeClass('dropdown-toggle') .menu = false; - $panelUsers[(!_readonlyRights && appConfig && !appConfig.isReviewOnly && (appConfig.sharingSettingsUrl && appConfig.sharingSettingsUrl.length || appConfig.canRequestSharingSettings)) ? 'show' : 'hide'](); + $panelUsers[(!_readonlyRights && appConfig && (appConfig.sharingSettingsUrl && appConfig.sharingSettingsUrl.length || appConfig.canRequestSharingSettings)) ? 'show' : 'hide'](); } $btnUsers.find('.caption') @@ -248,8 +248,8 @@ define([ Common.NotificationCenter.trigger('collaboration:sharing'); }); - $labelChangeRights[(!mode.isOffline && !mode.isReviewOnly && (mode.sharingSettingsUrl && mode.sharingSettingsUrl.length || mode.canRequestSharingSettings))?'show':'hide'](); - $panelUsers[(editingUsers > 1 || editingUsers > 0 && !appConfig.isEdit && !appConfig.isRestrictedEdit || !mode.isOffline && !mode.isReviewOnly && (mode.sharingSettingsUrl && mode.sharingSettingsUrl.length || mode.canRequestSharingSettings)) ? 'show' : 'hide'](); + $labelChangeRights[(!mode.isOffline && (mode.sharingSettingsUrl && mode.sharingSettingsUrl.length || mode.canRequestSharingSettings))?'show':'hide'](); + $panelUsers[(editingUsers > 1 || editingUsers > 0 && !appConfig.isEdit && !appConfig.isRestrictedEdit || !mode.isOffline && (mode.sharingSettingsUrl && mode.sharingSettingsUrl.length || mode.canRequestSharingSettings)) ? 'show' : 'hide'](); if ( $saveStatus ) { $saveStatus.attr('data-width', me.textSaveExpander); diff --git a/apps/documenteditor/main/app/view/FileMenu.js b/apps/documenteditor/main/app/view/FileMenu.js index 646859833..a308ad840 100644 --- a/apps/documenteditor/main/app/view/FileMenu.js +++ b/apps/documenteditor/main/app/view/FileMenu.js @@ -296,7 +296,7 @@ define([ this.miNew[this.mode.canCreateNew?'show':'hide'](); this.miNew.$el.find('+.devider')[this.mode.canCreateNew?'show':'hide'](); - this.miAccess[(!this.mode.isOffline && !this.mode.isReviewOnly && this.document&&this.document.info && + this.miAccess[(!this.mode.isOffline && this.document&&this.document.info && (this.document.info.sharingSettings&&this.document.info.sharingSettings.length>0 || (this.mode.sharingSettingsUrl&&this.mode.sharingSettingsUrl.length || this.mode.canRequestSharingSettings)))?'show':'hide']();