diff --git a/apps/common/main/lib/controller/ReviewChanges.js b/apps/common/main/lib/controller/ReviewChanges.js
index c9aad623c..f96b85902 100644
--- a/apps/common/main/lib/controller/ReviewChanges.js
+++ b/apps/common/main/lib/controller/ReviewChanges.js
@@ -75,6 +75,7 @@ define([
'reviewchange:reject': _.bind(this.onRejectClick, this),
'reviewchange:delete': _.bind(this.onDeleteClick, this),
'reviewchange:preview': _.bind(this.onBtnPreviewClick, this),
+ 'reviewchanges:view': _.bind(this.onReviewViewClick, this),
'lang:document': _.bind(this.onDocLanguage, this)
},
'Common.Views.ReviewChangesDialog': {
@@ -127,10 +128,10 @@ define([
return this;
},
- SetDisabled: function() {
+ SetDisabled: function(state) {
if (this.dlgChanges)
this.dlgChanges.close();
- this.view && this.view.SetDisabled(true);
+ this.view && this.view.SetDisabled(state);
},
onApiShowChange: function (sdkchange) {
@@ -500,6 +501,41 @@ define([
this.api.asc_setSpellCheck(state);
},
+ onReviewViewClick: function(menu, item, e) {
+ if (this.api) {
+ if (item.value === 'final')
+ this.api.asc_BeginViewModeInReview(true);
+ else if (item.value === 'original')
+ this.api.asc_BeginViewModeInReview(false);
+ else
+ this.api.asc_EndViewModeInReview();
+ }
+ this.disableEditing(item.value !== 'markup');
+ Common.NotificationCenter.trigger('edit:complete', this.view);
+ },
+
+ disableEditing: function(disable) {
+ var app = this.getApplication();
+ app.getController('RightMenu').getView('RightMenu').clearSelection();
+ app.getController('Toolbar').DisableToolbar(disable, false, true);
+ app.getController('RightMenu').SetDisabled(disable, false);
+ app.getController('Statusbar').getView('Statusbar').SetDisabled(disable);
+ app.getController('DocumentHolder').getView().SetDisabled(disable);
+
+ var leftMenu = app.getController('LeftMenu').leftMenu;
+ leftMenu.btnComments.setDisabled(disable);
+ if (disable) leftMenu.close();
+
+ if (this.view) {
+ var group = this.view.$el.find('.move-changes');
+ group.css('position', disable ? 'relative' : 'initial');
+ disable && group.find('.toolbar-group-mask').css({
+ left: 0, right: 0, top: 0, bottom: 0
+ });
+ this.view.$el.find('.no-group-mask').css('opacity', 1);
+ }
+ },
+
createToolbarPanel: function() {
return this.view.getPanel();
},
diff --git a/apps/common/main/lib/view/ReviewChanges.js b/apps/common/main/lib/view/ReviewChanges.js
index d07f2a23e..485f51c88 100644
--- a/apps/common/main/lib/view/ReviewChanges.js
+++ b/apps/common/main/lib/view/ReviewChanges.js
@@ -423,6 +423,12 @@ define([
'
' +
'' +
'' +
+ '
' +
+ '' +
+ '' +
+ '
' +
+ '' +
+ '' +
'
' +
'
' +
'
' +
@@ -468,6 +474,10 @@ define([
button.on('click', _click_turnpreview.bind(me));
Common.NotificationCenter.trigger('edit:complete', me);
});
+
+ this.btnReviewView.menu.on('item:click', function (menu, item, e) {
+ me.fireEvent('reviewchanges:view', [menu, item]);
+ });
}
this.btnsSpelling.forEach(function(button) {
@@ -528,6 +538,13 @@ define([
enableToggle: true
});
this.btnsTurnReview = [this.btnTurnOn];
+
+ this.btnReviewView = new Common.UI.Button({
+ cls: 'btn-toolbar x-huge icon-top',
+ iconCls: 'btn-ic-reviewview',
+ caption: this.txtView,
+ menu: true
+ });
}
this.btnSetSpelling = new Common.UI.Button({
@@ -597,6 +614,35 @@ define([
);
me.btnReject.updateHint([me.txtRejectCurrent, me.txtRejectChanges]);
+ me.btnReviewView.setMenu(
+ new Common.UI.Menu({
+ cls: 'ppm-toolbar',
+ items: [
+ {
+ caption: me.txtMarkup,
+ checkable: true,
+ toggleGroup: 'menuReviewView',
+ checked: true,
+ value: 'markup'
+ },
+ {
+ caption: me.txtFinal,
+ checkable: true,
+ toggleGroup: 'menuReviewView',
+ checked: false,
+ value: 'final'
+ },
+ {
+ caption: me.txtOriginal,
+ checkable: true,
+ toggleGroup: 'menuReviewView',
+ checked: false,
+ value: 'original'
+ }
+ ]
+ }));
+ me.btnReviewView.updateHint(me.tipReviewView);
+
me.btnAccept.setDisabled(config.isReviewOnly);
me.btnReject.setDisabled(config.isReviewOnly);
} else {
@@ -627,6 +673,7 @@ define([
this.btnAccept.render(this.$el.find('#btn-change-accept'));
this.btnReject.render(this.$el.find('#btn-change-reject'));
this.btnTurnOn.render(this.$el.find('#btn-review-on'));
+ this.btnReviewView.render(this.$el.find('#btn-review-view'));
}
this.btnSetSpelling.render(this.$el.find('#slot-btn-spelling'));
@@ -739,7 +786,12 @@ define([
tipSetSpelling: 'Spell checking',
tipReview: 'Review',
txtAcceptChanges: 'Accept Changes',
- txtRejectChanges: 'Reject Changes'
+ txtRejectChanges: 'Reject Changes',
+ txtView: 'Display Mode',
+ txtMarkup: 'All changes (Editing)',
+ txtFinal: 'All changes accepted (Preview)',
+ txtOriginal: 'All changes rejected (Preview)',
+ tipReviewView: 'Select the way you want the changes to be displayed'
}
}()), Common.Views.ReviewChanges || {}));
diff --git a/apps/common/main/resources/img/controls/toolbarbig.png b/apps/common/main/resources/img/controls/toolbarbig.png
index 242ab70d4..d5bbddcae 100644
Binary files a/apps/common/main/resources/img/controls/toolbarbig.png and b/apps/common/main/resources/img/controls/toolbarbig.png differ
diff --git a/apps/common/main/resources/img/controls/toolbarbig@2x.png b/apps/common/main/resources/img/controls/toolbarbig@2x.png
index b927d87fe..63d5f5de2 100644
Binary files a/apps/common/main/resources/img/controls/toolbarbig@2x.png and b/apps/common/main/resources/img/controls/toolbarbig@2x.png differ
diff --git a/apps/common/main/resources/less/toolbar.less b/apps/common/main/resources/less/toolbar.less
index 57b0016af..dc200a5fa 100644
--- a/apps/common/main/resources/less/toolbar.less
+++ b/apps/common/main/resources/less/toolbar.less
@@ -273,6 +273,7 @@
.button-normal-icon(btn-addslide, 11, @toolbar-big-icon-size);
.button-normal-icon(~'x-huge .btn-ic-docspell', 12, @toolbar-big-icon-size);
.button-normal-icon(~'x-huge .btn-ic-review', 13, @toolbar-big-icon-size);
+.button-normal-icon(~'x-huge .btn-ic-reviewview', 30, @toolbar-big-icon-size);
.button-normal-icon(review-save, 14, @toolbar-big-icon-size);
.button-normal-icon(review-deny, 15, @toolbar-big-icon-size);
.button-normal-icon(review-next, 16, @toolbar-big-icon-size);
diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js
index 83778fe9a..389e688d4 100644
--- a/apps/documenteditor/main/app/controller/Toolbar.js
+++ b/apps/documenteditor/main/app/controller/Toolbar.js
@@ -2752,23 +2752,30 @@ define([
this.editMode = false;
},
- DisableToolbar: function(disable, viewMode) {
+ DisableToolbar: function(disable, viewMode, reviewmode) {
if (viewMode!==undefined) this.editMode = !viewMode;
disable = disable || !this.editMode;
- var mask = $('.toolbar-mask');
+ var toolbar_mask = $('.toolbar-mask'),
+ group_mask = $('.toolbar-group-mask'),
+ mask = reviewmode ? group_mask : toolbar_mask;
if (disable && mask.length>0 || !disable && mask.length==0) return;
var toolbar = this.toolbar;
- toolbar.$el.find('.toolbar').toggleClass('masked', disable);
- toolbar.btnHide.setDisabled(disable);
if(disable) {
- mask = $("