[DE] Hide new content controls

This commit is contained in:
Julia Radzhabova 2020-07-20 17:33:32 +03:00
parent 56cf8b7653
commit 79e6a3fd71
2 changed files with 29 additions and 29 deletions

View file

@ -783,10 +783,10 @@ define([
toolbar.btnContentControls.setDisabled(paragraph_locked || header_locked);
if (!(paragraph_locked || header_locked)) {
var control_disable = control_plain || content_locked;
for (var i=0; i<14; i++)
for (var i=0; i<7; i++)
toolbar.btnContentControls.menu.items[i].setDisabled(control_disable);
toolbar.btnContentControls.menu.items[15].setDisabled(!in_control || lock_type==Asc.c_oAscSdtLockType.SdtContentLocked || lock_type==Asc.c_oAscSdtLockType.SdtLocked);
toolbar.btnContentControls.menu.items[17].setDisabled(!in_control);
toolbar.btnContentControls.menu.items[8].setDisabled(!in_control || lock_type==Asc.c_oAscSdtLockType.SdtContentLocked || lock_type==Asc.c_oAscSdtLockType.SdtLocked);
toolbar.btnContentControls.menu.items[10].setDisabled(!in_control);
}
var need_text_disable = paragraph_locked || header_locked || in_chart || rich_edit_lock || plain_edit_lock;

View file

@ -643,31 +643,31 @@ define([
value: 'checkbox'
},
{caption: '--'},
{
caption: this.textNewFieldControl,
value: 'new-field'
},
{
caption: this.textNewPictureControl,
value: 'new-picture'
},
{
caption: this.textNewComboboxControl,
value: 'new-combobox'
},
{
caption: this.textNewDropdownControl,
value: 'new-dropdown'
},
{
caption: this.textNewCheckboxControl,
value: 'new-checkbox'
},
{
caption: this.textNewRadioboxControl,
value: 'new-radiobox'
},
{caption: '--'},
// {
// caption: this.textNewFieldControl,
// value: 'new-field'
// },
// {
// caption: this.textNewPictureControl,
// value: 'new-picture'
// },
// {
// caption: this.textNewComboboxControl,
// value: 'new-combobox'
// },
// {
// caption: this.textNewDropdownControl,
// value: 'new-dropdown'
// },
// {
// caption: this.textNewCheckboxControl,
// value: 'new-checkbox'
// },
// {
// caption: this.textNewRadioboxControl,
// value: 'new-radiobox'
// },
// {caption: '--'},
{
caption: this.textRemoveControl,
// iconCls: 'menu__icon cc-remove',
@ -1982,7 +1982,7 @@ define([
this.btnMailRecepients.setVisible(mode.canCoAuthoring == true && mode.canUseMailMerge);
this.listStylesAdditionalMenuItem.setVisible(mode.canEditStyles);
this.btnContentControls.menu.items[17].setVisible(mode.canEditContentControl);
this.btnContentControls.menu.items[10].setVisible(mode.canEditContentControl);
this.mnuInsertImage.items[2].setVisible(this.mode.canRequestInsertImage || this.mode.fileChoiceUrl && this.mode.fileChoiceUrl.indexOf("{documentType}")>-1);
},