diff --git a/apps/common/main/lib/controller/ReviewChanges.js b/apps/common/main/lib/controller/ReviewChanges.js
index ff9b70a8d..659b45025 100644
--- a/apps/common/main/lib/controller/ReviewChanges.js
+++ b/apps/common/main/lib/controller/ReviewChanges.js
@@ -125,6 +125,7 @@ define([
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_onAcceptChangesBeforeCompare',_.bind(this.onAcceptChangesBeforeCompare, this));
this.api.asc_registerCallback('asc_onCoAuthoringDisconnect',_.bind(this.onCoAuthoringDisconnect, this));
}
},
@@ -624,6 +625,22 @@ define([
}
},
+ onAcceptChangesBeforeCompare: function(callback) {
+ var me = this;
+ Common.UI.warning({
+ width: 550,
+ msg: this.textAcceptBeforeCompare,
+ buttons: ['yes', 'no'],
+ primary: 'yes',
+ callback: function(result) {
+ _.defer(function() {
+ if (callback) callback.call(result=='yes');
+ });
+ Common.NotificationCenter.trigger('edit:complete', this.view);
+ }
+ });
+ },
+
turnDisplayMode: function(mode) {
if (this.api) {
if (mode === 'final')
@@ -893,6 +910,7 @@ define([
textParaMoveTo: 'Moved:',
textParaMoveFromUp: 'Moved Up:',
textParaMoveFromDown: 'Moved Down:',
- textUrl: 'Paste a document URL'
+ textUrl: 'Paste a document URL',
+ textAcceptBeforeCompare: 'In order to compare documents all the tracked changes in them will be considered to have been accepted. Do you want to continue?'
}, Common.Controllers.ReviewChanges || {}));
});
\ No newline at end of file
diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json
index fcd0043ea..4b6a86242 100644
--- a/apps/documenteditor/main/locale/en.json
+++ b/apps/documenteditor/main/locale/en.json
@@ -70,6 +70,7 @@
"Common.Controllers.ReviewChanges.textUnderline": "Underline",
"Common.Controllers.ReviewChanges.textWidow": "Widow control",
"Common.Controllers.ReviewChanges.textUrl": "Paste a document URL",
+ "Common.Controllers.ReviewChanges.textAcceptBeforeCompare": "In order to compare documents all the tracked changes in them will be considered to have been accepted. Do you want to continue?",
"Common.UI.ComboBorderSize.txtNoBorders": "No borders",
"Common.UI.ComboBorderSizeEditable.txtNoBorders": "No borders",
"Common.UI.ComboDataView.emptyComboText": "No styles",