From f8781cdea17351be4ae1e7e7714c102ede1a97bb Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 19 Feb 2020 17:07:50 +0300 Subject: [PATCH] [DE] Fix Bug 44173 --- apps/documenteditor/main/app/view/DocumentHolder.js | 1 + apps/documenteditor/main/app/view/ImageSettings.js | 1 + apps/documenteditor/main/app/view/ImageSettingsAdvanced.js | 5 ++++- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/apps/documenteditor/main/app/view/DocumentHolder.js b/apps/documenteditor/main/app/view/DocumentHolder.js index 7e49f65df..2aee53dde 100644 --- a/apps/documenteditor/main/app/view/DocumentHolder.js +++ b/apps/documenteditor/main/app/view/DocumentHolder.js @@ -2341,6 +2341,7 @@ define([ var win = new DE.Views.ImageSettingsAdvanced({ imageProps : elValue, sizeOriginal: imgsizeOriginal, + api : me.api, sectionProps: me.api.asc_GetSectionProps(), handler : function(result, value) { if (result == 'ok') { diff --git a/apps/documenteditor/main/app/view/ImageSettings.js b/apps/documenteditor/main/app/view/ImageSettings.js index 3be09ca9b..d0c45b14e 100644 --- a/apps/documenteditor/main/app/view/ImageSettings.js +++ b/apps/documenteditor/main/app/view/ImageSettings.js @@ -538,6 +538,7 @@ define([ { imageProps: elValue, sizeOriginal: imgsizeOriginal, + api : me.api, sectionProps: me.api.asc_GetSectionProps(), handler: function(result, value) { if (result == 'ok') { diff --git a/apps/documenteditor/main/app/view/ImageSettingsAdvanced.js b/apps/documenteditor/main/app/view/ImageSettingsAdvanced.js index 783722a26..ef99d4253 100644 --- a/apps/documenteditor/main/app/view/ImageSettingsAdvanced.js +++ b/apps/documenteditor/main/app/view/ImageSettingsAdvanced.js @@ -103,6 +103,7 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat this.sectionProps = this.options.sectionProps; this.pageWidth = this.options.sectionProps ? this.options.sectionProps.get_W() : 210; this.pageHeight = this.options.sectionProps ? this.options.sectionProps.get_H() : 297; + this.api = this.options.api; this._changedProps = null; this._changedShapeProps = null; }, @@ -1300,9 +1301,11 @@ define([ 'text!documenteditor/main/app/template/ImageSettingsAdvanced.templat this.btnOriginalSize.setDisabled(props.get_ImageUrl()===null || props.get_ImageUrl()===undefined); this.btnsCategory[5].setVisible(shapeprops!==null && !shapeprops.get_FromChart()); // Shapes this.btnsCategory[6].setVisible(shapeprops!==null && !shapeprops.get_FromChart()); // Margins - this.btnsCategory[3].setDisabled(props.get_FromGroup()); // Wrapping this.btnsCategory[2].setVisible(!chartprops && (pluginGuid === null || pluginGuid === undefined)); // Rotation + var control_props = this.api && this.api.asc_IsContentControl() ? this.api.asc_GetContentControlProperties() : null; + this.btnsCategory[3].setDisabled(props.get_FromGroup() || !!control_props && (control_props.get_SpecificType()==Asc.c_oAscContentControlSpecificType.Picture)); // Wrapping + if (shapeprops) { this._objectType = Asc.c_oAscTypeSelectElement.Shape; this._setShapeDefaults(shapeprops);