[forms] changed Stretch menu order

This commit is contained in:
maxkadushkin
2026-02-19 17:38:48 +03:00
parent 2f60ea0c20
commit d587c00cc5
3 changed files with 22 additions and 10 deletions

View File

@ -236,8 +236,9 @@ define([], function () {
view.menuImgControlSettings.on('click', _.bind(me.onControlsSelect, me));
view.menuTableRemoveForm.on('click', _.bind(me.onControlsSelect, me));
view.menuTableRemoveControl.on('click', _.bind(me.onControlsSelect, me));
view.menuTableStretchControl.on('click', _.bind(me.onControlsSelect, me));
view.menuTableControlSettings.on('click', _.bind(me.onControlsSelect, me));
view.menuImgStretchContentControl.on('click', _.bind(me.onControlsSelect, me));
view.menuTableStretchContentControl.on('click', _.bind(me.onControlsSelect, me));
view.menuParaRemoveControl.on('click', _.bind(me.onControlsSelect, me));
view.menuParaControlSettings.on('click', _.bind(me.onControlsSelect, me));
view.menuTableCellAlign.menu.on('item:click', _.bind(me.tableCellsVAlign, me));
@ -2228,8 +2229,7 @@ define([], function () {
} else if (item.value == 'stretch') {
if ( me.api.asc_StretchFormToCell ) {
me.api.asc_StretchFormToCell(me.api.asc_GetCurrentContentControl());
} else
console.log('no asc_StretchFormToCell found');
}
} else if (item.value == 'remove') {
props.get_FormPr() ? this.api.asc_RemoveContentControl(props.get_InternalId()) : this.api.asc_RemoveContentControlWrapper(props.get_InternalId());
}

View File

@ -861,6 +861,18 @@ define([], function () {
})
});
me.menuImgStretchContentControl = new Common.UI.MenuItem({
// iconCls: 'menu__icon',
caption: me.textStretchControl,
value: 'stretch'
});
me.menuTableStretchContentControl = new Common.UI.MenuItem({
// iconCls: 'menu__icon',
caption: me.textStretchControl,
value: 'stretch'
});
this.pictureMenu = new Common.UI.Menu({
cls: 'shifted-right',
restoreHeightAndTop: true,
@ -942,6 +954,7 @@ define([], function () {
content_locked = lock_type==Asc.c_oAscSdtLockType.SdtContentLocked || lock_type==Asc.c_oAscSdtLockType.ContentLocked,
is_form = control_props && control_props.get_FormPr();
me.menuImgStretchContentControl.setVisible(in_control);
me.menuImgRemoveControl.setVisible(in_control);
me.menuImgControlSettings.setVisible(in_control && me.mode.canEditContentControl && !is_form);
menuImgControlSeparator.setVisible(in_control);
@ -1094,6 +1107,7 @@ define([], function () {
me.menuOriginalSize,
me.menuImgReplace,
me.menuChartEdit,
me.menuImgStretchContentControl,
me.menuImgEditPoints,
me.menuImageAdvanced
]
@ -1260,12 +1274,6 @@ define([], function () {
value: 'settings'
});
me.menuTableStretchControl = new Common.UI.MenuItem({
// iconCls: 'menu__icon',
caption: 'Stretch',
value: 'stretch'
});
var menuTableControl = new Common.UI.MenuItem({
caption: me.textContentControls,
menu : new Common.UI.Menu({
@ -1806,6 +1814,7 @@ define([], function () {
!value.paraProps.value.can_DeleteInlineContentControl() || !value.paraProps.value.can_EditInlineContentControl()) : false;
var in_toc = me.api.asc_GetTableOfContentsPr(true),
in_control = !in_toc && me.api.asc_IsContentControl();
me.menuTableStretchContentControl.setVisible(in_control);
if (in_control) {
var control_props = me.api.asc_GetContentControlProperties(),
lock_type = (control_props) ? control_props.get_Lock() : Asc.c_oAscSdtLockType.Unlocked,
@ -1884,8 +1893,8 @@ define([], function () {
menuHyperlinkTable,
me.menuTableFollow,
menuHyperlinkSeparator,
me.menuTableStretchContentControl,
me.menuTableRemoveForm,
me.menuTableStretchControl,
menuTableControl,
me.menuTableTOC,
me.menuParagraphAdvancedInTable,
@ -2455,6 +2464,7 @@ define([], function () {
var control_lock = (value.paraProps) ? (!value.paraProps.value.can_DeleteBlockContentControl() || !value.paraProps.value.can_EditBlockContentControl() ||
!value.paraProps.value.can_DeleteInlineContentControl() || !value.paraProps.value.can_EditInlineContentControl()) : false;
// me.menuStretchContentControl.setVisible(in_control);
me.menuParaRemoveControl.setVisible(in_control);
me.menuParaControlSettings.setVisible(in_control && me.mode.canEditContentControl && !is_form);
menuParaControlSeparator.setVisible(in_control);
@ -2531,6 +2541,7 @@ define([], function () {
me.menuEquationInsertCaption,
{ caption: '--' },
menuEquationSeparator,
// me.menuStretchContentControl,
me.menuParaRemoveControl,
me.menuParaControlSettings,
menuParaControlSeparator,

View File

@ -2469,6 +2469,7 @@
"DE.Views.DocumentHolder.textRemField": "Remove text field",
"DE.Views.DocumentHolder.textRemove": "Remove",
"DE.Views.DocumentHolder.textRemoveControl": "Remove content control",
"DE.Views.DocumentHolder.textStretchControl": "Stretch content control",
"DE.Views.DocumentHolder.textRemPicture": "Remove image",
"DE.Views.DocumentHolder.textRemRadioBox": "Remove Radio button",
"DE.Views.DocumentHolder.textReplace": "Replace image",