[DE] Support events for change review display mode
This commit is contained in:
parent
630799d928
commit
4177faa7ee
|
@ -131,6 +131,8 @@ define([
|
|||
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_onBeginViewModeInReview', _.bind(this.onBeginViewModeInReview, this));
|
||||
this.api.asc_registerCallback('asc_onEndViewModeInReview', _.bind(this.onEndViewModeInReview, this));
|
||||
}
|
||||
if (this.appConfig.canReview)
|
||||
this.api.asc_registerCallback('asc_onOnTrackRevisionsChange', _.bind(this.onApiTrackRevisionsChange, this));
|
||||
|
@ -694,6 +696,18 @@ define([
|
|||
this._state.previewMode = (mode == 'final' || mode == 'original');
|
||||
},
|
||||
|
||||
onBeginViewModeInReview: function(mode) {
|
||||
this.disableEditing(true);
|
||||
this.view && this.view.turnDisplayMode(mode ? 'final' : 'original');
|
||||
this._state.previewMode = true;
|
||||
},
|
||||
|
||||
onEndViewModeInReview: function() {
|
||||
this.disableEditing(false);
|
||||
this.view && this.view.turnDisplayMode('markup');
|
||||
this._state.previewMode = false;
|
||||
},
|
||||
|
||||
isPreviewChangesMode: function() {
|
||||
return this._state.previewMode;
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue