Fix Bug 49127

This commit is contained in:
Julia Radzhabova 2021-08-30 23:12:11 +03:00
parent 0906dd1885
commit 7523a0078f
6 changed files with 26 additions and 24 deletions

View file

@ -131,8 +131,8 @@ define([
this.rightmenu.fireEvent('editcomplete', this.rightmenu);
},
onFocusObject: function(SelectedObjects) {
if (!this.editMode)
onFocusObject: function(SelectedObjects, forceSignature) {
if (!this.editMode && !forceSignature)
return;
var open = this._initSettings ? !Common.localStorage.getBool("de-hide-right-settings", this.rightmenu.defaultHideRightMenu) : false;
@ -269,6 +269,7 @@ define([
if (priorityactive>-1) active = priorityactive;
else if (lastactive>=0 && currentactive<0) active = lastactive;
else if (currentactive>=0) active = currentactive;
else if (forceSignature && !this._settings[Common.Utils.documentSettingsType.Signature].hidden) active = Common.Utils.documentSettingsType.Signature;
else if (!this._settings[Common.Utils.documentSettingsType.MailMerge].hidden) active = Common.Utils.documentSettingsType.MailMerge;
if (active == undefined && open && lastactive>=0)
@ -423,8 +424,9 @@ define([
}
this.rightmenu.chartSettings.disableControls(disabled);
if (!allowSignature && this.rightmenu.signatureSettings) {
this.rightmenu.btnSignature.setDisabled(disabled);
if (this.rightmenu.signatureSettings) {
!allowSignature && this.rightmenu.btnSignature.setDisabled(disabled);
allowSignature && disabled && this.onFocusObject([], true); // force press signature button
}
if (disabled) {

View file

@ -400,7 +400,7 @@ define([
allowMerge: false,
allowSignature: true,
allowProtect: true,
rightMenu: {clear: disable && (DE.getController('RightMenu').rightmenu.GetActivePane() !== 'id-signature-settings'), disable: true},
rightMenu: {clear: false, disable: true},
statusBar: true,
leftMenu: {disable: false, previewMode: true},
fileMenu: false,

View file

@ -106,8 +106,8 @@ define([
this.rightmenu.fireEvent('editcomplete', this.rightmenu);
},
onFocusObject: function(SelectedObjects) {
if (!this.editMode)
onFocusObject: function(SelectedObjects, forceSignature) {
if (!this.editMode && !forceSignature)
return;
var open = this._initSettings ? !Common.localStorage.getBool("pe-hide-right-settings", this.rightmenu.defaultHideRightMenu) : false;
@ -194,6 +194,7 @@ define([
if (priorityactive>-1) active = priorityactive;
else if (currentactive>=0) active = currentactive;
else if (lastactive>=0) active = lastactive;
else if (forceSignature && !this._settings[Common.Utils.documentSettingsType.Signature].hidden) active = Common.Utils.documentSettingsType.Signature;
else active = Common.Utils.documentSettingsType.Slide;
if (active !== undefined) {
@ -226,8 +227,9 @@ define([
this.rightmenu.imageSettings.disableControls(disabled);
this.rightmenu.chartSettings.disableControls(disabled);
if (!allowSignature && this.rightmenu.signatureSettings) {
this.rightmenu.btnSignature.setDisabled(disabled);
if (this.rightmenu.signatureSettings) {
!allowSignature && this.rightmenu.btnSignature.setDisabled(disabled);
allowSignature && disabled && this.onFocusObject([], true); // force press signature button
}
if (disabled) {

View file

@ -350,7 +350,7 @@ define([
Common.NotificationCenter.trigger('editing:disable', disable, {
viewMode: disable,
allowSignature: true,
rightMenu: {clear: disable && (PE.getController('RightMenu').rightmenu.GetActivePane() !== 'id-signature-settings'), disable: true},
rightMenu: {clear: false, disable: true},
statusBar: true,
leftMenu: {disable: false, previewMode: true},
fileMenu: false,

View file

@ -168,14 +168,14 @@ define([
this.onFocusObject(SelectedObjects, cellInfo, formatTableInfo, sparkLineInfo, pivotInfo);
},
onFocusObject: function(SelectedObjects, cellInfo, formatTableInfo, sparkLineInfo, pivotInfo) {
if (!this.editMode)
onFocusObject: function(SelectedObjects, cellInfo, formatTableInfo, sparkLineInfo, pivotInfo, forceSignature) {
if (!this.editMode && !forceSignature)
return;
var isCellLocked = cellInfo.asc_getLocked() || this._state.wsProps['FormatCells'],
isTableLocked = (cellInfo.asc_getLockedTable()===true || !this.rightmenu.mode.canModifyFilter) || this._state.wsProps['FormatCells'],
isSparkLocked = (cellInfo.asc_getLockedSparkline()===true) || this._state.wsLock,
isPivotLocked = (cellInfo.asc_getLockedPivotTable()===true) || this._state.wsProps['PivotTables'];
var isCellLocked = cellInfo && cellInfo.asc_getLocked() || this._state.wsProps['FormatCells'],
isTableLocked = (cellInfo && cellInfo.asc_getLockedTable()===true || !this.rightmenu.mode.canModifyFilter) || this._state.wsProps['FormatCells'],
isSparkLocked = (cellInfo && cellInfo.asc_getLockedSparkline()===true) || this._state.wsLock,
isPivotLocked = (cellInfo && cellInfo.asc_getLockedPivotTable()===true) || this._state.wsProps['PivotTables'];
for (var i=0; i<this._settings.length; ++i) {
if (i==Common.Utils.documentSettingsType.Signature) continue;
@ -241,7 +241,7 @@ define([
this._settings[settingsType].hidden = 0;
}
if (SelectedObjects.length<=0) { // cell is selected
if (SelectedObjects.length<=0 && cellInfo) { // cell is selected
settingsType = Common.Utils.documentSettingsType.Cell;
this._settings[settingsType].props = cellInfo;
this._settings[settingsType].locked = isCellLocked;
@ -296,6 +296,7 @@ define([
if (priorityactive>-1) active = priorityactive;
else if (lastactive>=0 && currentactive<0) active = lastactive;
else if (currentactive>=0) active = currentactive;
else if (forceSignature && !this._settings[Common.Utils.documentSettingsType.Signature].hidden) active = Common.Utils.documentSettingsType.Signature;
if (active == undefined && this._openRightMenu && lastactive>=0)
active = lastactive;
@ -425,12 +426,9 @@ define([
this.rightmenu.cellSettings.disableControls(disabled);
this.rightmenu.slicerSettings.disableControls(disabled);
if (!allowSignature && this.rightmenu.signatureSettings) {
this.rightmenu.btnSignature.setDisabled(disabled);
}
if (!allowSignature && this.rightmenu.signatureSettings) {
this.rightmenu.btnSignature.setDisabled(disabled);
if (this.rightmenu.signatureSettings) {
!allowSignature && this.rightmenu.btnSignature.setDisabled(disabled);
allowSignature && disabled && this.onFocusObject([], undefined, undefined, undefined, undefined, true); // force press signature button
}
if (disabled) {

View file

@ -397,7 +397,7 @@ define([
viewMode: disable,
allowSignature: true,
allowProtect: true,
rightMenu: {clear: disable && (SSE.getController('RightMenu').rightmenu.GetActivePane() !== 'id-signature-settings'), disable: true},
rightMenu: {clear: false, disable: true},
statusBar: true,
leftMenu: {disable: false, previewMode: true},
fileMenu: false,