From 7e9c12061d8ba33aa24bdb6e63cbc01f324d88f8 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Mon, 28 Mar 2022 22:45:34 +0300 Subject: [PATCH] [DE] Hide some text settings for smart arts --- apps/documenteditor/main/app/controller/RightMenu.js | 5 ++++- .../main/app/template/ParagraphSettingsAdvanced.template | 2 +- apps/documenteditor/main/app/view/DocumentHolder.js | 2 ++ apps/documenteditor/main/app/view/ParagraphSettings.js | 4 +++- .../main/app/view/ParagraphSettingsAdvanced.js | 5 +++-- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/apps/documenteditor/main/app/controller/RightMenu.js b/apps/documenteditor/main/app/controller/RightMenu.js index ee9c25be2..c4cea9f25 100644 --- a/apps/documenteditor/main/app/controller/RightMenu.js +++ b/apps/documenteditor/main/app/controller/RightMenu.js @@ -155,7 +155,8 @@ define([ this._settings[Common.Utils.documentSettingsType.MailMerge].locked = false; this._settings[Common.Utils.documentSettingsType.Signature].locked = false; - var isChart = false; + var isChart = false, + isSmartArtInternal = false; var control_props = this.api.asc_IsContentControl() ? this.api.asc_GetContentControlProperties() : null, control_lock = false; for (i=0; i<%= scope.textAlign %>
-
+
diff --git a/apps/documenteditor/main/app/view/DocumentHolder.js b/apps/documenteditor/main/app/view/DocumentHolder.js index 5bb403590..0dbfbb093 100644 --- a/apps/documenteditor/main/app/view/DocumentHolder.js +++ b/apps/documenteditor/main/app/view/DocumentHolder.js @@ -1694,6 +1694,7 @@ define([ paragraphProps : elValue, borderProps : me.borderAdvancedProps, isChart : (item.isChart===true), + isSmartArtInternal : (item.isSmartArtInternal===true), api : me.api, handler: function(result, value) { if (result == 'ok') { @@ -4058,6 +4059,7 @@ define([ me.menuParagraphDirect270.setChecked(dir == Asc.c_oAscVertDrawingText.vert270); } menuParagraphAdvanced.isChart = (value.imgProps && value.imgProps.isChart); + menuParagraphAdvanced.isSmartArtInternal = (value.imgProps && value.imgProps.isSmartArtInternal); menuParagraphBreakBefore.setVisible(!isInShape && !isInChart && !isEquation); menuParagraphKeepLines.setVisible(!isInShape && !isInChart && !isEquation); if (value.paraProps) { diff --git a/apps/documenteditor/main/app/view/ParagraphSettings.js b/apps/documenteditor/main/app/view/ParagraphSettings.js index 25ac7509c..9fa0b41b3 100644 --- a/apps/documenteditor/main/app/view/ParagraphSettings.js +++ b/apps/documenteditor/main/app/view/ParagraphSettings.js @@ -87,6 +87,7 @@ define([ this.lockedControls = []; this._locked = true; this.isChart = false; + this.isSmartArtInternal = false; this._arrLineRule = [ {displayValue: this.textAtLeast,defaultValue: 5, value: c_paragraphLinerule.LINERULE_LEAST, minValue: 0.03, step: 0.01, defaultUnit: 'cm'}, @@ -452,7 +453,7 @@ define([ this.createDelayedElements(); this.disableControls(this._locked); - this.hideTextOnlySettings(this.isChart); + this.hideTextOnlySettings(this.isChart || this.isSmartArtInternal); if (prop) { var Spacing = { @@ -635,6 +636,7 @@ define([ paragraphProps: elValue, borderProps: me.borderAdvancedProps, isChart: me.isChart, + isSmartArtInternal: me.isSmartArtInternal, api: me.api, handler: function(result, value) { if (result == 'ok') { diff --git a/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js b/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js index 23801f3e6..4b34366ef 100644 --- a/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js +++ b/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js @@ -95,6 +95,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem this.api = this.options.api; this._originalProps = new Asc.asc_CParagraphProperty(this.options.paragraphProps); this.isChart = this.options.isChart; + this.isSmartArtInternal = this.options.isSmartArtInternal; this.CurLineRuleIdx = this._originalProps.get_Spacing().get_LineRule(); @@ -549,7 +550,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem '
', '
<%= value %>
', '
<%= displayTabAlign %>
', - '
<%= displayTabLeader %>
', + (this.isChart || this.isSmartArtInternal) ? '' : '
<%= displayTabLeader %>
', '
' ].join('')), tabindex: 1 @@ -809,7 +810,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem if (props ){ this._originalProps = new Asc.asc_CParagraphProperty(props); - this.hideTextOnlySettings(this.isChart); + this.hideTextOnlySettings(this.isChart || this.isSmartArtInternal); this.FirstLine = (props.get_Ind() !== null) ? props.get_Ind().get_FirstLine() : null; this.LeftIndent = (props.get_Ind() !== null) ? props.get_Ind().get_Left() : null;