From 6beb87b3e9533ae85a70ca0705cd7c06f30203e5 Mon Sep 17 00:00:00 2001 From: "Julia.Radzhabova" Date: Fri, 16 May 2025 15:24:47 +0300 Subject: [PATCH] [DE] Fix captions for rtl paragraph --- .../main/app/template/ParagraphSettings.template | 4 ++-- .../app/template/ParagraphSettingsAdvanced.template | 4 ++-- apps/documenteditor/main/app/view/ParagraphSettings.js | 10 ++++++++++ .../main/app/view/ParagraphSettingsAdvanced.js | 7 +++++++ 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/apps/documenteditor/main/app/template/ParagraphSettings.template b/apps/documenteditor/main/app/template/ParagraphSettings.template index 7b52190e21..9b404d9f84 100644 --- a/apps/documenteditor/main/app/template/ParagraphSettings.template +++ b/apps/documenteditor/main/app/template/ParagraphSettings.template @@ -44,11 +44,11 @@ - +
- +
diff --git a/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template b/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template index dfc607a71e..45b56f8482 100644 --- a/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template +++ b/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template @@ -13,11 +13,11 @@
- +
- +
diff --git a/apps/documenteditor/main/app/view/ParagraphSettings.js b/apps/documenteditor/main/app/view/ParagraphSettings.js index 11df31099d..635c588bbd 100644 --- a/apps/documenteditor/main/app/view/ParagraphSettings.js +++ b/apps/documenteditor/main/app/view/ParagraphSettings.js @@ -236,6 +236,9 @@ define([ this.spinners.push(this.numIndentsRight); this.lockedControls.push(this.numIndentsRight); + this.lblIndentsLeft = $markup.findById('#paragraph-lbl-indent-left'); + this.lblIndentsRight = $markup.findById('#paragraph-lbl-indent-right'); + this.cmbSpecial = new Common.UI.ComboBox({ el: $markup.findById('#paragraph-combo-special'), cls: 'input-group-nr', @@ -540,6 +543,13 @@ define([ this._state.RightIndent=value; } + value = prop.asc_getRtlDirection(); + if (this._state.rtlDir !== value) { + this.lblIndentsLeft.text(value ? this.strSpacingBefore : this.strIndentsLeftText); + this.lblIndentsRight.text(value ? this.strSpacingAfter : this.strIndentsRightText); + this._state.rtlDir = value; + } + value = (first === 0) ? c_paragraphSpecial.NONE_SPECIAL : ((first > 0) ? c_paragraphSpecial.FIRST_LINE : c_paragraphSpecial.HANGING); if ( this._state.CurSpecial!==value ) { this.cmbSpecial.setValue(value); diff --git a/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js b/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js index 19b0c4d06e..1d5cea4bb2 100644 --- a/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js +++ b/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js @@ -186,6 +186,9 @@ define([ }, this)); this.spinners.push(this.numIndentsRight); + this.lblIndentsLeft = $('#paragraphadv-lbl-indent-left'); + this.lblIndentsRight = $('#paragraphadv-lbl-indent-right'); + this.numSpacingBefore = new Common.UI.MetricSpinner({ el: $('#paragraphadv-spin-spacing-before'), step: .1, @@ -896,6 +899,8 @@ define([ this.rbDirRtl.setValue(value, true); this.rbDirLtr.setValue(!value, true); } + this.lblIndentsLeft.text(value ? this.strIndentsSpacingBefore : this.strIndentsLeftText); + this.lblIndentsRight.text(value ? this.strIndentsSpacingAfter : this.strIndentsRightText); this.cmbTextAlignment.setValue((props.get_Jc() !== undefined && props.get_Jc() !== null) ? props.get_Jc() : ''); @@ -1506,6 +1511,8 @@ define([ onTextDirChange: function(field, newValue, eOpts) { if (newValue && this._changedProps) { this._changedProps.asc_putRtlDirection(field.options.value); + this.lblIndentsLeft.text(field.options.value ? this.strIndentsSpacingBefore : this.strIndentsLeftText); + this.lblIndentsRight.text(field.options.value ? this.strIndentsSpacingAfter : this.strIndentsRightText); } },