[PDF] Fix view mode

This commit is contained in:
Julia Radzhabova
2024-04-09 11:57:31 +03:00
parent 524dce23f0
commit deddf5dc2c
2 changed files with 5 additions and 5 deletions

View File

@ -1177,7 +1177,7 @@ define([
accept();
})).then(function () {
var hand = (config.isEdit && !config.isPDFEdit || config.isRestrictedEdit);
me.toolbar && me.toolbar[hand ? 'btnHandTool' : 'btnSelectTool'].toggle(true, true);
me.toolbar && me.toolbar.btnHandTool && me.toolbar[hand ? 'btnHandTool' : 'btnSelectTool'].toggle(true, true);
me.api && me.api.asc_setViewerTargetType(hand ? 'hand' : 'select');
if (config.isRestrictedEdit && me.toolbar && me.toolbar.btnSubmit && me.api && !me.api.asc_IsAllRequiredFormsFilled()) {
me.toolbar.lockToolbar(Common.enumLock.requiredNotFilled, true, {array: [me.toolbar.btnSubmit]});

View File

@ -149,11 +149,11 @@ define([
}
if (!config.canPDFEdit || config.canBrandingExt && config.customization && config.customization.rightMenu === false || !Common.UI.LayoutManager.isElementVisible('rightMenu')) {
emptyGroup.push(me.chRightMenu.$el.closest('.elset'));
me.chRightMenu.$el.remove();
emptyGroup.push(me.view.chRightMenu.$el.closest('.elset'));
me.view.chRightMenu.$el.remove();
} else if (emptyGroup.length>0) {
emptyGroup.push(me.chRightMenu.$el.closest('.elset'));
emptyGroup.shift().append(me.chRightMenu.$el[0]);
emptyGroup.push(me.view.chRightMenu.$el.closest('.elset'));
emptyGroup.shift().append(me.view.chRightMenu.$el[0]);
}
config.canPDFEdit && me.applyEditorMode(config);