From 84b0419debc81f860a62fedb3bac28a4e14ace82 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 4 Feb 2019 16:43:25 +0300 Subject: [PATCH] [DE] Disable accepting/rejecting review changes when preview mail merge and in version history mode --- apps/common/main/lib/controller/ReviewChanges.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/apps/common/main/lib/controller/ReviewChanges.js b/apps/common/main/lib/controller/ReviewChanges.js index 1fd05240c..0afd2808d 100644 --- a/apps/common/main/lib/controller/ReviewChanges.js +++ b/apps/common/main/lib/controller/ReviewChanges.js @@ -135,6 +135,19 @@ define([ if (this.dlgChanges) this.dlgChanges.close(); this.view && this.view.SetDisabled(state, this.langs); + this.setPreviewMode(state); + }, + + setPreviewMode: function(mode) { //disable accept/reject in popover + if (this.viewmode === mode) return; + this.viewmode = mode; + if (mode) + this.prevcanReview = this.appConfig.canReview; + this.appConfig.canReview = (mode) ? false : this.prevcanReview; + var me = this; + this.popoverChanges && this.popoverChanges.each(function (model) { + model.set('hint', !me.appConfig.canReview); + }); }, onApiShowChange: function (sdkchange) {