From 8384644e01ee0edba19236d0faa255f3b184a75b Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Sat, 13 Nov 2021 14:59:46 +0300 Subject: [PATCH] [DE] Fix 51187 --- .../main/app/template/ShapeSettings.template | 22 ++++++++-------- .../main/app/view/ShapeSettings.js | 26 +++++++++++++++++-- 2 files changed, 35 insertions(+), 13 deletions(-) diff --git a/apps/documenteditor/main/app/template/ShapeSettings.template b/apps/documenteditor/main/app/template/ShapeSettings.template index 69c8f9757..b10fce0f6 100644 --- a/apps/documenteditor/main/app/template/ShapeSettings.template +++ b/apps/documenteditor/main/app/template/ShapeSettings.template @@ -1,15 +1,15 @@ - + - + - + - + - + - + - + - + - + @@ -203,12 +203,12 @@
- + - + diff --git a/apps/documenteditor/main/app/view/ShapeSettings.js b/apps/documenteditor/main/app/view/ShapeSettings.js index 93232f5d2..b221f5d54 100644 --- a/apps/documenteditor/main/app/view/ShapeSettings.js +++ b/apps/documenteditor/main/app/view/ShapeSettings.js @@ -102,7 +102,8 @@ define([ DisabledControls: false, HideShapeOnlySettings: false, HideChangeTypeSettings: false, - isFromImage: false + isFromImage: false, + isFixedForm: false }; this.lockedControls = []; this._locked = false; @@ -143,6 +144,8 @@ define([ this.TransparencyContainer = $('#shape-panel-transparent-fill'); this.ShapeOnlySettings = $('.shape-only'); this.CanChangeType = $('.change-type'); + this.NoFormSettings = $('.no-form'); + this.ShapeOnlySeparator = $('.shape-only-separator'); }, setApi: function(api) { @@ -764,6 +767,7 @@ define([ (new DE.Views.ImageSettingsAdvanced( { imageProps: elValue, + api: me.api, sectionProps: me.api.asc_GetSectionProps(), handler: function(result, value) { if (result == 'ok') { @@ -790,6 +794,15 @@ define([ if (this._initSettings) this.createDelayedElements(); + var control_props = this.api.asc_IsContentControl() ? this.api.asc_GetContentControlProperties() : null; + if (control_props) { + var spectype = control_props.get_SpecificType(); + control_props = (spectype==Asc.c_oAscContentControlSpecificType.CheckBox || spectype==Asc.c_oAscContentControlSpecificType.ComboBox || + spectype==Asc.c_oAscContentControlSpecificType.DropDownList || spectype==Asc.c_oAscContentControlSpecificType.None) && + control_props.get_FormPr() && control_props.get_FormPr().get_Fixed(); + } else + control_props = false; + if (props && props.get_ShapeProperties()) { var shapeprops = props.get_ShapeProperties(), @@ -805,7 +818,7 @@ define([ || shapetype=='bentConnector4' || shapetype=='bentConnector5' || shapetype=='curvedConnector2' || shapetype=='curvedConnector3' || shapetype=='curvedConnector4' || shapetype=='curvedConnector5' || shapetype=='straightConnector1'; - this.hideChangeTypeSettings(hidechangetype); + this.hideChangeTypeSettings(hidechangetype || control_props); this._state.isFromImage = !!shapeprops.get_FromImage(); if (!hidechangetype && this.btnChangeShape.menu.items.length) { this.btnChangeShape.menu.items[0].setVisible(shapeprops.get_FromImage()); @@ -1189,6 +1202,8 @@ define([ this._noApply = false; } + this.hideNoFormSettings(control_props); + this.ShapeOnlySeparator.toggleClass('hidden', (control_props || this._state.HideShapeOnlySettings)==true); }, createDelayedControls: function() { @@ -1959,6 +1974,13 @@ define([ } }, + hideNoFormSettings: function(value) { + if (this._state.isFixedForm !== value) { + this._state.isFixedForm = value; + this.NoFormSettings.toggleClass('hidden', value==true); + } + }, + onPositionChange: function(btn) { var pos = btn.getNumberValue(), minValue = (this.GradColor.currentIdx-1<0) ? 0 : this.GradColor.values[this.GradColor.currentIdx-1],
@@ -99,7 +99,7 @@
@@ -112,17 +112,17 @@
@@ -134,7 +134,7 @@
@@ -142,7 +142,7 @@