mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-24 07:31:55 +08:00
[DE mobile] Fix Bug 63278
This commit is contained in:
@ -795,7 +795,7 @@ class MainController extends Component {
|
||||
const { t } = this.props;
|
||||
const storeAppOptions = this.props.storeAppOptions;
|
||||
const props = this.getDocProps(true);
|
||||
const isProtected = props && (props.isReadOnly || props.isCommentsOnly || props.isFormsOnly || props.isReviewOnly);
|
||||
const isProtected = props && (props.isReadOnly || props.isCommentsOnly || props.isFormsOnly || props.isReviewOnly || props.isTrackedChanges);
|
||||
let textWarningDialog;
|
||||
|
||||
if(!storeAppOptions.isReviewOnly) {
|
||||
@ -822,6 +822,7 @@ class MainController extends Component {
|
||||
}
|
||||
|
||||
storeAppOptions.setProtection(isProtected);
|
||||
storeAppOptions.setTypeProtection(props.type);
|
||||
props && this.applyRestrictions(props.type);
|
||||
Common.Notifications.trigger('protect:doclock', props);
|
||||
|
||||
@ -852,7 +853,8 @@ class MainController extends Component {
|
||||
storeAppOptions.canComments && this.api.asc_setRestriction(Asc.c_oAscRestrictionType.OnlyComments);
|
||||
storeAppOptions.canFillForms && this.api.asc_setRestriction(Asc.c_oAscRestrictionType.OnlyForms);
|
||||
} else {
|
||||
this.api.asc_setRestriction(Asc.c_oAscRestrictionType.None);
|
||||
// this.api.asc_setRestriction(Asc.c_oAscRestrictionType.None);
|
||||
this.api.asc_setRestriction(Asc.c_oAscRestrictionType.View);
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -871,7 +873,8 @@ class MainController extends Component {
|
||||
isReadOnly: type === Asc.c_oAscEDocProtect.ReadOnly,
|
||||
isCommentsOnly: type === Asc.c_oAscEDocProtect.Comments,
|
||||
isReviewOnly: type === Asc.c_oAscEDocProtect.TrackedChanges,
|
||||
isFormsOnly: type === Asc.c_oAscEDocProtect.Forms
|
||||
isFormsOnly: type === Asc.c_oAscEDocProtect.Forms,
|
||||
isTrackedChanges: type === Asc.c_oAscEDocProtect.TrackedChanges
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -191,7 +191,7 @@ const ToolbarController = inject('storeAppOptions', 'users', 'storeReview', 'sto
|
||||
|
||||
f7.popover.close('.document-menu.modal-in', false);
|
||||
|
||||
appOptions.changeViewerMode();
|
||||
appOptions.changeViewerMode(true);
|
||||
api.asc_addRestriction(Asc.c_oAscRestrictionType.View);
|
||||
}
|
||||
|
||||
|
||||
@ -27,9 +27,10 @@ class ProtectionDocumentController extends React.Component {
|
||||
appOptions.setProtection(true);
|
||||
appOptions.setTypeProtection(typeProtection);
|
||||
|
||||
if(typeProtection !== Asc.c_oAscEDocProtect.TrackedChanges && !isViewer) {
|
||||
appOptions.changeViewerMode();
|
||||
}
|
||||
// if(typeProtection !== Asc.c_oAscEDocProtect.TrackedChanges && !isViewer) {
|
||||
appOptions.changeViewerMode(true);
|
||||
api.asc_addRestriction(Asc.c_oAscRestrictionType.View);
|
||||
// }
|
||||
|
||||
protection.asc_setEditType(typeProtection);
|
||||
protection.asc_setPassword(password);
|
||||
|
||||
@ -116,7 +116,7 @@ class MainPage extends Component {
|
||||
f7.popover.close('.document-menu.modal-in', false);
|
||||
f7.navbar.show('.main-navbar', false);
|
||||
|
||||
appOptions.changeViewerMode();
|
||||
appOptions.changeViewerMode(false);
|
||||
api.asc_removeRestriction(Asc.c_oAscRestrictionType.View)
|
||||
api.asc_addRestriction(Asc.c_oAscRestrictionType.None);
|
||||
};
|
||||
|
||||
@ -64,10 +64,9 @@ export class storeAppOptions {
|
||||
this.isMobileView = !this.isMobileView;
|
||||
}
|
||||
|
||||
|
||||
isViewer = true;
|
||||
changeViewerMode() {
|
||||
this.isViewer = !this.isViewer;
|
||||
changeViewerMode(value) {
|
||||
this.isViewer = value;
|
||||
}
|
||||
|
||||
canViewComments = false;
|
||||
|
||||
Reference in New Issue
Block a user