Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Bug 65875 #2788

Merged
merged 2 commits into from
Feb 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions apps/common/main/lib/controller/ReviewChanges.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,15 @@ define([
this.appPrefix = (filter && filter.length) ? filter.split(',')[0] : '';

this._state = { posx: -1000, posy: -1000, popoverVisible: false, previewMode: false, compareSettings: null, wsLock: false, wsProps: [],
displayMode: Asc.c_oAscDisplayModeInReview.Edit,
disableEditing: false, // disable editing when disconnect/signed file/mail merge preview/review final or original/forms preview
docProtection: {
isReadOnly: false,
isReviewOnly: false,
isFormsOnly: false,
isCommentsOnly: false
}
},
sdkchange: null
};

Common.NotificationCenter.on('reviewchanges:turn', this.onTurnPreview.bind(this));
Expand Down Expand Up @@ -237,6 +239,7 @@ define([
onApiShowChange: function (sdkchange, isShow) {
var btnlock = true,
changes;
this._state.sdkchange = sdkchange;
if (this.appConfig.canReview && !(this.appConfig.isReviewOnly || this._state.docProtection.isReviewOnly)) {
if (sdkchange && sdkchange.length>0) {
changes = this.readSDKChange(sdkchange);
Expand All @@ -251,7 +254,7 @@ define([
}

if (this.getPopover()) {
if (!this.appConfig.reviewHoverMode && sdkchange && sdkchange.length>0 && isShow) { // show changes balloon only for current position, not selection
if (!this.appConfig.reviewHoverMode && (this._state.displayMode !== Asc.c_oAscDisplayModeInReview.Simple) && sdkchange && sdkchange.length>0 && isShow) { // show changes balloon only for current position, not selection
var i = 0,
posX = sdkchange[0].get_X(),
posY = sdkchange[0].get_Y(),
Expand Down Expand Up @@ -832,6 +835,7 @@ define([
type = Asc.c_oAscDisplayModeInReview.Simple;
break;
}
this._state.displayMode = type;
this.api.asc_SetDisplayModeInReview(type);
}
this.disableEditing(mode == 'final' || mode == 'original');
Expand All @@ -840,6 +844,7 @@ define([

onChangeDisplayModeInReview: function(type) {
this.disableEditing(type===Asc.c_oAscDisplayModeInReview.Final || type===Asc.c_oAscDisplayModeInReview.Original);
this._state.displayMode = type;
var mode = 'markup';
switch (type) {
case Asc.c_oAscDisplayModeInReview.Final:
Expand Down Expand Up @@ -1000,6 +1005,7 @@ define([
me.appConfig.reviewHoverMode = val;

me.view && me.view.onAppReady(config);
me._state.sdkchange && me.onApiShowChange(me._state.sdkchange, true);
});
},

Expand Down
Loading