Merge pull request #1662 from ONLYOFFICE/fix/de-fix-smartart
[DE] Hide some text settings for smart arts
This commit is contained in:
commit
821cfc8820
|
@ -155,7 +155,8 @@ define([
|
||||||
this._settings[Common.Utils.documentSettingsType.MailMerge].locked = false;
|
this._settings[Common.Utils.documentSettingsType.MailMerge].locked = false;
|
||||||
this._settings[Common.Utils.documentSettingsType.Signature].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,
|
var control_props = this.api.asc_IsContentControl() ? this.api.asc_GetContentControlProperties() : null,
|
||||||
control_lock = false;
|
control_lock = false;
|
||||||
for (i=0; i<SelectedObjects.length; i++)
|
for (i=0; i<SelectedObjects.length; i++)
|
||||||
|
@ -179,6 +180,7 @@ define([
|
||||||
settingsType = Common.Utils.documentSettingsType.Chart;
|
settingsType = Common.Utils.documentSettingsType.Chart;
|
||||||
} else if (value.get_ShapeProperties() !== null) {
|
} else if (value.get_ShapeProperties() !== null) {
|
||||||
isChart = value.get_ShapeProperties().get_FromChart();
|
isChart = value.get_ShapeProperties().get_FromChart();
|
||||||
|
isSmartArtInternal = value.get_ShapeProperties().get_FromSmartArtInternal();
|
||||||
settingsType = Common.Utils.documentSettingsType.Shape;
|
settingsType = Common.Utils.documentSettingsType.Shape;
|
||||||
if (value.get_ShapeProperties().asc_getTextArtProperties()) {
|
if (value.get_ShapeProperties().asc_getTextArtProperties()) {
|
||||||
this._settings[Common.Utils.documentSettingsType.TextArt].props = value;
|
this._settings[Common.Utils.documentSettingsType.TextArt].props = value;
|
||||||
|
@ -189,6 +191,7 @@ define([
|
||||||
control_lock = control_lock || value.get_Locked();
|
control_lock = control_lock || value.get_Locked();
|
||||||
} else if (settingsType == Common.Utils.documentSettingsType.Paragraph) {
|
} else if (settingsType == Common.Utils.documentSettingsType.Paragraph) {
|
||||||
this._settings[settingsType].panel.isChart = isChart;
|
this._settings[settingsType].panel.isChart = isChart;
|
||||||
|
this._settings[settingsType].panel.isSmartArtInternal = isSmartArtInternal;
|
||||||
can_add_table = value.get_CanAddTable();
|
can_add_table = value.get_CanAddTable();
|
||||||
control_lock = control_lock || value.get_Locked();
|
control_lock = control_lock || value.get_Locked();
|
||||||
}
|
}
|
||||||
|
|
|
@ -182,7 +182,7 @@
|
||||||
<label class="input-label"><%= scope.textAlign %></label>
|
<label class="input-label"><%= scope.textAlign %></label>
|
||||||
<div id="paraadv-cmb-align"></div>
|
<div id="paraadv-cmb-align"></div>
|
||||||
</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>
|
<label class="input-label"><%= scope.textLeader %></label>
|
||||||
<div id="paraadv-cmb-leader"></div>
|
<div id="paraadv-cmb-leader"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1694,6 +1694,7 @@ define([
|
||||||
paragraphProps : elValue,
|
paragraphProps : elValue,
|
||||||
borderProps : me.borderAdvancedProps,
|
borderProps : me.borderAdvancedProps,
|
||||||
isChart : (item.isChart===true),
|
isChart : (item.isChart===true),
|
||||||
|
isSmartArtInternal : (item.isSmartArtInternal===true),
|
||||||
api : me.api,
|
api : me.api,
|
||||||
handler: function(result, value) {
|
handler: function(result, value) {
|
||||||
if (result == 'ok') {
|
if (result == 'ok') {
|
||||||
|
@ -4058,6 +4059,7 @@ define([
|
||||||
me.menuParagraphDirect270.setChecked(dir == Asc.c_oAscVertDrawingText.vert270);
|
me.menuParagraphDirect270.setChecked(dir == Asc.c_oAscVertDrawingText.vert270);
|
||||||
}
|
}
|
||||||
menuParagraphAdvanced.isChart = (value.imgProps && value.imgProps.isChart);
|
menuParagraphAdvanced.isChart = (value.imgProps && value.imgProps.isChart);
|
||||||
|
menuParagraphAdvanced.isSmartArtInternal = (value.imgProps && value.imgProps.isSmartArtInternal);
|
||||||
menuParagraphBreakBefore.setVisible(!isInShape && !isInChart && !isEquation);
|
menuParagraphBreakBefore.setVisible(!isInShape && !isInChart && !isEquation);
|
||||||
menuParagraphKeepLines.setVisible(!isInShape && !isInChart && !isEquation);
|
menuParagraphKeepLines.setVisible(!isInShape && !isInChart && !isEquation);
|
||||||
if (value.paraProps) {
|
if (value.paraProps) {
|
||||||
|
|
|
@ -87,6 +87,7 @@ define([
|
||||||
this.lockedControls = [];
|
this.lockedControls = [];
|
||||||
this._locked = true;
|
this._locked = true;
|
||||||
this.isChart = false;
|
this.isChart = false;
|
||||||
|
this.isSmartArtInternal = false;
|
||||||
|
|
||||||
this._arrLineRule = [
|
this._arrLineRule = [
|
||||||
{displayValue: this.textAtLeast,defaultValue: 5, value: c_paragraphLinerule.LINERULE_LEAST, minValue: 0.03, step: 0.01, defaultUnit: 'cm'},
|
{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.createDelayedElements();
|
||||||
|
|
||||||
this.disableControls(this._locked);
|
this.disableControls(this._locked);
|
||||||
this.hideTextOnlySettings(this.isChart);
|
this.hideTextOnlySettings(this.isChart || this.isSmartArtInternal);
|
||||||
|
|
||||||
if (prop) {
|
if (prop) {
|
||||||
var Spacing = {
|
var Spacing = {
|
||||||
|
@ -635,6 +636,7 @@ define([
|
||||||
paragraphProps: elValue,
|
paragraphProps: elValue,
|
||||||
borderProps: me.borderAdvancedProps,
|
borderProps: me.borderAdvancedProps,
|
||||||
isChart: me.isChart,
|
isChart: me.isChart,
|
||||||
|
isSmartArtInternal: me.isSmartArtInternal,
|
||||||
api: me.api,
|
api: me.api,
|
||||||
handler: function(result, value) {
|
handler: function(result, value) {
|
||||||
if (result == 'ok') {
|
if (result == 'ok') {
|
||||||
|
|
|
@ -95,6 +95,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
|
||||||
this.api = this.options.api;
|
this.api = this.options.api;
|
||||||
this._originalProps = new Asc.asc_CParagraphProperty(this.options.paragraphProps);
|
this._originalProps = new Asc.asc_CParagraphProperty(this.options.paragraphProps);
|
||||||
this.isChart = this.options.isChart;
|
this.isChart = this.options.isChart;
|
||||||
|
this.isSmartArtInternal = this.options.isSmartArtInternal;
|
||||||
|
|
||||||
this.CurLineRuleIdx = this._originalProps.get_Spacing().get_LineRule();
|
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 id="<%= id %>" class="list-item" style="width: 100%;display:inline-block;">',
|
||||||
'<div style="width:117px;display: inline-block;"><%= value %></div>',
|
'<div style="width:117px;display: inline-block;"><%= value %></div>',
|
||||||
'<div style="width:121px;display: inline-block;"><%= displayTabAlign %></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>'
|
'</div>'
|
||||||
].join('')),
|
].join('')),
|
||||||
tabindex: 1
|
tabindex: 1
|
||||||
|
@ -809,7 +810,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem
|
||||||
if (props ){
|
if (props ){
|
||||||
this._originalProps = new Asc.asc_CParagraphProperty(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.FirstLine = (props.get_Ind() !== null) ? props.get_Ind().get_FirstLine() : null;
|
||||||
this.LeftIndent = (props.get_Ind() !== null) ? props.get_Ind().get_Left() : null;
|
this.LeftIndent = (props.get_Ind() !== null) ? props.get_Ind().get_Left() : null;
|
||||||
|
|
Loading…
Reference in a new issue