[DE] Fix Bug 60196

This commit is contained in:
Julia Radzhabova 2022-12-16 22:33:11 +03:00
parent 6cb895f376
commit de2f45f9d2
2 changed files with 12 additions and 3 deletions

View file

@ -214,7 +214,7 @@ define([
if (!this._settings[Common.Utils.documentSettingsType.MailMerge].locked) // lock MailMerge-InsertField, если хотя бы один объект locked
this._settings[Common.Utils.documentSettingsType.MailMerge].locked = value.get_Locked() || isProtected;
if (!this._settings[Common.Utils.documentSettingsType.Signature].locked) // lock Signature, если хотя бы один объект locked
this._settings[Common.Utils.documentSettingsType.Signature].locked = value.get_Locked() || isProtected;
this._settings[Common.Utils.documentSettingsType.Signature].locked = value.get_Locked();
}
if (control_props && control_props.get_FormPr() && this.rightmenu.formSettings) {
@ -265,6 +265,9 @@ define([
if (!this._settings[Common.Utils.documentSettingsType.MailMerge].hidden)
this._settings[Common.Utils.documentSettingsType.MailMerge].panel.setLocked(this._settings[Common.Utils.documentSettingsType.MailMerge].locked);
if (!this._settings[Common.Utils.documentSettingsType.Signature].hidden)
this._settings[Common.Utils.documentSettingsType.Signature].panel.setProtected(isProtected);
if (!this.rightmenu.minimizedMode || open) {
var active;
@ -428,6 +431,7 @@ define([
this._settings[type].hidden = disabled ? 1 : 0;
this._settings[type].btn.setDisabled(disabled);
this._settings[type].panel.setLocked(this._settings[type].locked);
this._settings[type].panel.setProtected(this._state.docProtection ? this._state.docProtection.isReadOnly || this._state.docProtection.isFormsOnly || this._state.docProtection.isCommentsOnly : false);
},
SetDisabled: function(disabled, allowMerge, allowSignature) {

View file

@ -71,6 +71,7 @@ define([
tip: undefined
};
this._locked = false;
this._protected = false;
this.render();
},
@ -156,6 +157,10 @@ define([
this._locked = locked;
},
setProtected: function (value) {
this._protected = value;
},
setMode: function(mode) {
this.mode = mode;
},
@ -288,7 +293,7 @@ define([
menu.items[3].setVisible(!requested);
menu.items[0].setDisabled(this._locked);
menu.items[3].setDisabled(this._locked);
menu.items[3].setDisabled(this._locked || this._protected);
menu.items[1].cmpEl.attr('data-value', record.get('certificateId')); // view certificate
menu.items[2].cmpEl.attr('data-value', signed ? 1 : 0); // view or edit signature settings
@ -307,7 +312,7 @@ define([
this.api.asc_ViewCertificate(item.cmpEl.attr('data-value'));
break;
case 2:
Common.NotificationCenter.trigger('protect:signature', 'visible', !!parseInt(item.cmpEl.attr('data-value')), guid);// can edit settings for requested signature
Common.NotificationCenter.trigger('protect:signature', 'visible', !!parseInt(item.cmpEl.attr('data-value')) || this._protected, guid);// can edit settings for requested signature
break;
case 3:
var me = this;