From 9d8675f041d658ab1a5438083ecffa4393a4e49b Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Thu, 14 Nov 2019 13:25:01 +0300 Subject: [PATCH] [DE] Disable comparing of documents in the co-editing 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 fdfda5bd5..289cdd0bd 100644 --- a/apps/common/main/lib/controller/ReviewChanges.js +++ b/apps/common/main/lib/controller/ReviewChanges.js @@ -124,6 +124,8 @@ define([ if (this.appConfig.canReview || this.appConfig.canViewReview) { this.api.asc_registerCallback('asc_onShowRevisionsChange', _.bind(this.onApiShowChange, this)); this.api.asc_registerCallback('asc_onUpdateRevisionsChangesPosition', _.bind(this.onApiUpdateChangePosition, this)); + this.api.asc_registerCallback('asc_onAuthParticipantsChanged', _.bind(this.onAuthParticipantsChanged, this)); + this.api.asc_registerCallback('asc_onParticipantsChanged', _.bind(this.onAuthParticipantsChanged, this)); } this.api.asc_registerCallback('asc_onAcceptChangesBeforeCompare',_.bind(this.onAcceptChangesBeforeCompare, this)); this.api.asc_registerCallback('asc_onCoAuthoringDisconnect',_.bind(this.onCoAuthoringDisconnect, this)); @@ -856,6 +858,17 @@ define([ }); }, + onAuthParticipantsChanged: function(users) { + if (this.view && this.view.btnCompare) { + var length = 0; + _.each(users, function(item){ + if (!item.asc_getView()) + length++; + }); + this.view.btnCompare.setDisabled(length>1 || this.viewmode); + } + }, + textInserted: 'Inserted:', textDeleted: 'Deleted:', textParaInserted: 'Paragraph Inserted ',