Merge pull request #1662 from ONLYOFFICE/fix/de-fix-smartart

[DE] Hide some text settings for smart arts
This commit is contained in:
Julia Radzhabova 2022-03-29 17:56:56 +03:00 committed by GitHub
commit 821cfc8820
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 5 deletions

View file

@ -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<SelectedObjects.length; i++)
@ -179,6 +180,7 @@ define([
settingsType = Common.Utils.documentSettingsType.Chart;
} else if (value.get_ShapeProperties() !== null) {
isChart = value.get_ShapeProperties().get_FromChart();
isSmartArtInternal = value.get_ShapeProperties().get_FromSmartArtInternal();
settingsType = Common.Utils.documentSettingsType.Shape;
if (value.get_ShapeProperties().asc_getTextArtProperties()) {
this._settings[Common.Utils.documentSettingsType.TextArt].props = value;
@ -189,6 +191,7 @@ define([
control_lock = control_lock || value.get_Locked();
} else if (settingsType == Common.Utils.documentSettingsType.Paragraph) {
this._settings[settingsType].panel.isChart = isChart;
this._settings[settingsType].panel.isSmartArtInternal = isSmartArtInternal;
can_add_table = value.get_CanAddTable();
control_lock = control_lock || value.get_Locked();
}

View file

@ -182,7 +182,7 @@
<label class="input-label"><%= scope.textAlign %></label>
<div id="paraadv-cmb-align"></div>
</div>
<div class="padding-large" style="display: inline-block;">
<div class="padding-large text-only" style="display: inline-block;">
<label class="input-label"><%= scope.textLeader %></label>
<div id="paraadv-cmb-leader"></div>
</div>

View file

@ -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) {

View file

@ -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') {

View file

@ -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
'<div id="<%= id %>" class="list-item" style="width: 100%;display:inline-block;">',
'<div style="width:117px;display: inline-block;"><%= value %></div>',
'<div style="width:121px;display: inline-block;"><%= displayTabAlign %></div>',
'<div style="width:96px;display: inline-block;"><%= displayTabLeader %></div>',
(this.isChart || this.isSmartArtInternal) ? '' : '<div style="width:96px;display: inline-block;"><%= displayTabLeader %></div>',
'</div>'
].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;