From 25984a5d42cde0026dd9591daee7cd27175927f1 Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Mon, 29 Jul 2019 12:24:16 +0300 Subject: [PATCH 01/15] [DE] Bug 40580 (Paragraph - Advanced Settings) --- .../main/app/controller/DocumentHolder.js | 13 + .../ParagraphSettingsAdvanced.template | 59 +++- .../main/app/view/ParagraphSettings.js | 17 +- .../app/view/ParagraphSettingsAdvanced.js | 301 ++++++++++++++++-- apps/documenteditor/main/locale/en.json | 28 +- 5 files changed, 377 insertions(+), 41 deletions(-) diff --git a/apps/documenteditor/main/app/controller/DocumentHolder.js b/apps/documenteditor/main/app/controller/DocumentHolder.js index 68271c84a2..96e94a3571 100644 --- a/apps/documenteditor/main/app/controller/DocumentHolder.js +++ b/apps/documenteditor/main/app/controller/DocumentHolder.js @@ -46,6 +46,19 @@ var c_paragraphLinerule = { LINERULE_EXACT: 2 }; +var c_paragraphSpecian = { + NONE_SPECIAN: 0, + FIRST_LINE: 1, + HANGING: 2 +}; + +var c_paragraphTextAlignment = { + RIGHT: 0, + LEFT: 1, + CENTERED: 2, + JUSTIFIED: 3 +}; + var c_pageNumPosition = { PAGE_NUM_POSITION_TOP: 0x01, PAGE_NUM_POSITION_BOTTOM: 0x02, diff --git a/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template b/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template index 6dc19d04e4..08d8c72062 100644 --- a/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template +++ b/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template @@ -1,23 +1,68 @@
- +
- - + + + - + + + + + + + + + + + + + +
- -
+
+ +
+ + +
+
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+
+
+
-
+
+
diff --git a/apps/documenteditor/main/app/view/ParagraphSettings.js b/apps/documenteditor/main/app/view/ParagraphSettings.js index e9e931b854..86e1a0e3b4 100644 --- a/apps/documenteditor/main/app/view/ParagraphSettings.js +++ b/apps/documenteditor/main/app/view/ParagraphSettings.js @@ -77,7 +77,8 @@ define([ AddInterval: false, BackColor: '#000000', DisabledControls: true, - HideTextOnlySettings: false + HideTextOnlySettings: false, + PrAlign: undefined }; this.spinners = []; this.lockedControls = []; @@ -183,8 +184,10 @@ define([ setApi: function(api) { this.api = api; - if (this.api) + if (this.api) { this.api.asc_registerCallback('asc_onParaSpacingLine', _.bind(this._onLineSpacing, this)); + this.api.asc_registerCallback('asc_onPrAlign', _.bind(this.onApiParagraphAlign, this)); + } return this; }, @@ -418,11 +421,15 @@ define([ borderProps: me.borderAdvancedProps, isChart: me.isChart, api: me.api, + textAlign: me._state.PrAlign, handler: function(result, value) { if (result == 'ok') { if (me.api) { me.borderAdvancedProps = value.borderProps; me.api.paraApply(value.paragraphProps); + setTimeout(function () { + me.api.put_PrAlign(value.horizontalAlign); + },50); } } me.fireEvent('editcomplete', me); @@ -482,6 +489,12 @@ define([ } }, + onApiParagraphAlign: function(align) { + if (this._state.PrAlign !== align) { + this._state.PrAlign = align; + } + }, + strParagraphSpacing: 'Paragraph Spacing', strSomeParagraphSpace: 'Don\'t add interval between paragraphs of the same style', strLineHeight: 'Line Spacing', diff --git a/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js b/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js index 15bdcfbfca..6fd95edea8 100644 --- a/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js +++ b/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js @@ -51,7 +51,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem DE.Views.ParagraphSettingsAdvanced = Common.Views.AdvancedSettingsWindow.extend(_.extend({ options: { - contentWidth: 335, + contentWidth: 370, height: 394, toggleGroup: 'paragraph-adv-settings-group', storageName: 'de-para-settings-adv-category' @@ -62,6 +62,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem title: this.textTitle, items: [ {panelId: 'id-adv-paragraph-indents', panelCaption: this.strParagraphIndents}, + {panelId: 'id-adv-paragraph-line', panelCaption: this.strParagraphLine}, {panelId: 'id-adv-paragraph-borders', panelCaption: this.strBorders}, {panelId: 'id-adv-paragraph-font', panelCaption: this.strParagraphFont}, {panelId: 'id-adv-paragraph-tabs', panelCaption: this.strTabs}, @@ -84,6 +85,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem this.Margins = undefined; this.FirstLine = undefined; this.LeftIndent = undefined; + this.Spacing = null; this.spinners = []; this.tableStylerRows = this.options.tableStylerRows; @@ -92,6 +94,42 @@ 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.CurLineRuleIdx = this._originalProps.asc_getSpacing().get_LineRule(); + + this._arrLineRule = [ + {displayValue: this.textAtLeast,defaultValue: 5, value: c_paragraphLinerule.LINERULE_LEAST, minValue: 0.03, step: 0.01, defaultUnit: 'cm'}, + {displayValue: this.textAuto, defaultValue: 1, value: c_paragraphLinerule.LINERULE_AUTO, minValue: 0.5, step: 0.01, defaultUnit: ''}, + {displayValue: this.textExact, defaultValue: 5, value: c_paragraphLinerule.LINERULE_EXACT, minValue: 0.03, step: 0.01, defaultUnit: 'cm'} + ]; + + this._arrSpecian = [ + {displayValue: this.textNoneSpecian, value: c_paragraphSpecian.NONE_SPECIAN}, + {displayValue: this.textFirstLine, value: c_paragraphSpecian.FIRST_LINE}, + {displayValue: this.textHanging, value: c_paragraphSpecian.HANGING} + ]; + this.CurSpecian = undefined; + + this._arrTextAlignment = [ + {displayValue: this.textLeft, value: c_paragraphTextAlignment.LEFT}, + {displayValue: this.textCentered, value: c_paragraphTextAlignment.CENTERED}, + {displayValue: this.textRight, value: c_paragraphTextAlignment.RIGHT}, + {displayValue: this.textJustified, value: c_paragraphTextAlignment.JUSTIFIED} + ]; + this.textAlign = this.options.textAlign; + + this._arrOutlinelevel = [ + {displayValue: this.textBodyText}, + {displayValue: this.textLevel + '1'}, + {displayValue: this.textLevel + '2'}, + {displayValue: this.textLevel + '3'}, + {displayValue: this.textLevel + '4'}, + {displayValue: this.textLevel + '5'}, + {displayValue: this.textLevel + '6'}, + {displayValue: this.textLevel + '7'}, + {displayValue: this.textLevel + '8'}, + {displayValue: this.textLevel + '9'} + ]; }, render: function() { @@ -101,25 +139,6 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem // Indents & Placement - this.numFirstLine = new Common.UI.MetricSpinner({ - el: $('#paragraphadv-spin-first-line'), - step: .1, - width: 85, - defaultUnit : "cm", - defaultValue : 0, - value: '0 cm', - maxValue: 55.87, - minValue: -55.87 - }); - this.numFirstLine.on('change', _.bind(function(field, newValue, oldValue, eOpts){ - if (this._changedProps) { - if (this._changedProps.get_Ind()===null || this._changedProps.get_Ind()===undefined) - this._changedProps.put_Ind(new Asc.asc_CParagraphInd()); - this._changedProps.get_Ind().put_FirstLine(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue())); - } - }, this)); - this.spinners.push(this.numFirstLine); - this.numIndentsLeft = new Common.UI.MetricSpinner({ el: $('#paragraphadv-spin-indent-left'), step: .1, @@ -158,6 +177,117 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem }, this)); this.spinners.push(this.numIndentsRight); + this.numSpacingBefore = new Common.UI.MetricSpinner({ + el: $('#paragraphadv-spin-spacing-before'), + step: .1, + width: 85, + value: '', + defaultUnit : "cm", + maxValue: 55.88, + minValue: 0, + allowAuto : true, + autoText : this.txtAutoText + }); + this.numSpacingBefore.on('change', _.bind(function (field, newValue, oldValue, eOpts) { + if (this.Spacing === null) { + var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty(); + this.Spacing = properties.asc_getSpacing(); + } + this.Spacing.Before = Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()); + }, this)); + this.spinners.push(this.numSpacingBefore); + + this.numSpacingAfter = new Common.UI.MetricSpinner({ + el: $('#paragraphadv-spin-spacing-after'), + step: .1, + width: 85, + value: '', + defaultUnit : "cm", + maxValue: 55.88, + minValue: 0, + allowAuto : true, + autoText : this.txtAutoText + }); + this.numSpacingAfter.on('change', _.bind(function (field, newValue, oldValue, eOpts) { + if (this.Spacing === null) { + var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty(); + this.Spacing = properties.asc_getSpacing(); + } + this.Spacing.After = Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()); + }, this)); + this.spinners.push(this.numSpacingAfter); + + this.cmbLineRule = new Common.UI.ComboBox({ + el: $('#paragraphadv-spin-line-rule'), + cls: 'input-group-nr', + editable: false, + data: this._arrLineRule, + style: 'width: 85px;' + }); + this.cmbLineRule.setValue(this.CurLineRuleIdx); + this.cmbLineRule.on('selected', _.bind(this.onLineRuleSelect, this)); + + this.numLineHeight = new Common.UI.MetricSpinner({ + el: $('#paragraphadv-spin-line-height'), + step: .01, + width: 85, + value: '', + defaultUnit : "", + maxValue: 132, + minValue: 0.5 + }); + this.spinners.push(this.numLineHeight); + this.numLineHeight.on('change', _.bind(this.onNumLineHeightChange, this)); + + this.chAddInterval = new Common.UI.CheckBox({ + el: $('#paragraphadv-checkbox-add-interval'), + labelText: this.strSomeParagraphSpace + }); + + this.cmbSpecian = new Common.UI.ComboBox({ + el: $('#paragraphadv-spin-specian'), + cls: 'input-group-nr', + editable: false, + data: this._arrSpecian, + style: 'width: 85px;' + }); + this.cmbSpecian.setValue(''); + this.cmbSpecian.on('selected', _.bind(this.onSpecianSelect, this)); + + this.numSpecianBy = new Common.UI.MetricSpinner({ + el: $('#paragraphadv-spin-specian-by'), + step: .1, + width: 85, + defaultUnit : "cm", + defaultValue : 0, + value: '0 cm', + maxValue: 55.87, + minValue: 0 + }); + this.spinners.push(this.numSpecianBy); + this.numSpecianBy.on('change', _.bind(this.onFirstLineChange, this)); + + this.cmbTextAlignment = new Common.UI.ComboBox({ + el: $('#paragraphadv-spin-text-alignment'), + cls: 'input-group-nr', + editable: false, + data: this._arrTextAlignment, + style: 'width: 175px;' + }); + this.cmbTextAlignment.setValue(''); + + this.cmbOutlinelevel = new Common.UI.ComboBox({ + el: $('#paragraphadv-spin-outline-level'), + cls: 'input-group-nr', + editable: false, + data: this._arrOutlinelevel, + style: 'width: 175px;' + }); + this.cmbOutlinelevel.setValue(''); + this.cmbOutlinelevel.on('selected', _.bind(this.onOutlinelevelSelect, this)); + + // Line & Page Breaks + this.chBreakBefore = new Common.UI.CheckBox({ el: $('#paragraphadv-checkbox-break-before'), labelText: this.strBreakBefore @@ -600,7 +730,16 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem } } - return { paragraphProps: this._changedProps, borderProps: {borderSize: this.BorderSize, borderColor: this.btnBorderColor.color} }; + if (this.Spacing !== null) { + this._changedProps.asc_putSpacing(this.Spacing); + } + + var spaceBetweenPrg = this.chAddInterval.getValue(); + this._changedProps.asc_putContextualSpacing(spaceBetweenPrg == 'checked'); + + var horizontalAlign = this.cmbTextAlignment.getValue(); + + return { paragraphProps: this._changedProps, borderProps: {borderSize: this.BorderSize, borderColor: this.btnBorderColor.color}, horizontalAlign: horizontalAlign }; }, _setDefaults: function(props) { @@ -610,13 +749,34 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem this.hideTextOnlySettings(this.isChart); this.FirstLine = (props.get_Ind() !== null) ? props.get_Ind().get_FirstLine() : null; - this.numFirstLine.setValue(this.FirstLine!== null ? Common.Utils.Metric.fnRecalcFromMM(this.FirstLine) : '', true); this.LeftIndent = (props.get_Ind() !== null) ? props.get_Ind().get_Left() : null; if (this.FirstLine<0 && this.LeftIndent !== null) this.LeftIndent = this.LeftIndent + this.FirstLine; this.numIndentsLeft.setValue(this.LeftIndent!==null ? Common.Utils.Metric.fnRecalcFromMM(this.LeftIndent) : '', true); this.numIndentsRight.setValue((props.get_Ind() !== null && props.get_Ind().get_Right() !== null) ? Common.Utils.Metric.fnRecalcFromMM(props.get_Ind().get_Right()) : '', true); + this.numSpacingBefore.setValue((props.asc_getSpacing() !== null && props.asc_getSpacing().asc_getBefore() !== null) ? Common.Utils.Metric.fnRecalcFromMM(props.asc_getSpacing().asc_getBefore()) : '', true); + this.numSpacingAfter.setValue((props.asc_getSpacing() !== null && props.asc_getSpacing().asc_getAfter() !== null) ? Common.Utils.Metric.fnRecalcFromMM(props.asc_getSpacing().asc_getAfter()) : '', true); + + var linerule = props.asc_getSpacing().asc_getLineRule(); + this.cmbLineRule.setValue((linerule !== null) ? linerule : '', true); + + if(props.asc_getSpacing() !== null && props.asc_getSpacing().asc_getLine() !== null) { + this.numLineHeight.setValue((linerule==c_paragraphLinerule.LINERULE_AUTO) ? props.asc_getSpacing().asc_getLine() : Common.Utils.Metric.fnRecalcFromMM(props.asc_getSpacing().asc_getLine()), true); + } else { + this.numLineHeight.setValue('', true); + } + + this.chAddInterval.setValue((props.asc_getContextualSpacing() !== null && props.asc_getContextualSpacing() !== undefined) ? props.asc_getContextualSpacing() : 'indeterminate', true); + + if(this.CurSpecian === undefined) { + this.CurSpecian = (props.asc_getInd().get_FirstLine() === 0) ? c_paragraphSpecian.NONE_SPECIAN : ((props.asc_getInd().get_FirstLine() > 0) ? c_paragraphSpecian.FIRST_LINE : c_paragraphSpecian.HANGING); + } + this.cmbSpecian.setValue(this.CurSpecian); + this.numSpecianBy.setValue(this.FirstLine!== null ? Math.abs(Common.Utils.Metric.fnRecalcFromMM(this.FirstLine)) : '', true); + + this.cmbTextAlignment.setValue(this.textAlign !== undefined ? this.textAlign : c_paragraphTextAlignment.LEFT, true); + this.chKeepLines.setValue((props.get_KeepLines() !== null && props.get_KeepLines() !== undefined) ? props.get_KeepLines() : 'indeterminate', true); this.chBreakBefore.setValue((props.get_PageBreakBefore() !== null && props.get_PageBreakBefore() !== undefined) ? props.get_PageBreakBefore() : 'indeterminate', true); @@ -723,13 +883,19 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem for (var i=0; i 0 ) { + this.CurSpecian = c_paragraphSpecian.FIRST_LINE; + this.cmbSpecian.setValue(c_paragraphSpecian.FIRST_LINE); + } else if (value === 0) { + this.CurSpecian = c_paragraphSpecian.NONE_SPECIAN; + this.cmbSpecian.setValue(c_paragraphSpecian.NONE_SPECIAN); + } + this._changedProps.get_Ind().put_FirstLine(value); + } + }, + + onOutlinelevelSelect: function(combo, record) { + + }, + textTitle: 'Paragraph - Advanced Settings', strIndentsFirstLine: 'First line', - strIndentsLeftText: 'Left', - strIndentsRightText: 'Right', - strParagraphIndents: 'Indents & Placement', + strIndentsLeftText: 'Indentation Left', + strIndentsRightText: 'Indentation Right', + strParagraphIndents: 'Indents & Spacing', strParagraphPosition: 'Placement', strParagraphFont: 'Font', strBreakBefore: 'Page break before', @@ -1217,6 +1440,28 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem tipOuter: 'Set Outer Border Only', noTabs: 'The specified tabs will appear in this field', textLeader: 'Leader', - textNone: 'None' + textNone: 'None', + strParagraphLine: 'Line & Page Breaks', + strIndentsSpacingBefore: 'Spacing Before', + strIndentsSpacingAfter: 'Spacing After', + strIndentLineSpacingAt: 'At', + strIndentsLineSpacing: 'Line Spacing', + txtAutoText: 'Auto', + textAuto: 'Multiple', + textAtLeast: 'At least', + textExact: 'Exactly', + strSomeParagraphSpace: 'Don\'t add interval between paragraphs of the same style', + strIndentsSpecian: 'Specian', + textNoneSpecian: '(none)', + textFirstLine: 'First line', + textHanging: 'Hanging', + strIndentsSpecianBy: 'By', + textCentered: 'Centered', + textJustified: 'Justified', + textBodyText: 'BodyText', + textLevel: 'Level ', + strIndentsTextAlignment: 'Text Alignment', + strIndentsOutlinelevel: 'Outline level' + }, DE.Views.ParagraphSettingsAdvanced || {})); }); \ No newline at end of file diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index 8304508793..23c1b1c70a 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -1706,15 +1706,14 @@ "DE.Views.ParagraphSettingsAdvanced.strBorders": "Borders & Fill", "DE.Views.ParagraphSettingsAdvanced.strBreakBefore": "Page break before", "DE.Views.ParagraphSettingsAdvanced.strDoubleStrike": "Double strikethrough", - "DE.Views.ParagraphSettingsAdvanced.strIndentsFirstLine": "First Line", - "DE.Views.ParagraphSettingsAdvanced.strIndentsLeftText": "Left", - "DE.Views.ParagraphSettingsAdvanced.strIndentsRightText": "Right", + "DE.Views.ParagraphSettingsAdvanced.strIndentsLeftText": "Indentation Left", + "DE.Views.ParagraphSettingsAdvanced.strIndentsRightText": "Indentation Right", "DE.Views.ParagraphSettingsAdvanced.strKeepLines": "Keep lines together", "DE.Views.ParagraphSettingsAdvanced.strKeepNext": "Keep with next", "DE.Views.ParagraphSettingsAdvanced.strMargins": "Paddings", "DE.Views.ParagraphSettingsAdvanced.strOrphan": "Orphan control", "DE.Views.ParagraphSettingsAdvanced.strParagraphFont": "Font", - "DE.Views.ParagraphSettingsAdvanced.strParagraphIndents": "Indents & Placement", + "DE.Views.ParagraphSettingsAdvanced.strParagraphIndents": "Indents & Spacing", "DE.Views.ParagraphSettingsAdvanced.strParagraphPosition": "Placement", "DE.Views.ParagraphSettingsAdvanced.strSmallCaps": "Small caps", "DE.Views.ParagraphSettingsAdvanced.strStrike": "Strikethrough", @@ -1755,6 +1754,27 @@ "DE.Views.ParagraphSettingsAdvanced.tipRight": "Set right border only", "DE.Views.ParagraphSettingsAdvanced.tipTop": "Set top border only", "DE.Views.ParagraphSettingsAdvanced.txtNoBorders": "No borders", + "DE.Views.ParagraphSettingsAdvanced.strParagraphLine": "Line & Page Breaks", + "DE.Views.ParagraphSettingsAdvanced.strIndentsSpacingBefore": "Spacing Before", + "DE.Views.ParagraphSettingsAdvanced.strIndentsSpacingAfter": "Spacing After", + "DE.Views.ParagraphSettingsAdvanced.strIndentLineSpacingAt": "At", + "DE.Views.ParagraphSettingsAdvanced.strIndentsLineSpacing": "Line Spacing", + "DE.Views.ParagraphSettingsAdvanced.txtAutoText": "Auto", + "DE.Views.ParagraphSettingsAdvanced.textAuto": "Multiple", + "DE.Views.ParagraphSettingsAdvanced.textAtLeast": "At least", + "DE.Views.ParagraphSettingsAdvanced.textExact": "Exactly", + "DE.Views.ParagraphSettingsAdvanced.strSomeParagraphSpace": "Don't add interval between paragraphs of the same style", + "DE.Views.ParagraphSettingsAdvanced.strIndentsSpecian": "Specian", + "DE.Views.ParagraphSettingsAdvanced.textNoneSpecian": "(none)", + "DE.Views.ParagraphSettingsAdvanced.textFirstLine": "First line", + "DE.Views.ParagraphSettingsAdvanced.textHanging": "Hanging", + "DE.Views.ParagraphSettingsAdvanced.strIndentsSpecianBy": "By", + "DE.Views.ParagraphSettingsAdvanced.textCentered": "Centered", + "DE.Views.ParagraphSettingsAdvanced.textJustified": "Justified", + "DE.Views.ParagraphSettingsAdvanced.textBodyText": "BodyText", + "DE.Views.ParagraphSettingsAdvanced.textLevel": "Level ", + "DE.Views.ParagraphSettingsAdvanced.strIndentsTextAlignment": "Text Alignment", + "DE.Views.ParagraphSettingsAdvanced.strIndentsOutlinelevel": "Outline level", "DE.Views.RightMenu.txtChartSettings": "Chart settings", "DE.Views.RightMenu.txtHeaderFooterSettings": "Header and footer settings", "DE.Views.RightMenu.txtImageSettings": "Image settings", From 34eee2f1b569293f14d419aefd6f89540e8c6355 Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Mon, 29 Jul 2019 16:10:49 +0300 Subject: [PATCH 02/15] [DE] Bug 40580 (Paragraph - Advanced Settings) refactoring --- .../main/app/view/ParagraphSettings.js | 12 ----- .../app/view/ParagraphSettingsAdvanced.js | 53 +++++++++++++------ apps/documenteditor/main/locale/en.json | 6 +-- 3 files changed, 40 insertions(+), 31 deletions(-) diff --git a/apps/documenteditor/main/app/view/ParagraphSettings.js b/apps/documenteditor/main/app/view/ParagraphSettings.js index 86e1a0e3b4..0759a14523 100644 --- a/apps/documenteditor/main/app/view/ParagraphSettings.js +++ b/apps/documenteditor/main/app/view/ParagraphSettings.js @@ -78,7 +78,6 @@ define([ BackColor: '#000000', DisabledControls: true, HideTextOnlySettings: false, - PrAlign: undefined }; this.spinners = []; this.lockedControls = []; @@ -186,7 +185,6 @@ define([ this.api = api; if (this.api) { this.api.asc_registerCallback('asc_onParaSpacingLine', _.bind(this._onLineSpacing, this)); - this.api.asc_registerCallback('asc_onPrAlign', _.bind(this.onApiParagraphAlign, this)); } return this; }, @@ -421,15 +419,11 @@ define([ borderProps: me.borderAdvancedProps, isChart: me.isChart, api: me.api, - textAlign: me._state.PrAlign, handler: function(result, value) { if (result == 'ok') { if (me.api) { me.borderAdvancedProps = value.borderProps; me.api.paraApply(value.paragraphProps); - setTimeout(function () { - me.api.put_PrAlign(value.horizontalAlign); - },50); } } me.fireEvent('editcomplete', me); @@ -489,12 +483,6 @@ define([ } }, - onApiParagraphAlign: function(align) { - if (this._state.PrAlign !== align) { - this._state.PrAlign = align; - } - }, - strParagraphSpacing: 'Paragraph Spacing', strSomeParagraphSpace: 'Don\'t add interval between paragraphs of the same style', strLineHeight: 'Line Spacing', diff --git a/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js b/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js index 6fd95edea8..804c7c778c 100644 --- a/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js +++ b/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js @@ -104,9 +104,9 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem ]; this._arrSpecian = [ - {displayValue: this.textNoneSpecian, value: c_paragraphSpecian.NONE_SPECIAN}, - {displayValue: this.textFirstLine, value: c_paragraphSpecian.FIRST_LINE}, - {displayValue: this.textHanging, value: c_paragraphSpecian.HANGING} + {displayValue: this.textNoneSpecian, value: c_paragraphSpecian.NONE_SPECIAN, defaultValue: 0}, + {displayValue: this.textFirstLine, value: c_paragraphSpecian.FIRST_LINE, defaultValue: 27}, + {displayValue: this.textHanging, value: c_paragraphSpecian.HANGING, defaultValue: 27} ]; this.CurSpecian = undefined; @@ -116,7 +116,6 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem {displayValue: this.textRight, value: c_paragraphTextAlignment.RIGHT}, {displayValue: this.textJustified, value: c_paragraphTextAlignment.JUSTIFIED} ]; - this.textAlign = this.options.textAlign; this._arrOutlinelevel = [ {displayValue: this.textBodyText}, @@ -222,7 +221,8 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem cls: 'input-group-nr', editable: false, data: this._arrLineRule, - style: 'width: 85px;' + style: 'width: 85px;', + menuStyle : 'min-width: 85px;' }); this.cmbLineRule.setValue(this.CurLineRuleIdx); this.cmbLineRule.on('selected', _.bind(this.onLineRuleSelect, this)); @@ -249,7 +249,8 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem cls: 'input-group-nr', editable: false, data: this._arrSpecian, - style: 'width: 85px;' + style: 'width: 85px;', + menuStyle : 'min-width: 85px;' }); this.cmbSpecian.setValue(''); this.cmbSpecian.on('selected', _.bind(this.onSpecianSelect, this)); @@ -272,7 +273,8 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem cls: 'input-group-nr', editable: false, data: this._arrTextAlignment, - style: 'width: 175px;' + style: 'width: 175px;', + menuStyle : 'min-width: 175px;' }); this.cmbTextAlignment.setValue(''); @@ -281,7 +283,8 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem cls: 'input-group-nr', editable: false, data: this._arrOutlinelevel, - style: 'width: 175px;' + style: 'width: 175px;', + menuStyle : 'min-width: 175px;' }); this.cmbOutlinelevel.setValue(''); this.cmbOutlinelevel.on('selected', _.bind(this.onOutlinelevelSelect, this)); @@ -738,8 +741,9 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem this._changedProps.asc_putContextualSpacing(spaceBetweenPrg == 'checked'); var horizontalAlign = this.cmbTextAlignment.getValue(); + this._changedProps.asc_putJc((horizontalAlign !== undefined && horizontalAlign !== null) ? horizontalAlign : c_paragraphTextAlignment.LEFT); - return { paragraphProps: this._changedProps, borderProps: {borderSize: this.BorderSize, borderColor: this.btnBorderColor.color}, horizontalAlign: horizontalAlign }; + return { paragraphProps: this._changedProps, borderProps: {borderSize: this.BorderSize, borderColor: this.btnBorderColor.color} }; }, _setDefaults: function(props) { @@ -775,7 +779,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem this.cmbSpecian.setValue(this.CurSpecian); this.numSpecianBy.setValue(this.FirstLine!== null ? Math.abs(Common.Utils.Metric.fnRecalcFromMM(this.FirstLine)) : '', true); - this.cmbTextAlignment.setValue(this.textAlign !== undefined ? this.textAlign : c_paragraphTextAlignment.LEFT, true); + this.cmbTextAlignment.setValue((props.asc_getJc() !== undefined && props.asc_getJc() !== null) ? props.asc_getJc() : c_paragraphTextAlignment.LEFT, true); this.chKeepLines.setValue((props.get_KeepLines() !== null && props.get_KeepLines() !== undefined) ? props.get_KeepLines() : 'indeterminate', true); this.chBreakBefore.setValue((props.get_PageBreakBefore() !== null && props.get_PageBreakBefore() !== undefined) ? props.get_PageBreakBefore() : 'indeterminate', true); @@ -1338,7 +1342,14 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem this.numLineHeight.setDefaultUnit(this._arrLineRule[record.value].defaultUnit); this.numLineHeight.setMinValue(this._arrLineRule[record.value].minValue); this.numLineHeight.setStep(this._arrLineRule[record.value].step); - this.numLineHeight.setValue((this.Spacing.LineRule == c_paragraphLinerule.LINERULE_AUTO) ? this._arrLineRule[record.value].defaultValue : Common.Utils.Metric.fnRecalcFromMM(this._arrLineRule[record.value].defaultValue)); + var value = this.numLineHeight.getNumberValue(); + if (this.Spacing.LineRule === c_paragraphLinerule.LINERULE_AUTO) { + this.numLineHeight.setValue(this._arrLineRule[record.value].defaultValue); + } else if (this.CurLineRuleIdx === c_paragraphLinerule.LINERULE_AUTO) { + this.numLineHeight.setValue(Common.Utils.Metric.fnRecalcFromMM(this._arrLineRule[record.value].defaultValue)); + } else { + this.numLineHeight.setValue(value); + } this.CurLineRuleIdx = record.value; } }, @@ -1355,11 +1366,21 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem onSpecianSelect: function(combo, record) { this.CurSpecian = record.value; - this.numSpecianBy.setValue(0, true); + if (this.CurSpecian === c_paragraphSpecian.NONE_SPECIAN) { + this.numSpecianBy.setValue(0, true); + } if (this._changedProps) { if (this._changedProps.get_Ind()===null || this._changedProps.get_Ind()===undefined) this._changedProps.put_Ind(new Asc.asc_CParagraphInd()); - this._changedProps.get_Ind().put_FirstLine(0); + var value = Common.Utils.Metric.fnRecalcToMM(this.numSpecianBy.getNumberValue()); + if (value === 0) { + this.numSpecianBy.setValue(Common.Utils.Metric.fnRecalcFromMM(this._arrSpecian[record.value].defaultValue)); + value = this._arrSpecian[record.value].defaultValue; + } + if (this.CurSpecian === c_paragraphSpecian.HANGING) { + value = -value; + } + this._changedProps.get_Ind().put_FirstLine(value); } }, @@ -1387,8 +1408,8 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem textTitle: 'Paragraph - Advanced Settings', strIndentsFirstLine: 'First line', - strIndentsLeftText: 'Indentation Left', - strIndentsRightText: 'Indentation Right', + strIndentsLeftText: 'Indent Left', + strIndentsRightText: 'Indent Right', strParagraphIndents: 'Indents & Spacing', strParagraphPosition: 'Placement', strParagraphFont: 'Font', @@ -1451,7 +1472,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem textAtLeast: 'At least', textExact: 'Exactly', strSomeParagraphSpace: 'Don\'t add interval between paragraphs of the same style', - strIndentsSpecian: 'Specian', + strIndentsSpecian: 'Special', textNoneSpecian: '(none)', textFirstLine: 'First line', textHanging: 'Hanging', diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index 23c1b1c70a..28e2c65b87 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -1706,8 +1706,8 @@ "DE.Views.ParagraphSettingsAdvanced.strBorders": "Borders & Fill", "DE.Views.ParagraphSettingsAdvanced.strBreakBefore": "Page break before", "DE.Views.ParagraphSettingsAdvanced.strDoubleStrike": "Double strikethrough", - "DE.Views.ParagraphSettingsAdvanced.strIndentsLeftText": "Indentation Left", - "DE.Views.ParagraphSettingsAdvanced.strIndentsRightText": "Indentation Right", + "DE.Views.ParagraphSettingsAdvanced.strIndentsLeftText": "Indent Left", + "DE.Views.ParagraphSettingsAdvanced.strIndentsRightText": "Indent Right", "DE.Views.ParagraphSettingsAdvanced.strKeepLines": "Keep lines together", "DE.Views.ParagraphSettingsAdvanced.strKeepNext": "Keep with next", "DE.Views.ParagraphSettingsAdvanced.strMargins": "Paddings", @@ -1764,7 +1764,7 @@ "DE.Views.ParagraphSettingsAdvanced.textAtLeast": "At least", "DE.Views.ParagraphSettingsAdvanced.textExact": "Exactly", "DE.Views.ParagraphSettingsAdvanced.strSomeParagraphSpace": "Don't add interval between paragraphs of the same style", - "DE.Views.ParagraphSettingsAdvanced.strIndentsSpecian": "Specian", + "DE.Views.ParagraphSettingsAdvanced.strIndentsSpecian": "Special", "DE.Views.ParagraphSettingsAdvanced.textNoneSpecian": "(none)", "DE.Views.ParagraphSettingsAdvanced.textFirstLine": "First line", "DE.Views.ParagraphSettingsAdvanced.textHanging": "Hanging", From c370141f8c7685e10105f47e8c653dde050b856c Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Wed, 31 Jul 2019 11:45:21 +0300 Subject: [PATCH 03/15] [DE] Fix Paragraph - Advanced Settings (Bug 40580) --- .../main/app/controller/DocumentHolder.js | 4 +- .../ParagraphSettingsAdvanced.template | 12 +-- .../app/view/ParagraphSettingsAdvanced.js | 74 +++++++++---------- apps/documenteditor/main/locale/en.json | 6 +- 4 files changed, 48 insertions(+), 48 deletions(-) diff --git a/apps/documenteditor/main/app/controller/DocumentHolder.js b/apps/documenteditor/main/app/controller/DocumentHolder.js index 96e94a3571..18f1a82d51 100644 --- a/apps/documenteditor/main/app/controller/DocumentHolder.js +++ b/apps/documenteditor/main/app/controller/DocumentHolder.js @@ -46,8 +46,8 @@ var c_paragraphLinerule = { LINERULE_EXACT: 2 }; -var c_paragraphSpecian = { - NONE_SPECIAN: 0, +var c_paragraphSpecial = { + NONE_SPECIAL: 0, FIRST_LINE: 1, HANGING: 2 }; diff --git a/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template b/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template index 08d8c72062..c87896ecbe 100644 --- a/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template +++ b/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template @@ -21,12 +21,12 @@
@@ -47,14 +47,14 @@
- + diff --git a/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js b/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js index 804c7c778c..24a0cd4f48 100644 --- a/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js +++ b/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js @@ -103,12 +103,12 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem {displayValue: this.textExact, defaultValue: 5, value: c_paragraphLinerule.LINERULE_EXACT, minValue: 0.03, step: 0.01, defaultUnit: 'cm'} ]; - this._arrSpecian = [ - {displayValue: this.textNoneSpecian, value: c_paragraphSpecian.NONE_SPECIAN, defaultValue: 0}, - {displayValue: this.textFirstLine, value: c_paragraphSpecian.FIRST_LINE, defaultValue: 27}, - {displayValue: this.textHanging, value: c_paragraphSpecian.HANGING, defaultValue: 27} + this._arrSpecial = [ + {displayValue: this.textNoneSpecial, value: c_paragraphSpecial.NONE_SPECIAL, defaultValue: 0}, + {displayValue: this.textFirstLine, value: c_paragraphSpecial.FIRST_LINE, defaultValue: 12.7}, + {displayValue: this.textHanging, value: c_paragraphSpecial.HANGING, defaultValue: 12.7} ]; - this.CurSpecian = undefined; + this.CurSpecial = undefined; this._arrTextAlignment = [ {displayValue: this.textLeft, value: c_paragraphTextAlignment.LEFT}, @@ -244,19 +244,19 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem labelText: this.strSomeParagraphSpace }); - this.cmbSpecian = new Common.UI.ComboBox({ - el: $('#paragraphadv-spin-specian'), + this.cmbSpecial = new Common.UI.ComboBox({ + el: $('#paragraphadv-spin-special'), cls: 'input-group-nr', editable: false, - data: this._arrSpecian, + data: this._arrSpecial, style: 'width: 85px;', menuStyle : 'min-width: 85px;' }); - this.cmbSpecian.setValue(''); - this.cmbSpecian.on('selected', _.bind(this.onSpecianSelect, this)); + this.cmbSpecial.setValue(''); + this.cmbSpecial.on('selected', _.bind(this.onSpecialSelect, this)); - this.numSpecianBy = new Common.UI.MetricSpinner({ - el: $('#paragraphadv-spin-specian-by'), + this.numSpecialBy = new Common.UI.MetricSpinner({ + el: $('#paragraphadv-spin-special-by'), step: .1, width: 85, defaultUnit : "cm", @@ -265,8 +265,8 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem maxValue: 55.87, minValue: 0 }); - this.spinners.push(this.numSpecianBy); - this.numSpecianBy.on('change', _.bind(this.onFirstLineChange, this)); + this.spinners.push(this.numSpecialBy); + this.numSpecialBy.on('change', _.bind(this.onFirstLineChange, this)); this.cmbTextAlignment = new Common.UI.ComboBox({ el: $('#paragraphadv-spin-text-alignment'), @@ -773,11 +773,11 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem this.chAddInterval.setValue((props.asc_getContextualSpacing() !== null && props.asc_getContextualSpacing() !== undefined) ? props.asc_getContextualSpacing() : 'indeterminate', true); - if(this.CurSpecian === undefined) { - this.CurSpecian = (props.asc_getInd().get_FirstLine() === 0) ? c_paragraphSpecian.NONE_SPECIAN : ((props.asc_getInd().get_FirstLine() > 0) ? c_paragraphSpecian.FIRST_LINE : c_paragraphSpecian.HANGING); + if(this.CurSpecial === undefined) { + this.CurSpecial = (props.asc_getInd().get_FirstLine() === 0) ? c_paragraphSpecial.NONE_SPECIAL : ((props.asc_getInd().get_FirstLine() > 0) ? c_paragraphSpecial.FIRST_LINE : c_paragraphSpecial.HANGING); } - this.cmbSpecian.setValue(this.CurSpecian); - this.numSpecianBy.setValue(this.FirstLine!== null ? Math.abs(Common.Utils.Metric.fnRecalcFromMM(this.FirstLine)) : '', true); + this.cmbSpecial.setValue(this.CurSpecial); + this.numSpecialBy.setValue(this.FirstLine!== null ? Math.abs(Common.Utils.Metric.fnRecalcFromMM(this.FirstLine)) : '', true); this.cmbTextAlignment.setValue((props.asc_getJc() !== undefined && props.asc_getJc() !== null) ? props.asc_getJc() : c_paragraphTextAlignment.LEFT, true); @@ -1328,8 +1328,8 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem hideTextOnlySettings: function(value) { this.TextOnlySettings.toggleClass('hidden', value==true); - this.btnsCategory[1].setVisible(!value); // Borders - this.btnsCategory[4].setVisible(!value); // Paddings + this.btnsCategory[2].setVisible(!value); // Borders + this.btnsCategory[5].setVisible(!value); // Paddings }, onLineRuleSelect: function(combo, record) { @@ -1364,20 +1364,20 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem this.Spacing.Line = (this.cmbLineRule.getValue()==c_paragraphLinerule.LINERULE_AUTO) ? field.getNumberValue() : Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()); }, - onSpecianSelect: function(combo, record) { - this.CurSpecian = record.value; - if (this.CurSpecian === c_paragraphSpecian.NONE_SPECIAN) { - this.numSpecianBy.setValue(0, true); + onSpecialSelect: function(combo, record) { + this.CurSpecial = record.value; + if (this.CurSpecial === c_paragraphSpecial.NONE_SPECIAL) { + this.numSpecialBy.setValue(0, true); } if (this._changedProps) { if (this._changedProps.get_Ind()===null || this._changedProps.get_Ind()===undefined) this._changedProps.put_Ind(new Asc.asc_CParagraphInd()); - var value = Common.Utils.Metric.fnRecalcToMM(this.numSpecianBy.getNumberValue()); + var value = Common.Utils.Metric.fnRecalcToMM(this.numSpecialBy.getNumberValue()); if (value === 0) { - this.numSpecianBy.setValue(Common.Utils.Metric.fnRecalcFromMM(this._arrSpecian[record.value].defaultValue)); - value = this._arrSpecian[record.value].defaultValue; + this.numSpecialBy.setValue(Common.Utils.Metric.fnRecalcFromMM(this._arrSpecial[record.value].defaultValue), true); + value = this._arrSpecial[record.value].defaultValue; } - if (this.CurSpecian === c_paragraphSpecian.HANGING) { + if (this.CurSpecial === c_paragraphSpecial.HANGING) { value = -value; } this._changedProps.get_Ind().put_FirstLine(value); @@ -1389,14 +1389,14 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem if (this._changedProps.get_Ind()===null || this._changedProps.get_Ind()===undefined) this._changedProps.put_Ind(new Asc.asc_CParagraphInd()); var value = Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()); - if (this.CurSpecian === c_paragraphSpecian.HANGING) { + if (this.CurSpecial === c_paragraphSpecial.HANGING) { value = -value; - } else if (this.CurSpecian === c_paragraphSpecian.NONE_SPECIAN && value > 0 ) { - this.CurSpecian = c_paragraphSpecian.FIRST_LINE; - this.cmbSpecian.setValue(c_paragraphSpecian.FIRST_LINE); + } else if (this.CurSpecial === c_paragraphSpecial.NONE_SPECIAL && value > 0 ) { + this.CurSpecial = c_paragraphSpecial.FIRST_LINE; + this.cmbSpecial.setValue(c_paragraphSpecial.FIRST_LINE); } else if (value === 0) { - this.CurSpecian = c_paragraphSpecian.NONE_SPECIAN; - this.cmbSpecian.setValue(c_paragraphSpecian.NONE_SPECIAN); + this.CurSpecial = c_paragraphSpecial.NONE_SPECIAL; + this.cmbSpecial.setValue(c_paragraphSpecial.NONE_SPECIAL); } this._changedProps.get_Ind().put_FirstLine(value); } @@ -1472,11 +1472,11 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem textAtLeast: 'At least', textExact: 'Exactly', strSomeParagraphSpace: 'Don\'t add interval between paragraphs of the same style', - strIndentsSpecian: 'Special', - textNoneSpecian: '(none)', + strIndentsSpecial: 'Special', + textNoneSpecial: '(none)', textFirstLine: 'First line', textHanging: 'Hanging', - strIndentsSpecianBy: 'By', + strIndentsSpecialBy: 'By', textCentered: 'Centered', textJustified: 'Justified', textBodyText: 'BodyText', diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index 28e2c65b87..67b29a0faf 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -1764,11 +1764,11 @@ "DE.Views.ParagraphSettingsAdvanced.textAtLeast": "At least", "DE.Views.ParagraphSettingsAdvanced.textExact": "Exactly", "DE.Views.ParagraphSettingsAdvanced.strSomeParagraphSpace": "Don't add interval between paragraphs of the same style", - "DE.Views.ParagraphSettingsAdvanced.strIndentsSpecian": "Special", - "DE.Views.ParagraphSettingsAdvanced.textNoneSpecian": "(none)", + "DE.Views.ParagraphSettingsAdvanced.strIndentsSpecial": "Special", + "DE.Views.ParagraphSettingsAdvanced.textNoneSpecial": "(none)", "DE.Views.ParagraphSettingsAdvanced.textFirstLine": "First line", "DE.Views.ParagraphSettingsAdvanced.textHanging": "Hanging", - "DE.Views.ParagraphSettingsAdvanced.strIndentsSpecianBy": "By", + "DE.Views.ParagraphSettingsAdvanced.strIndentsSpecialBy": "By", "DE.Views.ParagraphSettingsAdvanced.textCentered": "Centered", "DE.Views.ParagraphSettingsAdvanced.textJustified": "Justified", "DE.Views.ParagraphSettingsAdvanced.textBodyText": "BodyText", From aacf8db1293ba45b763f0c5b80b6f2efa582909d Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Wed, 31 Jul 2019 13:55:08 +0300 Subject: [PATCH 04/15] [DE] Fix Paragraph - Advanced Settings (Bug 40580) --- .../main/app/template/ParagraphSettingsAdvanced.template | 4 ++-- .../documenteditor/main/app/view/ParagraphSettingsAdvanced.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template b/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template index c87896ecbe..89520082f2 100644 --- a/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template +++ b/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template @@ -48,12 +48,12 @@ - - - - - - - From 4af90803b033710be3332b2ba895adb86988f358 Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Mon, 5 Aug 2019 09:30:33 +0300 Subject: [PATCH 06/15] [DE] Fix paragraph settings layout (Tabs) --- .../ParagraphSettingsAdvanced.template | 56 +++++++------- .../app/view/ParagraphSettingsAdvanced.js | 73 +++++++++++++------ 2 files changed, 81 insertions(+), 48 deletions(-) diff --git a/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template b/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template index 6c75c348e3..fe9a000b8d 100644 --- a/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template +++ b/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template @@ -172,32 +172,36 @@
-
-
- -
-
-
- -
-
-
-
-
-
- -
-
-
- -
-
-
-
- - - -
+
+
+ +
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+
+
+
+
+
+
+ + + +
diff --git a/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js b/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js index 7455e78849..114a7fd461 100644 --- a/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js +++ b/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js @@ -58,6 +58,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem }, initialize : function(options) { + var me = this; _.extend(this.options, { title: this.textTitle, items: [ @@ -129,6 +130,28 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem {displayValue: this.textLevel + '8'}, {displayValue: this.textLevel + '9'} ]; + + this._arrTabAlign = [ + { value: 1, displayValue: this.textTabLeft }, + { value: 3, displayValue: this.textTabCenter }, + { value: 2, displayValue: this.textTabRight } + ]; + this._arrKeyTabAlign = []; + this._arrTabAlign.forEach(function(item) { + me._arrKeyTabAlign[item.value] = item.displayValue; + }); + + this._arrTabLeader = [ + { value: Asc.c_oAscTabLeader.None, displayValue: this.textNone }, + { value: Asc.c_oAscTabLeader.Dot, displayValue: '....................' }, + { value: Asc.c_oAscTabLeader.Hyphen, displayValue: '-----------------' }, + { value: Asc.c_oAscTabLeader.MiddleDot, displayValue: '·················' }, + { value: Asc.c_oAscTabLeader.Underscore,displayValue: '__________' } + ]; + this._arrKeyTabLeader = []; + this._arrTabLeader.forEach(function(item) { + me._arrKeyTabLeader[item.value] = item.displayValue; + }); }, render: function() { @@ -504,7 +527,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem this.numTab = new Common.UI.MetricSpinner({ el: $('#paraadv-spin-tab'), step: .1, - width: 180, + width: 95, defaultUnit : "cm", value: '1.25 cm', maxValue: 55.87, @@ -515,7 +538,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem this.numDefaultTab = new Common.UI.MetricSpinner({ el: $('#paraadv-spin-default-tab'), step: .1, - width: 107, + width: 95, defaultUnit : "cm", value: '1.25 cm', maxValue: 55.87, @@ -531,7 +554,15 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem this.tabList = new Common.UI.ListView({ el: $('#paraadv-list-tabs'), emptyText: this.noTabs, - store: new Common.UI.DataViewStore() + store: new Common.UI.DataViewStore(), + template: _.template(['
'].join('')), + itemTemplate: _.template([ + '
', + '
<%= value %>
', + '
<%= displayTabAlign %>
', + '
<%= displayTabLeader %>
', + '
' + ].join('')) }); this.tabList.store.comparator = function(rec) { return rec.get("tabPos"); @@ -548,31 +579,21 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem this.cmbAlign = new Common.UI.ComboBox({ el : $('#paraadv-cmb-align'), - style : 'width: 85px;', - menuStyle : 'min-width: 85px;', + style : 'width: 95px;', + menuStyle : 'min-width: 95px;', editable : false, cls : 'input-group-nr', - data : [ - { value: 1, displayValue: this.textTabLeft }, - { value: 3, displayValue: this.textTabCenter }, - { value: 2, displayValue: this.textTabRight } - ] + data : this._arrTabAlign }); this.cmbAlign.setValue(1); this.cmbLeader = new Common.UI.ComboBox({ el : $('#paraadv-cmb-leader'), - style : 'width: 85px;', - menuStyle : 'min-width: 85px;', + style : 'width: 95px;', + menuStyle : 'min-width: 95px;', editable : false, cls : 'input-group-nr', - data : [ - { value: Asc.c_oAscTabLeader.None, displayValue: this.textNone }, - { value: Asc.c_oAscTabLeader.Dot, displayValue: '....................' }, - { value: Asc.c_oAscTabLeader.Hyphen, displayValue: '-----------------' }, - { value: Asc.c_oAscTabLeader.MiddleDot, displayValue: '·················' }, - { value: Asc.c_oAscTabLeader.Underscore,displayValue: '__________' } - ] + data : this._arrTabLeader }); this.cmbLeader.setValue(Asc.c_oAscTabLeader.None); @@ -866,7 +887,9 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem tabPos: pos, value: parseFloat(pos.toFixed(3)) + ' ' + Common.Utils.Metric.getCurrentMetricName(), tabAlign: tab.get_Value(), - tabLeader: tab.asc_getLeader() + tabLeader: tab.asc_getLeader(), + displayTabLeader: this._arrKeyTabLeader[tab.asc_getLeader()], + displayTabAlign: this._arrKeyTabAlign[tab.get_Value()] }); arr.push(rec); } @@ -1265,7 +1288,9 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem addTab: function(btn, eOpts){ var val = this.numTab.getNumberValue(), align = this.cmbAlign.getValue(), - leader = this.cmbLeader.getValue(); + leader = this.cmbLeader.getValue(), + displayAlign = this._arrKeyTabAlign[align], + displayLeader = this._arrKeyTabLeader[leader]; var store = this.tabList.store; var rec = store.find(function(record){ @@ -1274,6 +1299,8 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem if (rec) { rec.set('tabAlign', align); rec.set('tabLeader', leader); + rec.set('displayTabAlign', displayAlign); + rec.set('displayTabLeader', displayLeader); this._tabListChanged = true; } else { rec = new Common.UI.DataViewModel(); @@ -1281,7 +1308,9 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem tabPos: val, value: val + ' ' + Common.Utils.Metric.getCurrentMetricName(), tabAlign: align, - tabLeader: leader + tabLeader: leader, + displayTabLeader: displayLeader, + displayTabAlign: displayAlign }); store.add(rec); } From bfd3116618c5de7249c91aede0277234a0cb4273 Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Tue, 6 Aug 2019 11:55:20 +0300 Subject: [PATCH 07/15] [DE] Fix paragraph settings layout --- .../ParagraphSettingsAdvanced.template | 184 ++++++++---------- .../app/view/ParagraphSettingsAdvanced.js | 12 +- 2 files changed, 83 insertions(+), 113 deletions(-) diff --git a/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template b/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template index fe9a000b8d..82a503dee5 100644 --- a/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template +++ b/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template @@ -1,65 +1,59 @@
-
- -
+ +
- -
+ +
-
+
+
+
diff --git a/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js b/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js index 24a0cd4f48..7455e78849 100644 --- a/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js +++ b/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js @@ -1328,6 +1328,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem hideTextOnlySettings: function(value) { this.TextOnlySettings.toggleClass('hidden', value==true); + this.btnsCategory[1].setVisible(!value); // Line & Page Breaks this.btnsCategory[2].setVisible(!value); // Borders this.btnsCategory[5].setVisible(!value); // Paddings }, From 49dbcefce3f16be36a97172f7e78d9d945b70303 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 31 Jul 2019 14:54:10 +0300 Subject: [PATCH 05/15] [DE] Fix paragraph settings layout --- .../app/template/ParagraphSettingsAdvanced.template | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template b/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template index 89520082f2..6c75c348e3 100644 --- a/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template +++ b/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template @@ -30,25 +30,25 @@
+
+
+
+
+
- - - - - - - - - - - - - - - - - - - - - - -
+
+
-
+ +
-
+ + +
+
-
+ +
-
+ +
-
+ +
-
+ + +
+
-
+ +
-
+ +
-
+ +
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -89,15 +83,15 @@
-
+
-
-
+
+
@@ -115,60 +109,38 @@
-
- - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
-
-
-
-
-
-
-
-
-
-
-
- -
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
-
+ +
-
-
-
-
-
+
+
+
+
+
@@ -206,27 +178,25 @@
- - - - - - - - - -
+
+
-
+ +
-
+ + +
+
-
+ +
-
+
+
\ No newline at end of file diff --git a/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js b/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js index 114a7fd461..4284b50a6c 100644 --- a/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js +++ b/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js @@ -296,8 +296,8 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem cls: 'input-group-nr', editable: false, data: this._arrTextAlignment, - style: 'width: 175px;', - menuStyle : 'min-width: 175px;' + style: 'width: 173px;', + menuStyle : 'min-width: 173px;' }); this.cmbTextAlignment.setValue(''); @@ -306,8 +306,8 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem cls: 'input-group-nr', editable: false, data: this._arrOutlinelevel, - style: 'width: 175px;', - menuStyle : 'min-width: 175px;' + style: 'width: 174px;', + menuStyle : 'min-width: 174px;' }); this.cmbOutlinelevel.setValue(''); this.cmbOutlinelevel.on('selected', _.bind(this.onOutlinelevelSelect, this)); @@ -482,7 +482,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem this.numSpacing = new Common.UI.MetricSpinner({ el: $('#paragraphadv-spin-spacing'), step: .01, - width: 100, + width: 90, defaultUnit : "cm", defaultValue : 0, value: '0 cm', @@ -504,7 +504,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem this.numPosition = new Common.UI.MetricSpinner({ el: $('#paragraphadv-spin-position'), step: .01, - width: 100, + width: 90, defaultUnit : "cm", defaultValue : 0, value: '0 cm', From 2bf82e73a245a5405cdde0a558bab4d12c3367cd Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Wed, 7 Aug 2019 10:22:41 +0300 Subject: [PATCH 08/15] [PE] Change Paragraph - Advanced Settings --- .../main/app/controller/DocumentHolder.js | 13 + .../ParagraphSettingsAdvanced.template | 99 +++-- .../app/view/ParagraphSettingsAdvanced.js | 338 +++++++++++++++--- apps/presentationeditor/main/locale/en.json | 23 +- 4 files changed, 382 insertions(+), 91 deletions(-) diff --git a/apps/presentationeditor/main/app/controller/DocumentHolder.js b/apps/presentationeditor/main/app/controller/DocumentHolder.js index 48168be0db..e5bd95ede1 100644 --- a/apps/presentationeditor/main/app/controller/DocumentHolder.js +++ b/apps/presentationeditor/main/app/controller/DocumentHolder.js @@ -63,6 +63,19 @@ var c_tableBorder = { BORDER_OUTER_TABLE: 13 // table border and outer cell borders }; +var c_paragraphTextAlignment = { + RIGHT: 0, + LEFT: 1, + CENTERED: 2, + JUSTIFIED: 3 +}; + +var c_paragraphSpecial = { + NONE_SPECIAL: 0, + FIRST_LINE: 1, + HANGING: 2 +}; + define([ 'core', 'presentationeditor/main/app/view/DocumentHolder' diff --git a/apps/presentationeditor/main/app/template/ParagraphSettingsAdvanced.template b/apps/presentationeditor/main/app/template/ParagraphSettingsAdvanced.template index 961b81080f..06eb74685a 100644 --- a/apps/presentationeditor/main/app/template/ParagraphSettingsAdvanced.template +++ b/apps/presentationeditor/main/app/template/ParagraphSettingsAdvanced.template @@ -1,26 +1,57 @@
- - - - - - -
- -
-
- -
-
- -
-
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+
+
+
+
+
- +
@@ -71,28 +102,28 @@
-
-
- -
-
-
+
+
-
-
+
+
+ +
+
+
+ +
+
-
- -
-
-
+
+
- - - + + +
\ No newline at end of file diff --git a/apps/presentationeditor/main/app/view/ParagraphSettingsAdvanced.js b/apps/presentationeditor/main/app/view/ParagraphSettingsAdvanced.js index 8c16332fb0..221196684e 100644 --- a/apps/presentationeditor/main/app/view/ParagraphSettingsAdvanced.js +++ b/apps/presentationeditor/main/app/view/ParagraphSettingsAdvanced.js @@ -49,13 +49,14 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced PE.Views.ParagraphSettingsAdvanced = Common.Views.AdvancedSettingsWindow.extend(_.extend({ options: { - contentWidth: 320, + contentWidth: 370, height: 394, toggleGroup: 'paragraph-adv-settings-group', storageName: 'pe-para-settings-adv-category' }, initialize : function(options) { + var me = this; _.extend(this.options, { title: this.textTitle, items: [ @@ -74,9 +75,43 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced this._noApply = true; this._tabListChanged = false; this.spinners = []; + this.FirstLine = undefined; + this.Spacing = null; this.api = this.options.api; this._originalProps = new Asc.asc_CParagraphProperty(this.options.paragraphProps); + + this._arrLineRule = [ + {displayValue: this.textAuto, defaultValue: 1, value: c_paragraphLinerule.LINERULE_AUTO, minValue: 0.5, step: 0.01, defaultUnit: ''}, + {displayValue: this.textExact, defaultValue: 5, value: c_paragraphLinerule.LINERULE_EXACT, minValue: 0.03, step: 0.01, defaultUnit: 'cm'} + ]; + + var curLineRule = this._originalProps.asc_getSpacing().get_LineRule(), + curItem = _.findWhere(this._arrLineRule, {value: curLineRule}); + this.CurLineRuleIdx = this._arrLineRule.indexOf(curItem); + + this._arrTextAlignment = [ + {displayValue: this.textLeft, value: c_paragraphTextAlignment.LEFT}, + {displayValue: this.textCentered, value: c_paragraphTextAlignment.CENTERED}, + {displayValue: this.textRight, value: c_paragraphTextAlignment.RIGHT}, + {displayValue: this.textJustified, value: c_paragraphTextAlignment.JUSTIFIED} + ]; + + this._arrSpecial = [ + {displayValue: this.textNoneSpecial, value: c_paragraphSpecial.NONE_SPECIAL, defaultValue: 0}, + {displayValue: this.textFirstLine, value: c_paragraphSpecial.FIRST_LINE, defaultValue: 12.7}, + {displayValue: this.textHanging, value: c_paragraphSpecial.HANGING, defaultValue: 12.7} + ]; + + this._arrTabAlign = [ + { value: 1, displayValue: this.textTabLeft }, + { value: 3, displayValue: this.textTabCenter }, + { value: 2, displayValue: this.textTabRight } + ]; + this._arrKeyTabAlign = []; + this._arrTabAlign.forEach(function(item) { + me._arrKeyTabAlign[item.value] = item.displayValue; + }); }, render: function() { @@ -86,24 +121,15 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced // Indents & Placement - this.numFirstLine = new Common.UI.MetricSpinner({ - el: $('#paragraphadv-spin-first-line'), - step: .1, - width: 85, - defaultUnit : "cm", - defaultValue : 0, - value: '0 cm', - maxValue: 55.87, - minValue: -55.87 + this.cmbTextAlignment = new Common.UI.ComboBox({ + el: $('#paragraphadv-spin-text-alignment'), + cls: 'input-group-nr', + editable: false, + data: this._arrTextAlignment, + style: 'width: 173px;', + menuStyle : 'min-width: 173px;' }); - this.numFirstLine.on('change', _.bind(function(field, newValue, oldValue, eOpts){ - if (this._changedProps) { - if (this._changedProps.get_Ind()===null || this._changedProps.get_Ind()===undefined) - this._changedProps.put_Ind(new Asc.asc_CParagraphInd()); - this._changedProps.get_Ind().put_FirstLine(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue())); - } - }, this)); - this.spinners.push(this.numFirstLine); + this.cmbTextAlignment.setValue(''); this.numIndentsLeft = new Common.UI.MetricSpinner({ el: $('#paragraphadv-spin-indent-left'), @@ -122,9 +148,6 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced this._changedProps.put_Ind(new Asc.asc_CParagraphInd()); this._changedProps.get_Ind().put_Left(Common.Utils.Metric.fnRecalcToMM(numval)); } - this.numFirstLine.setMinValue(-numval); - if (this.numFirstLine.getNumberValue() < -numval) - this.numFirstLine.setValue(-numval); }, this)); this.spinners.push(this.numIndentsLeft); @@ -147,6 +170,93 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced }, this)); this.spinners.push(this.numIndentsRight); + this.cmbSpecial = new Common.UI.ComboBox({ + el: $('#paragraphadv-spin-special'), + cls: 'input-group-nr', + editable: false, + data: this._arrSpecial, + style: 'width: 85px;', + menuStyle : 'min-width: 85px;' + }); + this.cmbSpecial.setValue(''); + this.cmbSpecial.on('selected', _.bind(this.onSpecialSelect, this)); + + this.numSpecialBy = new Common.UI.MetricSpinner({ + el: $('#paragraphadv-spin-special-by'), + step: .1, + width: 85, + defaultUnit : "cm", + defaultValue : 0, + value: '0 cm', + maxValue: 55.87, + minValue: 0 + }); + this.spinners.push(this.numSpecialBy); + this.numSpecialBy.on('change', _.bind(this.onFirstLineChange, this)); + + this.numSpacingBefore = new Common.UI.MetricSpinner({ + el: $('#paragraphadv-spin-spacing-before'), + step: .1, + width: 85, + value: '', + defaultUnit : "cm", + maxValue: 55.88, + minValue: 0, + allowAuto : true, + autoText : this.txtAutoText + }); + this.numSpacingBefore.on('change', _.bind(function (field, newValue, oldValue, eOpts) { + if (this.Spacing === null) { + var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty(); + this.Spacing = properties.asc_getSpacing(); + } + this.Spacing.Before = Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()); + }, this)); + this.spinners.push(this.numSpacingBefore); + + this.numSpacingAfter = new Common.UI.MetricSpinner({ + el: $('#paragraphadv-spin-spacing-after'), + step: .1, + width: 85, + value: '', + defaultUnit : "cm", + maxValue: 55.88, + minValue: 0, + allowAuto : true, + autoText : this.txtAutoText + }); + this.numSpacingAfter.on('change', _.bind(function (field, newValue, oldValue, eOpts) { + if (this.Spacing === null) { + var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty(); + this.Spacing = properties.asc_getSpacing(); + } + this.Spacing.After = Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()); + }, this)); + this.spinners.push(this.numSpacingAfter); + + this.cmbLineRule = new Common.UI.ComboBox({ + el: $('#paragraphadv-spin-line-rule'), + cls: 'input-group-nr', + editable: false, + data: this._arrLineRule, + style: 'width: 85px;', + menuStyle : 'min-width: 85px;' + }); + this.cmbLineRule.setValue(this.CurLineRuleIdx); + this.cmbLineRule.on('selected', _.bind(this.onLineRuleSelect, this)); + + this.numLineHeight = new Common.UI.MetricSpinner({ + el: $('#paragraphadv-spin-line-height'), + step: .01, + width: 85, + value: '', + defaultUnit : "", + maxValue: 132, + minValue: 0.5 + }); + this.spinners.push(this.numLineHeight); + this.numLineHeight.on('change', _.bind(this.onNumLineHeightChange, this)); + // Font this.chStrike = new Common.UI.CheckBox({ @@ -211,7 +321,7 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced this.numTab = new Common.UI.MetricSpinner({ el: $('#paraadv-spin-tab'), step: .1, - width: 180, + width: 128, defaultUnit : "cm", value: '1.25 cm', maxValue: 55.87, @@ -222,7 +332,7 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced this.numDefaultTab = new Common.UI.MetricSpinner({ el: $('#paraadv-spin-default-tab'), step: .1, - width: 107, + width: 128, defaultUnit : "cm", value: '1.25 cm', maxValue: 55.87, @@ -238,7 +348,14 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced this.tabList = new Common.UI.ListView({ el: $('#paraadv-list-tabs'), emptyText: this.noTabs, - store: new Common.UI.DataViewStore() + store: new Common.UI.DataViewStore(), + template: _.template(['
'].join('')), + itemTemplate: _.template([ + '
', + '
<%= value %>
', + '
<%= displayTabAlign %>
', + '
' + ].join('')) }); this.tabList.store.comparator = function(rec) { return rec.get("tabPos"); @@ -253,24 +370,15 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced this.listenTo(this.tabList.store, 'remove', storechanged); this.listenTo(this.tabList.store, 'reset', storechanged); - this.radioLeft = new Common.UI.RadioBox({ - el: $('#paragraphadv-radio-left'), - labelText: this.textTabLeft, - name: 'asc-radio-tab', - checked: true - }); - - this.radioCenter = new Common.UI.RadioBox({ - el: $('#paragraphadv-radio-center'), - labelText: this.textTabCenter, - name: 'asc-radio-tab' - }); - - this.radioRight = new Common.UI.RadioBox({ - el: $('#paragraphadv-radio-right'), - labelText: this.textTabRight, - name: 'asc-radio-tab' + this.cmbAlign = new Common.UI.ComboBox({ + el : $('#paraadv-cmb-align'), + style : 'width: 128px;', + menuStyle : 'min-width: 128px;', + editable : false, + cls : 'input-group-nr', + data : this._arrTabAlign }); + this.cmbAlign.setValue(1); this.btnAddTab = new Common.UI.Button({ el: $('#paraadv-button-add-tab') @@ -299,18 +407,45 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced this._changedProps.get_Tabs().add_Tab(tab); }, this); } + + var horizontalAlign = this.cmbTextAlignment.getValue(); + this._changedProps.asc_putJc((horizontalAlign !== undefined && horizontalAlign !== null) ? horizontalAlign : c_paragraphTextAlignment.LEFT); + + if (this.Spacing !== null) { + this._changedProps.asc_putSpacing(this.Spacing); + } + return { paragraphProps: this._changedProps }; }, _setDefaults: function(props) { if (props ){ this._originalProps = new Asc.asc_CParagraphProperty(props); + this.FirstLine = (props.get_Ind() !== null) ? props.get_Ind().get_FirstLine() : null; this.numIndentsLeft.setValue((props.get_Ind() !== null && props.get_Ind().get_Left() !== null) ? Common.Utils.Metric.fnRecalcFromMM(props.get_Ind().get_Left()) : '', true); - this.numFirstLine.setMinValue(-this.numIndentsLeft.getNumberValue()); - this.numFirstLine.setValue((props.get_Ind() !== null && props.get_Ind().get_FirstLine() !== null ) ? Common.Utils.Metric.fnRecalcFromMM(props.get_Ind().get_FirstLine()) : '', true); this.numIndentsRight.setValue((props.get_Ind() !== null && props.get_Ind().get_Right() !== null) ? Common.Utils.Metric.fnRecalcFromMM(props.get_Ind().get_Right()) : '', true); + this.cmbTextAlignment.setValue((props.asc_getJc() !== undefined && props.asc_getJc() !== null) ? props.asc_getJc() : c_paragraphTextAlignment.CENTERED, true); + + if(this.CurSpecial === undefined) { + this.CurSpecial = (props.asc_getInd().get_FirstLine() === 0) ? c_paragraphSpecial.NONE_SPECIAL : ((props.asc_getInd().get_FirstLine() > 0) ? c_paragraphSpecial.FIRST_LINE : c_paragraphSpecial.HANGING); + } + this.cmbSpecial.setValue(this.CurSpecial); + this.numSpecialBy.setValue(this.FirstLine!== null ? Math.abs(Common.Utils.Metric.fnRecalcFromMM(this.FirstLine)) : '', true); + + this.numSpacingBefore.setValue((props.asc_getSpacing() !== null && props.asc_getSpacing().asc_getBefore() !== null) ? Common.Utils.Metric.fnRecalcFromMM(props.asc_getSpacing().asc_getBefore()) : '', true); + this.numSpacingAfter.setValue((props.asc_getSpacing() !== null && props.asc_getSpacing().asc_getAfter() !== null) ? Common.Utils.Metric.fnRecalcFromMM(props.asc_getSpacing().asc_getAfter()) : '', true); + + var linerule = props.asc_getSpacing().asc_getLineRule(); + this.cmbLineRule.setValue((linerule !== null) ? linerule : '', true); + + if(props.asc_getSpacing() !== null && props.asc_getSpacing().asc_getLine() !== null) { + this.numLineHeight.setValue((linerule==c_paragraphLinerule.LINERULE_AUTO) ? props.asc_getSpacing().asc_getLine() : Common.Utils.Metric.fnRecalcFromMM(props.asc_getSpacing().asc_getLine()), true); + } else { + this.numLineHeight.setValue('', true); + } + // Font this._noApply = true; this.chStrike.setValue((props.get_Strikeout() !== null && props.get_Strikeout() !== undefined) ? props.get_Strikeout() : 'indeterminate', true); @@ -339,7 +474,8 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced rec.set({ tabPos: pos, value: parseFloat(pos.toFixed(3)) + ' ' + Common.Utils.Metric.getCurrentMetricName(), - tabAlign: tab.get_Value() + tabAlign: tab.get_Value(), + displayTabAlign: this._arrKeyTabAlign[tab.get_Value()] }); arr.push(rec); } @@ -359,13 +495,19 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced for (var i=0; i 0 ) { + this.CurSpecial = c_paragraphSpecial.FIRST_LINE; + this.cmbSpecial.setValue(c_paragraphSpecial.FIRST_LINE); + } else if (value === 0) { + this.CurSpecial = c_paragraphSpecial.NONE_SPECIAL; + this.cmbSpecial.setValue(c_paragraphSpecial.NONE_SPECIAL); + } + this._changedProps.get_Ind().put_FirstLine(value); + } + }, + + onLineRuleSelect: function(combo, record) { + if (this.Spacing === null) { + var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty(); + this.Spacing = properties.asc_getSpacing(); + } + this.Spacing.LineRule = record.value; + var selectItem = _.findWhere(this._arrLineRule, {value: record.value}), + indexSelectItem = this._arrLineRule.indexOf(selectItem); + if ( this.CurLineRuleIdx !== indexSelectItem ) { + this.numLineHeight.setDefaultUnit(this._arrLineRule[indexSelectItem].defaultUnit); + this.numLineHeight.setMinValue(this._arrLineRule[indexSelectItem].minValue); + this.numLineHeight.setStep(this._arrLineRule[indexSelectItem].step); + if (this.Spacing.LineRule === c_paragraphLinerule.LINERULE_AUTO) { + this.numLineHeight.setValue(this._arrLineRule[indexSelectItem].defaultValue); + } else { + this.numLineHeight.setValue(Common.Utils.Metric.fnRecalcFromMM(this._arrLineRule[indexSelectItem].defaultValue)); + } + this.CurLineRuleIdx = indexSelectItem; + } + }, + + onNumLineHeightChange: function(field, newValue, oldValue, eOpts) { + if ( this.cmbLineRule.getRawValue() === '' ) + return; + if (this.Spacing === null) { + var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty(); + this.Spacing = properties.asc_getSpacing(); + } + this.Spacing.Line = (this.cmbLineRule.getValue()==c_paragraphLinerule.LINERULE_AUTO) ? field.getNumberValue() : Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()); }, textTitle: 'Paragraph - Advanced Settings', strIndentsFirstLine: 'First line', - strIndentsLeftText: 'Left', - strIndentsRightText: 'Right', - strParagraphIndents: 'Indents & Placement', + strIndentsLeftText: 'Indent Left', + strIndentsRightText: 'Indent Right', + strParagraphIndents: 'Indents & Spacing', strParagraphFont: 'Font', cancelButtonText: 'Cancel', okButtonText: 'Ok', @@ -584,6 +797,23 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced textAlign: 'Alignment', textTabPosition: 'Tab Position', textDefault: 'Default Tab', - noTabs: 'The specified tabs will appear in this field' + noTabs: 'The specified tabs will appear in this field', + strIndentsTextAlignment: 'Text Alignment', + textLeft: 'Left', + textCentered: 'Centered', + textJustified: 'Justified', + textRight: 'Right', + strIndentsSpecial: 'Special', + textNoneSpecial: '(none)', + textFirstLine: 'First line', + textHanging: 'Hanging', + strIndentsSpecialBy: 'By', + strIndentsSpacingBefore: 'Spacing Before', + strIndentsSpacingAfter: 'Spacing After', + strIndentLineSpacingAt: 'At', + strIndentsLineSpacing: 'Line Spacing', + txtAutoText: 'Auto', + textAuto: 'Multiple', + textExact: 'Exactly' }, PE.Views.ParagraphSettingsAdvanced || {})); }); \ No newline at end of file diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index ab8c21b382..893cae7f18 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -1326,10 +1326,10 @@ "PE.Views.ParagraphSettingsAdvanced.strAllCaps": "All caps", "PE.Views.ParagraphSettingsAdvanced.strDoubleStrike": "Double strikethrough", "PE.Views.ParagraphSettingsAdvanced.strIndentsFirstLine": "First Line", - "PE.Views.ParagraphSettingsAdvanced.strIndentsLeftText": "Left", - "PE.Views.ParagraphSettingsAdvanced.strIndentsRightText": "Right", + "PE.Views.ParagraphSettingsAdvanced.strIndentsLeftText": "Indent Left", + "PE.Views.ParagraphSettingsAdvanced.strIndentsRightText": "Indent Right", "PE.Views.ParagraphSettingsAdvanced.strParagraphFont": "Font", - "PE.Views.ParagraphSettingsAdvanced.strParagraphIndents": "Indents & Placement", + "PE.Views.ParagraphSettingsAdvanced.strParagraphIndents": "Indents & Spacing", "PE.Views.ParagraphSettingsAdvanced.strSmallCaps": "Small caps", "PE.Views.ParagraphSettingsAdvanced.strStrike": "Strikethrough", "PE.Views.ParagraphSettingsAdvanced.strSubscript": "Subscript", @@ -1347,6 +1347,23 @@ "PE.Views.ParagraphSettingsAdvanced.textTabPosition": "Tab Position", "PE.Views.ParagraphSettingsAdvanced.textTabRight": "Right", "PE.Views.ParagraphSettingsAdvanced.textTitle": "Paragraph - Advanced Settings", + "PE.Views.ParagraphSettingsAdvanced.strIndentsTextAlignment": "Text Alignment", + "PE.Views.ParagraphSettingsAdvanced.textLeft": "Left", + "PE.Views.ParagraphSettingsAdvanced.textCentered": "Centered", + "PE.Views.ParagraphSettingsAdvanced.textJustified": "Justified", + "PE.Views.ParagraphSettingsAdvanced.textRight": "Right", + "PE.Views.ParagraphSettingsAdvanced.strIndentsSpecial": "Special", + "PE.Views.ParagraphSettingsAdvanced.textNoneSpecial": "(none)", + "PE.Views.ParagraphSettingsAdvanced.textFirstLine": "First line", + "PE.Views.ParagraphSettingsAdvanced.textHanging": "Hanging", + "PE.Views.ParagraphSettingsAdvanced.strIndentsSpecialBy": "By", + "PE.Views.ParagraphSettingsAdvanced.strIndentsSpacingBefore": "Spacing Before", + "PE.Views.ParagraphSettingsAdvanced.strIndentsSpacingAfter": "Spacing After", + "PE.Views.ParagraphSettingsAdvanced.strIndentLineSpacingAt": "At", + "PE.Views.ParagraphSettingsAdvanced.strIndentsLineSpacing": "Line Spacing", + "PE.Views.ParagraphSettingsAdvanced.txtAutoText": "Auto", + "PE.Views.ParagraphSettingsAdvanced.textAuto": "Multiple", + "PE.Views.ParagraphSettingsAdvanced.textExact": "Exactly", "PE.Views.RightMenu.txtChartSettings": "Chart settings", "PE.Views.RightMenu.txtImageSettings": "Image settings", "PE.Views.RightMenu.txtParagraphSettings": "Text settings", From d9142db8a1b0ef2edbb0daa02497c3c98ccd8a65 Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Wed, 7 Aug 2019 12:17:08 +0300 Subject: [PATCH 09/15] [SSE] Change Paragraph - Advanced Settings --- .../main/app/controller/DocumentHolder.js | 18 + .../ParagraphSettingsAdvanced.template | 97 +++-- .../app/view/ParagraphSettingsAdvanced.js | 350 +++++++++++++++--- apps/spreadsheeteditor/main/locale/en.json | 23 +- 4 files changed, 394 insertions(+), 94 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js index f8ddaa468e..bcb7a52253 100644 --- a/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js +++ b/apps/spreadsheeteditor/main/app/controller/DocumentHolder.js @@ -40,6 +40,24 @@ * */ +var c_paragraphLinerule = { + LINERULE_AUTO: 1, + LINERULE_EXACT: 2 +}; + +var c_paragraphTextAlignment = { + RIGHT: 0, + LEFT: 1, + CENTERED: 2, + JUSTIFIED: 3 +}; + +var c_paragraphSpecial = { + NONE_SPECIAL: 0, + FIRST_LINE: 1, + HANGING: 2 +}; + define([ 'core', 'common/main/lib/util/utils', diff --git a/apps/spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced.template b/apps/spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced.template index 961b81080f..5f11e7f04b 100644 --- a/apps/spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced.template +++ b/apps/spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced.template @@ -1,26 +1,57 @@
-
@@ -63,7 +94,7 @@
-
+
- - - - - -
- -
-
- -
-
- -
-
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+ +
+
+
+
+
+
+
+
- +
@@ -71,28 +102,28 @@
-
-
- -
-
-
+
+
-
-
+
+
+ +
+
+
+ +
+
-
- -
-
-
+
+
- - - + + +
\ No newline at end of file diff --git a/apps/spreadsheeteditor/main/app/view/ParagraphSettingsAdvanced.js b/apps/spreadsheeteditor/main/app/view/ParagraphSettingsAdvanced.js index 1007f9a0f0..58fc2c77a4 100644 --- a/apps/spreadsheeteditor/main/app/view/ParagraphSettingsAdvanced.js +++ b/apps/spreadsheeteditor/main/app/view/ParagraphSettingsAdvanced.js @@ -49,13 +49,14 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. SSE.Views.ParagraphSettingsAdvanced = Common.Views.AdvancedSettingsWindow.extend(_.extend({ options: { - contentWidth: 320, + contentWidth: 370, height: 394, toggleGroup: 'paragraph-adv-settings-group', storageName: 'sse-para-settings-adv-category' }, initialize : function(options) { + var me = this; _.extend(this.options, { title: this.textTitle, items: [ @@ -74,9 +75,43 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. this._noApply = true; this._tabListChanged = false; this.spinners = []; + this.FirstLine = undefined; + this.Spacing = null; this.api = this.options.api; this._originalProps = new Asc.asc_CParagraphProperty(this.options.paragraphProps); + + this._arrLineRule = [ + {displayValue: this.textAuto, defaultValue: 1, value: c_paragraphLinerule.LINERULE_AUTO, minValue: 0.5, step: 0.01, defaultUnit: ''}, + {displayValue: this.textExact, defaultValue: 5, value: c_paragraphLinerule.LINERULE_EXACT, minValue: 0.03, step: 0.01, defaultUnit: 'cm'} + ]; + + var curLineRule = this._originalProps.asc_getSpacing().get_LineRule(), + curItem = _.findWhere(this._arrLineRule, {value: curLineRule}); + this.CurLineRuleIdx = this._arrLineRule.indexOf(curItem); + + this._arrTextAlignment = [ + {displayValue: this.textLeft, value: c_paragraphTextAlignment.LEFT}, + {displayValue: this.textCentered, value: c_paragraphTextAlignment.CENTERED}, + {displayValue: this.textRight, value: c_paragraphTextAlignment.RIGHT}, + {displayValue: this.textJustified, value: c_paragraphTextAlignment.JUSTIFIED} + ]; + + this._arrSpecial = [ + {displayValue: this.textNoneSpecial, value: c_paragraphSpecial.NONE_SPECIAL, defaultValue: 0}, + {displayValue: this.textFirstLine, value: c_paragraphSpecial.FIRST_LINE, defaultValue: 12.7}, + {displayValue: this.textHanging, value: c_paragraphSpecial.HANGING, defaultValue: 12.7} + ]; + + this._arrTabAlign = [ + { value: 1, displayValue: this.textTabLeft }, + { value: 3, displayValue: this.textTabCenter }, + { value: 2, displayValue: this.textTabRight } + ]; + this._arrKeyTabAlign = []; + this._arrTabAlign.forEach(function(item) { + me._arrKeyTabAlign[item.value] = item.displayValue; + }); }, render: function() { @@ -86,24 +121,15 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. // Indents & Placement - this.numFirstLine = new Common.UI.MetricSpinner({ - el: $('#paragraphadv-spin-first-line'), - step: .1, - width: 85, - defaultUnit : "cm", - defaultValue : 0, - value: '0 cm', - maxValue: 55.87, - minValue: -55.87 + this.cmbTextAlignment = new Common.UI.ComboBox({ + el: $('#paragraphadv-spin-text-alignment'), + cls: 'input-group-nr', + editable: false, + data: this._arrTextAlignment, + style: 'width: 173px;', + menuStyle : 'min-width: 173px;' }); - this.numFirstLine.on('change', _.bind(function(field, newValue, oldValue, eOpts){ - if (this._changedProps) { - if (this._changedProps.asc_getInd()===null || this._changedProps.asc_getInd()===undefined) - this._changedProps.asc_putInd(new Asc.asc_CParagraphInd()); - this._changedProps.asc_getInd().asc_putFirstLine(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue())); - } - }, this)); - this.spinners.push(this.numFirstLine); + this.cmbTextAlignment.setValue(''); this.numIndentsLeft = new Common.UI.MetricSpinner({ el: $('#paragraphadv-spin-indent-left'), @@ -113,13 +139,14 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. defaultValue : 0, value: '0 cm', maxValue: 55.87, - minValue: -55.87 + minValue: 0 }); this.numIndentsLeft.on('change', _.bind(function(field, newValue, oldValue, eOpts){ + var numval = field.getNumberValue(); if (this._changedProps) { - if (this._changedProps.asc_getInd()===null || this._changedProps.asc_getInd()===undefined) - this._changedProps.asc_putInd(new Asc.asc_CParagraphInd()); - this._changedProps.asc_getInd().asc_putLeft(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue())); + if (this._changedProps.get_Ind()===null || this._changedProps.get_Ind()===undefined) + this._changedProps.put_Ind(new Asc.asc_CParagraphInd()); + this._changedProps.get_Ind().put_Left(Common.Utils.Metric.fnRecalcToMM(numval)); } }, this)); this.spinners.push(this.numIndentsLeft); @@ -132,17 +159,104 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. defaultValue : 0, value: '0 cm', maxValue: 55.87, - minValue: -55.87 + minValue: 0 }); this.numIndentsRight.on('change', _.bind(function(field, newValue, oldValue, eOpts){ if (this._changedProps) { - if (this._changedProps.asc_getInd()===null || this._changedProps.asc_getInd()===undefined) - this._changedProps.asc_putInd(new Asc.asc_CParagraphInd()); - this._changedProps.asc_getInd().asc_putRight(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue())); + if (this._changedProps.get_Ind()===null || this._changedProps.get_Ind()===undefined) + this._changedProps.put_Ind(new Asc.asc_CParagraphInd()); + this._changedProps.get_Ind().put_Right(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue())); } }, this)); this.spinners.push(this.numIndentsRight); + this.cmbSpecial = new Common.UI.ComboBox({ + el: $('#paragraphadv-spin-special'), + cls: 'input-group-nr', + editable: false, + data: this._arrSpecial, + style: 'width: 85px;', + menuStyle : 'min-width: 85px;' + }); + this.cmbSpecial.setValue(''); + this.cmbSpecial.on('selected', _.bind(this.onSpecialSelect, this)); + + this.numSpecialBy = new Common.UI.MetricSpinner({ + el: $('#paragraphadv-spin-special-by'), + step: .1, + width: 85, + defaultUnit : "cm", + defaultValue : 0, + value: '0 cm', + maxValue: 55.87, + minValue: 0 + }); + this.spinners.push(this.numSpecialBy); + this.numSpecialBy.on('change', _.bind(this.onFirstLineChange, this)); + + this.numSpacingBefore = new Common.UI.MetricSpinner({ + el: $('#paragraphadv-spin-spacing-before'), + step: .1, + width: 85, + value: '', + defaultUnit : "cm", + maxValue: 55.88, + minValue: 0, + allowAuto : true, + autoText : this.txtAutoText + }); + this.numSpacingBefore.on('change', _.bind(function (field, newValue, oldValue, eOpts) { + if (this.Spacing === null) { + var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty(); + this.Spacing = properties.asc_getSpacing(); + } + this.Spacing.Before = Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()); + }, this)); + this.spinners.push(this.numSpacingBefore); + + this.numSpacingAfter = new Common.UI.MetricSpinner({ + el: $('#paragraphadv-spin-spacing-after'), + step: .1, + width: 85, + value: '', + defaultUnit : "cm", + maxValue: 55.88, + minValue: 0, + allowAuto : true, + autoText : this.txtAutoText + }); + this.numSpacingAfter.on('change', _.bind(function (field, newValue, oldValue, eOpts) { + if (this.Spacing === null) { + var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty(); + this.Spacing = properties.asc_getSpacing(); + } + this.Spacing.After = Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()); + }, this)); + this.spinners.push(this.numSpacingAfter); + + this.cmbLineRule = new Common.UI.ComboBox({ + el: $('#paragraphadv-spin-line-rule'), + cls: 'input-group-nr', + editable: false, + data: this._arrLineRule, + style: 'width: 85px;', + menuStyle : 'min-width: 85px;' + }); + this.cmbLineRule.setValue(this.CurLineRuleIdx); + this.cmbLineRule.on('selected', _.bind(this.onLineRuleSelect, this)); + + this.numLineHeight = new Common.UI.MetricSpinner({ + el: $('#paragraphadv-spin-line-height'), + step: .01, + width: 85, + value: '', + defaultUnit : "", + maxValue: 132, + minValue: 0.5 + }); + this.spinners.push(this.numLineHeight); + this.numLineHeight.on('change', _.bind(this.onNumLineHeightChange, this)); + // Font this.chStrike = new Common.UI.CheckBox({ @@ -207,7 +321,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. this.numTab = new Common.UI.MetricSpinner({ el: $('#paraadv-spin-tab'), step: .1, - width: 180, + width: 128, defaultUnit : "cm", value: '1.25 cm', maxValue: 55.87, @@ -218,7 +332,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. this.numDefaultTab = new Common.UI.MetricSpinner({ el: $('#paraadv-spin-default-tab'), step: .1, - width: 107, + width: 128, defaultUnit : "cm", value: '1.25 cm', maxValue: 55.87, @@ -234,7 +348,14 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. this.tabList = new Common.UI.ListView({ el: $('#paraadv-list-tabs'), emptyText: this.noTabs, - store: new Common.UI.DataViewStore() + store: new Common.UI.DataViewStore(), + template: _.template(['
'].join('')), + itemTemplate: _.template([ + '
', + '
<%= value %>
', + '
<%= displayTabAlign %>
', + '
' + ].join('')) }); this.tabList.store.comparator = function(rec) { return rec.get("tabPos"); @@ -249,24 +370,15 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. this.listenTo(this.tabList.store, 'remove', storechanged); this.listenTo(this.tabList.store, 'reset', storechanged); - this.radioLeft = new Common.UI.RadioBox({ - el: $('#paragraphadv-radio-left'), - labelText: this.textTabLeft, - name: 'asc-radio-tab', - checked: true - }); - - this.radioCenter = new Common.UI.RadioBox({ - el: $('#paragraphadv-radio-center'), - labelText: this.textTabCenter, - name: 'asc-radio-tab' - }); - - this.radioRight = new Common.UI.RadioBox({ - el: $('#paragraphadv-radio-right'), - labelText: this.textTabRight, - name: 'asc-radio-tab' + this.cmbAlign = new Common.UI.ComboBox({ + el : $('#paraadv-cmb-align'), + style : 'width: 128px;', + menuStyle : 'min-width: 128px;', + editable : false, + cls : 'input-group-nr', + data : this._arrTabAlign }); + this.cmbAlign.setValue(1); this.btnAddTab = new Common.UI.Button({ el: $('#paraadv-button-add-tab') @@ -299,17 +411,44 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. this._changedProps.asc_getTabs().add_Tab(tab); }, this); } + + var horizontalAlign = this.cmbTextAlignment.getValue(); + this._changedProps.asc_putJc((horizontalAlign !== undefined && horizontalAlign !== null) ? horizontalAlign : c_paragraphTextAlignment.LEFT); + + if (this.Spacing !== null) { + this._changedProps.asc_putSpacing(this.Spacing); + } + return { paragraphProps: this._changedProps }; }, _setDefaults: function(props) { if (props ){ this._originalProps = new Asc.asc_CParagraphProperty(props); + this.FirstLine = (props.get_Ind() !== null) ? props.get_Ind().get_FirstLine() : null; - this.numFirstLine.setValue((props.asc_getInd() !== null && props.asc_getInd().asc_getFirstLine() !== null ) ? Common.Utils.Metric.fnRecalcFromMM(props.asc_getInd().asc_getFirstLine()) : '', true); this.numIndentsLeft.setValue((props.asc_getInd() !== null && props.asc_getInd().asc_getLeft() !== null) ? Common.Utils.Metric.fnRecalcFromMM(props.asc_getInd().asc_getLeft()) : '', true); this.numIndentsRight.setValue((props.asc_getInd() !== null && props.asc_getInd().asc_getRight() !== null) ? Common.Utils.Metric.fnRecalcFromMM(props.asc_getInd().asc_getRight()) : '', true); + this.cmbTextAlignment.setValue((props.asc_getJc() !== undefined && props.asc_getJc() !== null) ? props.asc_getJc() : c_paragraphTextAlignment.CENTERED, true); + + if(this.CurSpecial === undefined) { + this.CurSpecial = (props.asc_getInd().get_FirstLine() === 0) ? c_paragraphSpecial.NONE_SPECIAL : ((props.asc_getInd().get_FirstLine() > 0) ? c_paragraphSpecial.FIRST_LINE : c_paragraphSpecial.HANGING); + } + this.cmbSpecial.setValue(this.CurSpecial); + this.numSpecialBy.setValue(this.FirstLine!== null ? Math.abs(Common.Utils.Metric.fnRecalcFromMM(this.FirstLine)) : '', true); + + this.numSpacingBefore.setValue((props.asc_getSpacing() !== null && props.asc_getSpacing().asc_getBefore() !== null) ? Common.Utils.Metric.fnRecalcFromMM(props.asc_getSpacing().asc_getBefore()) : '', true); + this.numSpacingAfter.setValue((props.asc_getSpacing() !== null && props.asc_getSpacing().asc_getAfter() !== null) ? Common.Utils.Metric.fnRecalcFromMM(props.asc_getSpacing().asc_getAfter()) : '', true); + + var linerule = props.asc_getSpacing().asc_getLineRule(); + this.cmbLineRule.setValue((linerule !== null) ? linerule : '', true); + + if(props.asc_getSpacing() !== null && props.asc_getSpacing().asc_getLine() !== null) { + this.numLineHeight.setValue((linerule==c_paragraphLinerule.LINERULE_AUTO) ? props.asc_getSpacing().asc_getLine() : Common.Utils.Metric.fnRecalcFromMM(props.asc_getSpacing().asc_getLine()), true); + } else { + this.numLineHeight.setValue('', true); + } // Font this._noApply = true; this.chStrike.setValue((props.asc_getStrikeout() !== null && props.asc_getStrikeout() !== undefined) ? props.asc_getStrikeout() : 'indeterminate', true); @@ -338,7 +477,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. rec.set({ tabPos: pos, value: parseFloat(pos.toFixed(3)) + ' ' + Common.Utils.Metric.getCurrentMetricName(), - tabAlign: tab.asc_getValue() + tabAlign: tab.asc_getValue(), + displayTabAlign: this._arrKeyTabAlign[tab.get_Value()] }); arr.push(rec); } @@ -358,13 +498,19 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. for (var i=0; i 0 ) { + this.CurSpecial = c_paragraphSpecial.FIRST_LINE; + this.cmbSpecial.setValue(c_paragraphSpecial.FIRST_LINE); + } else if (value === 0) { + this.CurSpecial = c_paragraphSpecial.NONE_SPECIAL; + this.cmbSpecial.setValue(c_paragraphSpecial.NONE_SPECIAL); + } + this._changedProps.get_Ind().put_FirstLine(value); + } + }, + + onLineRuleSelect: function(combo, record) { + if (this.Spacing === null) { + var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty(); + this.Spacing = properties.asc_getSpacing(); + } + this.Spacing.LineRule = record.value; + var selectItem = _.findWhere(this._arrLineRule, {value: record.value}), + indexSelectItem = this._arrLineRule.indexOf(selectItem); + if ( this.CurLineRuleIdx !== indexSelectItem ) { + this.numLineHeight.setDefaultUnit(this._arrLineRule[indexSelectItem].defaultUnit); + this.numLineHeight.setMinValue(this._arrLineRule[indexSelectItem].minValue); + this.numLineHeight.setStep(this._arrLineRule[indexSelectItem].step); + if (this.Spacing.LineRule === c_paragraphLinerule.LINERULE_AUTO) { + this.numLineHeight.setValue(this._arrLineRule[indexSelectItem].defaultValue); + } else { + this.numLineHeight.setValue(Common.Utils.Metric.fnRecalcFromMM(this._arrLineRule[indexSelectItem].defaultValue)); + } + this.CurLineRuleIdx = indexSelectItem; + } + }, + + onNumLineHeightChange: function(field, newValue, oldValue, eOpts) { + if ( this.cmbLineRule.getRawValue() === '' ) + return; + if (this.Spacing === null) { + var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty(); + this.Spacing = properties.asc_getSpacing(); + } + this.Spacing.Line = (this.cmbLineRule.getValue()==c_paragraphLinerule.LINERULE_AUTO) ? field.getNumberValue() : Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()); }, textTitle: 'Paragraph - Advanced Settings', strIndentsFirstLine: 'First line', - strIndentsLeftText: 'Left', - strIndentsRightText: 'Right', - strParagraphIndents: 'Indents & Placement', + strIndentsLeftText: 'Indent Left', + strIndentsRightText: 'Indent Right', + strParagraphIndents: 'Indents & Spacing', strParagraphFont: 'Font', cancelButtonText: 'Cancel', okButtonText: 'Ok', @@ -583,6 +800,23 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. textAlign: 'Alignment', textTabPosition: 'Tab Position', textDefault: 'Default Tab', - noTabs: 'The specified tabs will appear in this field' + noTabs: 'The specified tabs will appear in this field', + strIndentsTextAlignment: 'Text Alignment', + textLeft: 'Left', + textCentered: 'Centered', + textJustified: 'Justified', + textRight: 'Right', + strIndentsSpecial: 'Special', + textNoneSpecial: '(none)', + textFirstLine: 'First line', + textHanging: 'Hanging', + strIndentsSpecialBy: 'By', + strIndentsSpacingBefore: 'Spacing Before', + strIndentsSpacingAfter: 'Spacing After', + strIndentLineSpacingAt: 'At', + strIndentsLineSpacing: 'Line Spacing', + txtAutoText: 'Auto', + textAuto: 'Multiple', + textExact: 'Exactly' }, SSE.Views.ParagraphSettingsAdvanced || {})); }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index a4aeae5b8e..8c4acb5128 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -1805,10 +1805,10 @@ "SSE.Views.ParagraphSettingsAdvanced.strAllCaps": "All caps", "SSE.Views.ParagraphSettingsAdvanced.strDoubleStrike": "Double strikethrough", "SSE.Views.ParagraphSettingsAdvanced.strIndentsFirstLine": "First Line", - "SSE.Views.ParagraphSettingsAdvanced.strIndentsLeftText": "Left", - "SSE.Views.ParagraphSettingsAdvanced.strIndentsRightText": "Right", + "SSE.Views.ParagraphSettingsAdvanced.strIndentsLeftText": "Indent Left", + "SSE.Views.ParagraphSettingsAdvanced.strIndentsRightText": "Indent Right", "SSE.Views.ParagraphSettingsAdvanced.strParagraphFont": "Font", - "SSE.Views.ParagraphSettingsAdvanced.strParagraphIndents": "Indents & Placement", + "SSE.Views.ParagraphSettingsAdvanced.strParagraphIndents": "Indents & Spacing", "SSE.Views.ParagraphSettingsAdvanced.strSmallCaps": "Small caps", "SSE.Views.ParagraphSettingsAdvanced.strStrike": "Strikethrough", "SSE.Views.ParagraphSettingsAdvanced.strSubscript": "Subscript", @@ -1826,6 +1826,23 @@ "SSE.Views.ParagraphSettingsAdvanced.textTabPosition": "Tab Position", "SSE.Views.ParagraphSettingsAdvanced.textTabRight": "Right", "SSE.Views.ParagraphSettingsAdvanced.textTitle": "Paragraph - Advanced Settings", + "SSE.Views.ParagraphSettingsAdvanced.strIndentsTextAlignment": "Text Alignment", + "SSE.Views.ParagraphSettingsAdvanced.textLeft": "Left", + "SSE.Views.ParagraphSettingsAdvanced.textCentered": "Centered", + "SSE.Views.ParagraphSettingsAdvanced.textJustified": "Justified", + "SSE.Views.ParagraphSettingsAdvanced.textRight": "Right", + "SSE.Views.ParagraphSettingsAdvanced.strIndentsSpecial": "Special", + "SSE.Views.ParagraphSettingsAdvanced.textNoneSpecial": "(none)", + "SSE.Views.ParagraphSettingsAdvanced.textFirstLine": "First line", + "SSE.Views.ParagraphSettingsAdvanced.textHanging": "Hanging", + "SSE.Views.ParagraphSettingsAdvanced.strIndentsSpecialBy": "By", + "SSE.Views.ParagraphSettingsAdvanced.strIndentsSpacingBefore": "Spacing Before", + "SSE.Views.ParagraphSettingsAdvanced.strIndentsSpacingAfter": "Spacing After", + "SSE.Views.ParagraphSettingsAdvanced.strIndentLineSpacingAt": "At", + "SSE.Views.ParagraphSettingsAdvanced.strIndentsLineSpacing": "Line Spacing", + "SSE.Views.ParagraphSettingsAdvanced.txtAutoText": "Auto", + "SSE.Views.ParagraphSettingsAdvanced.textAuto": "Multiple", + "SSE.Views.ParagraphSettingsAdvanced.textExact": "Exactly", "SSE.Views.PivotSettings.notcriticalErrorTitle": "Warning", "SSE.Views.PivotSettings.textAdvanced": "Show advanced settings", "SSE.Views.PivotSettings.textCancel": "Cancel", From 106289615b413bb5455fd3ad38e908aa5f76ad15 Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Fri, 9 Aug 2019 10:34:19 +0300 Subject: [PATCH 10/15] [SSE] Add resize window filter --- .../main/app/view/AutoFilterDialog.js | 35 ++++++++++++++----- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/AutoFilterDialog.js b/apps/spreadsheeteditor/main/app/view/AutoFilterDialog.js index 7bc92c5f1d..eecd78c84a 100644 --- a/apps/spreadsheeteditor/main/app/view/AutoFilterDialog.js +++ b/apps/spreadsheeteditor/main/app/view/AutoFilterDialog.js @@ -487,16 +487,19 @@ define([ title : t.txtTitle, modal : false, animate : false, - items : [] + items : [], + resizable : true, + minwidth : 450, + minheight : 265 }, options); this.template = options.template || [ - '
', - '
', - '
', + '
', + '
', + '
', '', - '
', - '
', + '
', + '
', '
', '
', '', '
', - '
', - '' @@ -515,10 +517,13 @@ define([ this.handler = options.handler; this.throughIndexes = []; this.filteredIndexes = []; + this.curSize = undefined; _options.tpl = _.template(this.template)(_options); Common.UI.Window.prototype.initialize.call(this, _options); + + this.on('resize', _.bind(this.onWindowResize, this)); }, render: function () { @@ -526,6 +531,12 @@ define([ Common.UI.Window.prototype.render.call(this); + var $border = this.$window.find('.resize-border'); + this.$window.find('.resize-border.left, .resize-border.top').css({'cursor': 'default'}); + $border.removeClass('left'); + $border.removeClass('top'); + + this.$window.find('.btn').on('click', _.bind(this.onBtnClick, this)); this.btnOk = new Common.UI.Button({ @@ -1359,6 +1370,14 @@ define([ return false; }, + onWindowResize: function () { + var size = this.getSize(); + if (size !== this.curSize) { + this.$window.find('.combo-values').css({'height': size[1]-100 + 'px'}); + this.curSize = size; + } + }, + okButtonText : 'Ok', btnCustomFilter : 'Custom Filter', textSelectAll : 'Select All', From 1b597d783036ab0dbc10b9bddbbfaf37ca3a5a94 Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Fri, 9 Aug 2019 13:07:59 +0300 Subject: [PATCH 11/15] [SSE] [PE] [DE] Fix paragraph settings layout --- .../ParagraphSettingsAdvanced.template | 58 ++++---- .../app/view/ParagraphSettingsAdvanced.js | 62 ++++---- apps/documenteditor/main/locale/en.json | 12 +- .../ParagraphSettingsAdvanced.template | 137 ++++++++---------- .../app/view/ParagraphSettingsAdvanced.js | 48 +++--- apps/presentationeditor/main/locale/en.json | 12 +- .../ParagraphSettingsAdvanced.template | 133 ++++++++--------- .../app/view/ParagraphSettingsAdvanced.js | 47 +++--- apps/spreadsheeteditor/main/locale/en.json | 11 +- 9 files changed, 248 insertions(+), 272 deletions(-) diff --git a/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template b/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template index 82a503dee5..ba85abc73e 100644 --- a/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template +++ b/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template @@ -10,6 +10,7 @@
+
@@ -20,14 +21,16 @@
- -
-
-
- -
+
+ +
+
+
+
+
+
@@ -38,12 +41,13 @@
- -
-
-
- -
+
+ +
+
+
+
+
@@ -51,7 +55,7 @@
-
+
@@ -113,13 +117,13 @@
-
+
-
+
@@ -144,56 +148,56 @@
-
+
-
+
-
+
-
+
-
+
- - - + + +
-
+
-
+
-
+
-
+
diff --git a/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js b/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js index 4284b50a6c..f35abbd3de 100644 --- a/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js +++ b/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js @@ -96,7 +96,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem this._originalProps = new Asc.asc_CParagraphProperty(this.options.paragraphProps); this.isChart = this.options.isChart; - this.CurLineRuleIdx = this._originalProps.asc_getSpacing().get_LineRule(); + this.CurLineRuleIdx = this._originalProps.get_Spacing().get_LineRule(); this._arrLineRule = [ {displayValue: this.textAtLeast,defaultValue: 5, value: c_paragraphLinerule.LINERULE_LEAST, minValue: 0.03, step: 0.01, defaultUnit: 'cm'}, @@ -213,7 +213,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem this.numSpacingBefore.on('change', _.bind(function (field, newValue, oldValue, eOpts) { if (this.Spacing === null) { var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty(); - this.Spacing = properties.asc_getSpacing(); + this.Spacing = properties.get_Spacing(); } this.Spacing.Before = Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()); }, this)); @@ -233,7 +233,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem this.numSpacingAfter.on('change', _.bind(function (field, newValue, oldValue, eOpts) { if (this.Spacing === null) { var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty(); - this.Spacing = properties.asc_getSpacing(); + this.Spacing = properties.get_Spacing(); } this.Spacing.After = Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()); }, this)); @@ -527,7 +527,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem this.numTab = new Common.UI.MetricSpinner({ el: $('#paraadv-spin-tab'), step: .1, - width: 95, + width: 108, defaultUnit : "cm", value: '1.25 cm', maxValue: 55.87, @@ -538,7 +538,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem this.numDefaultTab = new Common.UI.MetricSpinner({ el: $('#paraadv-spin-default-tab'), step: .1, - width: 95, + width: 108, defaultUnit : "cm", value: '1.25 cm', maxValue: 55.87, @@ -558,9 +558,9 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem template: _.template(['
'].join('')), itemTemplate: _.template([ '
', - '
<%= value %>
', - '
<%= displayTabAlign %>
', - '
<%= displayTabLeader %>
', + '
<%= value %>
', + '
<%= displayTabAlign %>
', + '
<%= displayTabLeader %>
', '
' ].join('')) }); @@ -579,8 +579,8 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem this.cmbAlign = new Common.UI.ComboBox({ el : $('#paraadv-cmb-align'), - style : 'width: 95px;', - menuStyle : 'min-width: 95px;', + style : 'width: 108px;', + menuStyle : 'min-width: 108px;', editable : false, cls : 'input-group-nr', data : this._arrTabAlign @@ -589,8 +589,8 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem this.cmbLeader = new Common.UI.ComboBox({ el : $('#paraadv-cmb-leader'), - style : 'width: 95px;', - menuStyle : 'min-width: 95px;', + style : 'width: 108px;', + menuStyle : 'min-width: 108px;', editable : false, cls : 'input-group-nr', data : this._arrTabLeader @@ -780,27 +780,27 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem this.numIndentsLeft.setValue(this.LeftIndent!==null ? Common.Utils.Metric.fnRecalcFromMM(this.LeftIndent) : '', true); this.numIndentsRight.setValue((props.get_Ind() !== null && props.get_Ind().get_Right() !== null) ? Common.Utils.Metric.fnRecalcFromMM(props.get_Ind().get_Right()) : '', true); - this.numSpacingBefore.setValue((props.asc_getSpacing() !== null && props.asc_getSpacing().asc_getBefore() !== null) ? Common.Utils.Metric.fnRecalcFromMM(props.asc_getSpacing().asc_getBefore()) : '', true); - this.numSpacingAfter.setValue((props.asc_getSpacing() !== null && props.asc_getSpacing().asc_getAfter() !== null) ? Common.Utils.Metric.fnRecalcFromMM(props.asc_getSpacing().asc_getAfter()) : '', true); + this.numSpacingBefore.setValue((props.get_Spacing() !== null && props.get_Spacing().get_Before() !== null) ? Common.Utils.Metric.fnRecalcFromMM(props.get_Spacing().get_Before()) : '', true); + this.numSpacingAfter.setValue((props.get_Spacing() !== null && props.get_Spacing().get_After() !== null) ? Common.Utils.Metric.fnRecalcFromMM(props.get_Spacing().get_After()) : '', true); - var linerule = props.asc_getSpacing().asc_getLineRule(); + var linerule = props.get_Spacing().get_LineRule(); this.cmbLineRule.setValue((linerule !== null) ? linerule : '', true); - if(props.asc_getSpacing() !== null && props.asc_getSpacing().asc_getLine() !== null) { - this.numLineHeight.setValue((linerule==c_paragraphLinerule.LINERULE_AUTO) ? props.asc_getSpacing().asc_getLine() : Common.Utils.Metric.fnRecalcFromMM(props.asc_getSpacing().asc_getLine()), true); + if(props.get_Spacing() !== null && props.get_Spacing().get_Line() !== null) { + this.numLineHeight.setValue((linerule==c_paragraphLinerule.LINERULE_AUTO) ? props.get_Spacing().get_Line() : Common.Utils.Metric.fnRecalcFromMM(props.get_Spacing().get_Line()), true); } else { this.numLineHeight.setValue('', true); } - this.chAddInterval.setValue((props.asc_getContextualSpacing() !== null && props.asc_getContextualSpacing() !== undefined) ? props.asc_getContextualSpacing() : 'indeterminate', true); + this.chAddInterval.setValue((props.get_ContextualSpacing() !== null && props.get_ContextualSpacing() !== undefined) ? props.get_ContextualSpacing() : 'indeterminate', true); if(this.CurSpecial === undefined) { - this.CurSpecial = (props.asc_getInd().get_FirstLine() === 0) ? c_paragraphSpecial.NONE_SPECIAL : ((props.asc_getInd().get_FirstLine() > 0) ? c_paragraphSpecial.FIRST_LINE : c_paragraphSpecial.HANGING); + this.CurSpecial = (props.get_Ind().get_FirstLine() === 0) ? c_paragraphSpecial.NONE_SPECIAL : ((props.get_Ind().get_FirstLine() > 0) ? c_paragraphSpecial.FIRST_LINE : c_paragraphSpecial.HANGING); } this.cmbSpecial.setValue(this.CurSpecial); this.numSpecialBy.setValue(this.FirstLine!== null ? Math.abs(Common.Utils.Metric.fnRecalcFromMM(this.FirstLine)) : '', true); - this.cmbTextAlignment.setValue((props.asc_getJc() !== undefined && props.asc_getJc() !== null) ? props.asc_getJc() : c_paragraphTextAlignment.LEFT, true); + this.cmbTextAlignment.setValue((props.get_Jc() !== undefined && props.get_Jc() !== null) ? props.get_Jc() : c_paragraphTextAlignment.LEFT, true); this.chKeepLines.setValue((props.get_KeepLines() !== null && props.get_KeepLines() !== undefined) ? props.get_KeepLines() : 'indeterminate', true); this.chBreakBefore.setValue((props.get_PageBreakBefore() !== null && props.get_PageBreakBefore() !== undefined) ? props.get_PageBreakBefore() : 'indeterminate', true); @@ -887,8 +887,8 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem tabPos: pos, value: parseFloat(pos.toFixed(3)) + ' ' + Common.Utils.Metric.getCurrentMetricName(), tabAlign: tab.get_Value(), - tabLeader: tab.asc_getLeader(), - displayTabLeader: this._arrKeyTabLeader[tab.asc_getLeader()], + tabLeader: tab.get_Leader(), + displayTabLeader: this._arrKeyTabLeader[tab.get_Leader()], displayTabAlign: this._arrKeyTabAlign[tab.get_Value()] }); arr.push(rec); @@ -1365,7 +1365,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem onLineRuleSelect: function(combo, record) { if (this.Spacing === null) { var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty(); - this.Spacing = properties.asc_getSpacing(); + this.Spacing = properties.get_Spacing(); } this.Spacing.LineRule = record.value; if ( this.CurLineRuleIdx !== this.Spacing.LineRule ) { @@ -1389,7 +1389,7 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem return; if (this.Spacing === null) { var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty(); - this.Spacing = properties.asc_getSpacing(); + this.Spacing = properties.get_Spacing(); } this.Spacing.Line = (this.cmbLineRule.getValue()==c_paragraphLinerule.LINERULE_AUTO) ? field.getNumberValue() : Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()); }, @@ -1438,8 +1438,8 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem textTitle: 'Paragraph - Advanced Settings', strIndentsFirstLine: 'First line', - strIndentsLeftText: 'Indent Left', - strIndentsRightText: 'Indent Right', + strIndentsLeftText: 'Left', + strIndentsRightText: 'Right', strParagraphIndents: 'Indents & Spacing', strParagraphPosition: 'Placement', strParagraphFont: 'Font', @@ -1493,9 +1493,8 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem textLeader: 'Leader', textNone: 'None', strParagraphLine: 'Line & Page Breaks', - strIndentsSpacingBefore: 'Spacing Before', - strIndentsSpacingAfter: 'Spacing After', - strIndentLineSpacingAt: 'At', + strIndentsSpacingBefore: 'Before', + strIndentsSpacingAfter: 'After', strIndentsLineSpacing: 'Line Spacing', txtAutoText: 'Auto', textAuto: 'Multiple', @@ -1506,13 +1505,14 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem textNoneSpecial: '(none)', textFirstLine: 'First line', textHanging: 'Hanging', - strIndentsSpecialBy: 'By', textCentered: 'Centered', textJustified: 'Justified', textBodyText: 'BodyText', textLevel: 'Level ', strIndentsTextAlignment: 'Text Alignment', - strIndentsOutlinelevel: 'Outline level' + strIndentsOutlinelevel: 'Outline level', + strIndent: 'Indents', + strSpacing: 'Spacing' }, DE.Views.ParagraphSettingsAdvanced || {})); }); \ No newline at end of file diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index 65899a20da..3b0bbac7e7 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -1707,8 +1707,8 @@ "DE.Views.ParagraphSettingsAdvanced.strBorders": "Borders & Fill", "DE.Views.ParagraphSettingsAdvanced.strBreakBefore": "Page break before", "DE.Views.ParagraphSettingsAdvanced.strDoubleStrike": "Double strikethrough", - "DE.Views.ParagraphSettingsAdvanced.strIndentsLeftText": "Indent Left", - "DE.Views.ParagraphSettingsAdvanced.strIndentsRightText": "Indent Right", + "DE.Views.ParagraphSettingsAdvanced.strIndentsLeftText": "Left", + "DE.Views.ParagraphSettingsAdvanced.strIndentsRightText": "Right", "DE.Views.ParagraphSettingsAdvanced.strKeepLines": "Keep lines together", "DE.Views.ParagraphSettingsAdvanced.strKeepNext": "Keep with next", "DE.Views.ParagraphSettingsAdvanced.strMargins": "Paddings", @@ -1756,9 +1756,8 @@ "DE.Views.ParagraphSettingsAdvanced.tipTop": "Set top border only", "DE.Views.ParagraphSettingsAdvanced.txtNoBorders": "No borders", "DE.Views.ParagraphSettingsAdvanced.strParagraphLine": "Line & Page Breaks", - "DE.Views.ParagraphSettingsAdvanced.strIndentsSpacingBefore": "Spacing Before", - "DE.Views.ParagraphSettingsAdvanced.strIndentsSpacingAfter": "Spacing After", - "DE.Views.ParagraphSettingsAdvanced.strIndentLineSpacingAt": "At", + "DE.Views.ParagraphSettingsAdvanced.strIndentsSpacingBefore": "Before", + "DE.Views.ParagraphSettingsAdvanced.strIndentsSpacingAfter": "After", "DE.Views.ParagraphSettingsAdvanced.strIndentsLineSpacing": "Line Spacing", "DE.Views.ParagraphSettingsAdvanced.txtAutoText": "Auto", "DE.Views.ParagraphSettingsAdvanced.textAuto": "Multiple", @@ -1769,13 +1768,14 @@ "DE.Views.ParagraphSettingsAdvanced.textNoneSpecial": "(none)", "DE.Views.ParagraphSettingsAdvanced.textFirstLine": "First line", "DE.Views.ParagraphSettingsAdvanced.textHanging": "Hanging", - "DE.Views.ParagraphSettingsAdvanced.strIndentsSpecialBy": "By", "DE.Views.ParagraphSettingsAdvanced.textCentered": "Centered", "DE.Views.ParagraphSettingsAdvanced.textJustified": "Justified", "DE.Views.ParagraphSettingsAdvanced.textBodyText": "BodyText", "DE.Views.ParagraphSettingsAdvanced.textLevel": "Level ", "DE.Views.ParagraphSettingsAdvanced.strIndentsTextAlignment": "Text Alignment", "DE.Views.ParagraphSettingsAdvanced.strIndentsOutlinelevel": "Outline level", + "DE.Views.ParagraphSettingsAdvanced.strIndent": "Indents", + "DE.Views.ParagraphSettingsAdvanced.strSpacing": "Spacing", "DE.Views.RightMenu.txtChartSettings": "Chart settings", "DE.Views.RightMenu.txtHeaderFooterSettings": "Header and footer settings", "DE.Views.RightMenu.txtImageSettings": "Image settings", diff --git a/apps/presentationeditor/main/app/template/ParagraphSettingsAdvanced.template b/apps/presentationeditor/main/app/template/ParagraphSettingsAdvanced.template index 06eb74685a..88d2cb31cc 100644 --- a/apps/presentationeditor/main/app/template/ParagraphSettingsAdvanced.template +++ b/apps/presentationeditor/main/app/template/ParagraphSettingsAdvanced.template @@ -6,6 +6,7 @@
+
@@ -16,114 +17,98 @@
- -
-
-
- -
+
+ +
+
+
+
+
+
-
+
-
+
-
- -
-
-
- -
+
+
+ +
+
+
+
+
-
+
-
+
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
-
+
+
-
+
-
+
-
-
-
-
+
- - - +
+
+
+
+
+ + +
\ No newline at end of file diff --git a/apps/presentationeditor/main/app/view/ParagraphSettingsAdvanced.js b/apps/presentationeditor/main/app/view/ParagraphSettingsAdvanced.js index 221196684e..36f30ee9fc 100644 --- a/apps/presentationeditor/main/app/view/ParagraphSettingsAdvanced.js +++ b/apps/presentationeditor/main/app/view/ParagraphSettingsAdvanced.js @@ -86,7 +86,7 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced {displayValue: this.textExact, defaultValue: 5, value: c_paragraphLinerule.LINERULE_EXACT, minValue: 0.03, step: 0.01, defaultUnit: 'cm'} ]; - var curLineRule = this._originalProps.asc_getSpacing().get_LineRule(), + var curLineRule = this._originalProps.get_Spacing().get_LineRule(), curItem = _.findWhere(this._arrLineRule, {value: curLineRule}); this.CurLineRuleIdx = this._arrLineRule.indexOf(curItem); @@ -208,7 +208,7 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced this.numSpacingBefore.on('change', _.bind(function (field, newValue, oldValue, eOpts) { if (this.Spacing === null) { var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty(); - this.Spacing = properties.asc_getSpacing(); + this.Spacing = properties.get_Spacing(); } this.Spacing.Before = Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()); }, this)); @@ -228,7 +228,7 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced this.numSpacingAfter.on('change', _.bind(function (field, newValue, oldValue, eOpts) { if (this.Spacing === null) { var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty(); - this.Spacing = properties.asc_getSpacing(); + this.Spacing = properties.get_Spacing(); } this.Spacing.After = Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()); }, this)); @@ -321,7 +321,7 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced this.numTab = new Common.UI.MetricSpinner({ el: $('#paraadv-spin-tab'), step: .1, - width: 128, + width: 108, defaultUnit : "cm", value: '1.25 cm', maxValue: 55.87, @@ -332,7 +332,7 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced this.numDefaultTab = new Common.UI.MetricSpinner({ el: $('#paraadv-spin-default-tab'), step: .1, - width: 128, + width: 108, defaultUnit : "cm", value: '1.25 cm', maxValue: 55.87, @@ -352,7 +352,7 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced template: _.template(['
'].join('')), itemTemplate: _.template([ '
', - '
<%= value %>
', + '
<%= value %>
', '
<%= displayTabAlign %>
', '
' ].join('')) @@ -372,8 +372,8 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced this.cmbAlign = new Common.UI.ComboBox({ el : $('#paraadv-cmb-align'), - style : 'width: 128px;', - menuStyle : 'min-width: 128px;', + style : 'width: 108px;', + menuStyle : 'min-width: 108px;', editable : false, cls : 'input-group-nr', data : this._arrTabAlign @@ -426,22 +426,22 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced this.numIndentsLeft.setValue((props.get_Ind() !== null && props.get_Ind().get_Left() !== null) ? Common.Utils.Metric.fnRecalcFromMM(props.get_Ind().get_Left()) : '', true); this.numIndentsRight.setValue((props.get_Ind() !== null && props.get_Ind().get_Right() !== null) ? Common.Utils.Metric.fnRecalcFromMM(props.get_Ind().get_Right()) : '', true); - this.cmbTextAlignment.setValue((props.asc_getJc() !== undefined && props.asc_getJc() !== null) ? props.asc_getJc() : c_paragraphTextAlignment.CENTERED, true); + this.cmbTextAlignment.setValue((props.get_Jc() !== undefined && props.get_Jc() !== null) ? props.get_Jc() : c_paragraphTextAlignment.CENTERED, true); if(this.CurSpecial === undefined) { - this.CurSpecial = (props.asc_getInd().get_FirstLine() === 0) ? c_paragraphSpecial.NONE_SPECIAL : ((props.asc_getInd().get_FirstLine() > 0) ? c_paragraphSpecial.FIRST_LINE : c_paragraphSpecial.HANGING); + this.CurSpecial = (props.get_Ind().get_FirstLine() === 0) ? c_paragraphSpecial.NONE_SPECIAL : ((props.get_Ind().get_FirstLine() > 0) ? c_paragraphSpecial.FIRST_LINE : c_paragraphSpecial.HANGING); } this.cmbSpecial.setValue(this.CurSpecial); this.numSpecialBy.setValue(this.FirstLine!== null ? Math.abs(Common.Utils.Metric.fnRecalcFromMM(this.FirstLine)) : '', true); - this.numSpacingBefore.setValue((props.asc_getSpacing() !== null && props.asc_getSpacing().asc_getBefore() !== null) ? Common.Utils.Metric.fnRecalcFromMM(props.asc_getSpacing().asc_getBefore()) : '', true); - this.numSpacingAfter.setValue((props.asc_getSpacing() !== null && props.asc_getSpacing().asc_getAfter() !== null) ? Common.Utils.Metric.fnRecalcFromMM(props.asc_getSpacing().asc_getAfter()) : '', true); + this.numSpacingBefore.setValue((props.get_Spacing() !== null && props.get_Spacing().get_Before() !== null) ? Common.Utils.Metric.fnRecalcFromMM(props.get_Spacing().get_Before()) : '', true); + this.numSpacingAfter.setValue((props.get_Spacing() !== null && props.get_Spacing().get_After() !== null) ? Common.Utils.Metric.fnRecalcFromMM(props.get_Spacing().get_After()) : '', true); - var linerule = props.asc_getSpacing().asc_getLineRule(); + var linerule = props.get_Spacing().get_LineRule(); this.cmbLineRule.setValue((linerule !== null) ? linerule : '', true); - if(props.asc_getSpacing() !== null && props.asc_getSpacing().asc_getLine() !== null) { - this.numLineHeight.setValue((linerule==c_paragraphLinerule.LINERULE_AUTO) ? props.asc_getSpacing().asc_getLine() : Common.Utils.Metric.fnRecalcFromMM(props.asc_getSpacing().asc_getLine()), true); + if(props.get_Spacing() !== null && props.get_Spacing().get_Line() !== null) { + this.numLineHeight.setValue((linerule==c_paragraphLinerule.LINERULE_AUTO) ? props.get_Spacing().get_Line() : Common.Utils.Metric.fnRecalcFromMM(props.get_Spacing().get_Line()), true); } else { this.numLineHeight.setValue('', true); } @@ -743,7 +743,7 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced onLineRuleSelect: function(combo, record) { if (this.Spacing === null) { var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty(); - this.Spacing = properties.asc_getSpacing(); + this.Spacing = properties.get_Spacing(); } this.Spacing.LineRule = record.value; var selectItem = _.findWhere(this._arrLineRule, {value: record.value}), @@ -766,15 +766,15 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced return; if (this.Spacing === null) { var properties = (this._originalProps) ? this._originalProps : new Asc.asc_CParagraphProperty(); - this.Spacing = properties.asc_getSpacing(); + this.Spacing = properties.get_Spacing(); } this.Spacing.Line = (this.cmbLineRule.getValue()==c_paragraphLinerule.LINERULE_AUTO) ? field.getNumberValue() : Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()); }, textTitle: 'Paragraph - Advanced Settings', strIndentsFirstLine: 'First line', - strIndentsLeftText: 'Indent Left', - strIndentsRightText: 'Indent Right', + strIndentsLeftText: 'Left', + strIndentsRightText: 'Right', strParagraphIndents: 'Indents & Spacing', strParagraphFont: 'Font', cancelButtonText: 'Cancel', @@ -807,13 +807,13 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced textNoneSpecial: '(none)', textFirstLine: 'First line', textHanging: 'Hanging', - strIndentsSpecialBy: 'By', - strIndentsSpacingBefore: 'Spacing Before', - strIndentsSpacingAfter: 'Spacing After', - strIndentLineSpacingAt: 'At', + strIndentsSpacingBefore: 'Before', + strIndentsSpacingAfter: 'After', strIndentsLineSpacing: 'Line Spacing', txtAutoText: 'Auto', textAuto: 'Multiple', - textExact: 'Exactly' + textExact: 'Exactly', + strIndent: 'Indents', + strSpacing: 'Spacing' }, PE.Views.ParagraphSettingsAdvanced || {})); }); \ No newline at end of file diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index 5251c44b1d..375ab56579 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -1324,8 +1324,8 @@ "PE.Views.ParagraphSettingsAdvanced.strAllCaps": "All caps", "PE.Views.ParagraphSettingsAdvanced.strDoubleStrike": "Double strikethrough", "PE.Views.ParagraphSettingsAdvanced.strIndentsFirstLine": "First Line", - "PE.Views.ParagraphSettingsAdvanced.strIndentsLeftText": "Indent Left", - "PE.Views.ParagraphSettingsAdvanced.strIndentsRightText": "Indent Right", + "PE.Views.ParagraphSettingsAdvanced.strIndentsLeftText": "Left", + "PE.Views.ParagraphSettingsAdvanced.strIndentsRightText": "Right", "PE.Views.ParagraphSettingsAdvanced.strParagraphFont": "Font", "PE.Views.ParagraphSettingsAdvanced.strParagraphIndents": "Indents & Spacing", "PE.Views.ParagraphSettingsAdvanced.strSmallCaps": "Small caps", @@ -1354,14 +1354,14 @@ "PE.Views.ParagraphSettingsAdvanced.textNoneSpecial": "(none)", "PE.Views.ParagraphSettingsAdvanced.textFirstLine": "First line", "PE.Views.ParagraphSettingsAdvanced.textHanging": "Hanging", - "PE.Views.ParagraphSettingsAdvanced.strIndentsSpecialBy": "By", - "PE.Views.ParagraphSettingsAdvanced.strIndentsSpacingBefore": "Spacing Before", - "PE.Views.ParagraphSettingsAdvanced.strIndentsSpacingAfter": "Spacing After", - "PE.Views.ParagraphSettingsAdvanced.strIndentLineSpacingAt": "At", + "PE.Views.ParagraphSettingsAdvanced.strIndentsSpacingBefore": "Before", + "PE.Views.ParagraphSettingsAdvanced.strIndentsSpacingAfter": "After", "PE.Views.ParagraphSettingsAdvanced.strIndentsLineSpacing": "Line Spacing", "PE.Views.ParagraphSettingsAdvanced.txtAutoText": "Auto", "PE.Views.ParagraphSettingsAdvanced.textAuto": "Multiple", "PE.Views.ParagraphSettingsAdvanced.textExact": "Exactly", + "PE.Views.ParagraphSettingsAdvanced.strIndent": "Indents", + "PE.Views.ParagraphSettingsAdvanced.strSpacing": "Spacing", "PE.Views.RightMenu.txtChartSettings": "Chart settings", "PE.Views.RightMenu.txtImageSettings": "Image settings", "PE.Views.RightMenu.txtParagraphSettings": "Text settings", diff --git a/apps/spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced.template b/apps/spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced.template index 5f11e7f04b..88d2cb31cc 100644 --- a/apps/spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced.template +++ b/apps/spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced.template @@ -6,6 +6,7 @@
+
@@ -16,114 +17,98 @@
- -
-
-
- -
+
+ +
+
+
+
+
+
-
+
-
+
-
- -
-
-
- -
+
+
+ +
+
+
+
+
-
+
-
+
-
- - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
-
+
+
-
+
-
+
-
-
+
+
+
+
- - - + + +
\ No newline at end of file diff --git a/apps/spreadsheeteditor/main/app/view/ParagraphSettingsAdvanced.js b/apps/spreadsheeteditor/main/app/view/ParagraphSettingsAdvanced.js index 58fc2c77a4..cd4b61c8bc 100644 --- a/apps/spreadsheeteditor/main/app/view/ParagraphSettingsAdvanced.js +++ b/apps/spreadsheeteditor/main/app/view/ParagraphSettingsAdvanced.js @@ -86,7 +86,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. {displayValue: this.textExact, defaultValue: 5, value: c_paragraphLinerule.LINERULE_EXACT, minValue: 0.03, step: 0.01, defaultUnit: 'cm'} ]; - var curLineRule = this._originalProps.asc_getSpacing().get_LineRule(), + var curLineRule = this._originalProps.asc_getSpacing().asc_getLineRule(), curItem = _.findWhere(this._arrLineRule, {value: curLineRule}); this.CurLineRuleIdx = this._arrLineRule.indexOf(curItem); @@ -144,9 +144,9 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. this.numIndentsLeft.on('change', _.bind(function(field, newValue, oldValue, eOpts){ var numval = field.getNumberValue(); if (this._changedProps) { - if (this._changedProps.get_Ind()===null || this._changedProps.get_Ind()===undefined) + if (this._changedProps.asc_getInd()===null || this._changedProps.asc_getInd()===undefined) this._changedProps.put_Ind(new Asc.asc_CParagraphInd()); - this._changedProps.get_Ind().put_Left(Common.Utils.Metric.fnRecalcToMM(numval)); + this._changedProps.asc_getInd().put_Left(Common.Utils.Metric.fnRecalcToMM(numval)); } }, this)); this.spinners.push(this.numIndentsLeft); @@ -163,9 +163,9 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. }); this.numIndentsRight.on('change', _.bind(function(field, newValue, oldValue, eOpts){ if (this._changedProps) { - if (this._changedProps.get_Ind()===null || this._changedProps.get_Ind()===undefined) + if (this._changedProps.asc_getInd()===null || this._changedProps.asc_getInd()===undefined) this._changedProps.put_Ind(new Asc.asc_CParagraphInd()); - this._changedProps.get_Ind().put_Right(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue())); + this._changedProps.asc_getInd().put_Right(Common.Utils.Metric.fnRecalcToMM(field.getNumberValue())); } }, this)); this.spinners.push(this.numIndentsRight); @@ -321,7 +321,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. this.numTab = new Common.UI.MetricSpinner({ el: $('#paraadv-spin-tab'), step: .1, - width: 128, + width: 108, defaultUnit : "cm", value: '1.25 cm', maxValue: 55.87, @@ -332,7 +332,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. this.numDefaultTab = new Common.UI.MetricSpinner({ el: $('#paraadv-spin-default-tab'), step: .1, - width: 128, + width: 108, defaultUnit : "cm", value: '1.25 cm', maxValue: 55.87, @@ -352,7 +352,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. template: _.template(['
'].join('')), itemTemplate: _.template([ '
', - '
<%= value %>
', + '
<%= value %>
', '
<%= displayTabAlign %>
', '
' ].join('')) @@ -372,8 +372,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. this.cmbAlign = new Common.UI.ComboBox({ el : $('#paraadv-cmb-align'), - style : 'width: 128px;', - menuStyle : 'min-width: 128px;', + style : 'width: 108px;', + menuStyle : 'min-width: 108px;', editable : false, cls : 'input-group-nr', data : this._arrTabAlign @@ -425,7 +425,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. _setDefaults: function(props) { if (props ){ this._originalProps = new Asc.asc_CParagraphProperty(props); - this.FirstLine = (props.get_Ind() !== null) ? props.get_Ind().get_FirstLine() : null; + this.FirstLine = (props.asc_getInd() !== null) ? props.asc_getInd().asc_getFirstLine() : null; this.numIndentsLeft.setValue((props.asc_getInd() !== null && props.asc_getInd().asc_getLeft() !== null) ? Common.Utils.Metric.fnRecalcFromMM(props.asc_getInd().asc_getLeft()) : '', true); this.numIndentsRight.setValue((props.asc_getInd() !== null && props.asc_getInd().asc_getRight() !== null) ? Common.Utils.Metric.fnRecalcFromMM(props.asc_getInd().asc_getRight()) : '', true); @@ -433,7 +433,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. this.cmbTextAlignment.setValue((props.asc_getJc() !== undefined && props.asc_getJc() !== null) ? props.asc_getJc() : c_paragraphTextAlignment.CENTERED, true); if(this.CurSpecial === undefined) { - this.CurSpecial = (props.asc_getInd().get_FirstLine() === 0) ? c_paragraphSpecial.NONE_SPECIAL : ((props.asc_getInd().get_FirstLine() > 0) ? c_paragraphSpecial.FIRST_LINE : c_paragraphSpecial.HANGING); + this.CurSpecial = (props.asc_getInd().asc_getFirstLine() === 0) ? c_paragraphSpecial.NONE_SPECIAL : ((props.asc_getInd().asc_getFirstLine() > 0) ? c_paragraphSpecial.FIRST_LINE : c_paragraphSpecial.HANGING); } this.cmbSpecial.setValue(this.CurSpecial); this.numSpecialBy.setValue(this.FirstLine!== null ? Math.abs(Common.Utils.Metric.fnRecalcFromMM(this.FirstLine)) : '', true); @@ -478,7 +478,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. tabPos: pos, value: parseFloat(pos.toFixed(3)) + ' ' + Common.Utils.Metric.getCurrentMetricName(), tabAlign: tab.asc_getValue(), - displayTabAlign: this._arrKeyTabAlign[tab.get_Value()] + displayTabAlign: this._arrKeyTabAlign[tab.asc_getValue()] }); arr.push(rec); } @@ -711,7 +711,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. this.numSpecialBy.setValue(0, true); } if (this._changedProps) { - if (this._changedProps.get_Ind()===null || this._changedProps.get_Ind()===undefined) + if (this._changedProps.asc_getInd()===null || this._changedProps.asc_getInd()===undefined) this._changedProps.put_Ind(new Asc.asc_CParagraphInd()); var value = Common.Utils.Metric.fnRecalcToMM(this.numSpecialBy.getNumberValue()); if (value === 0) { @@ -721,13 +721,13 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. if (this.CurSpecial === c_paragraphSpecial.HANGING) { value = -value; } - this._changedProps.get_Ind().put_FirstLine(value); + this._changedProps.asc_getInd().put_FirstLine(value); } }, onFirstLineChange: function(field, newValue, oldValue, eOpts){ if (this._changedProps) { - if (this._changedProps.get_Ind()===null || this._changedProps.get_Ind()===undefined) + if (this._changedProps.asc_getInd()===null || this._changedProps.asc_getInd()===undefined) this._changedProps.put_Ind(new Asc.asc_CParagraphInd()); var value = Common.Utils.Metric.fnRecalcToMM(field.getNumberValue()); if (this.CurSpecial === c_paragraphSpecial.HANGING) { @@ -739,7 +739,7 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. this.CurSpecial = c_paragraphSpecial.NONE_SPECIAL; this.cmbSpecial.setValue(c_paragraphSpecial.NONE_SPECIAL); } - this._changedProps.get_Ind().put_FirstLine(value); + this._changedProps.asc_getInd().put_FirstLine(value); } }, @@ -776,8 +776,8 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. textTitle: 'Paragraph - Advanced Settings', strIndentsFirstLine: 'First line', - strIndentsLeftText: 'Indent Left', - strIndentsRightText: 'Indent Right', + strIndentsLeftText: 'Left', + strIndentsRightText: 'Right', strParagraphIndents: 'Indents & Spacing', strParagraphFont: 'Font', cancelButtonText: 'Cancel', @@ -811,12 +811,13 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. textFirstLine: 'First line', textHanging: 'Hanging', strIndentsSpecialBy: 'By', - strIndentsSpacingBefore: 'Spacing Before', - strIndentsSpacingAfter: 'Spacing After', - strIndentLineSpacingAt: 'At', + strIndentsSpacingBefore: 'Before', + strIndentsSpacingAfter: 'After', strIndentsLineSpacing: 'Line Spacing', txtAutoText: 'Auto', textAuto: 'Multiple', - textExact: 'Exactly' + textExact: 'Exactly', + strIndent: 'Indents', + strSpacing: 'Spacing' }, SSE.Views.ParagraphSettingsAdvanced || {})); }); \ No newline at end of file diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index 8c4acb5128..ba924f6487 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -1805,8 +1805,8 @@ "SSE.Views.ParagraphSettingsAdvanced.strAllCaps": "All caps", "SSE.Views.ParagraphSettingsAdvanced.strDoubleStrike": "Double strikethrough", "SSE.Views.ParagraphSettingsAdvanced.strIndentsFirstLine": "First Line", - "SSE.Views.ParagraphSettingsAdvanced.strIndentsLeftText": "Indent Left", - "SSE.Views.ParagraphSettingsAdvanced.strIndentsRightText": "Indent Right", + "SSE.Views.ParagraphSettingsAdvanced.strIndentsLeftText": "Left", + "SSE.Views.ParagraphSettingsAdvanced.strIndentsRightText": "Right", "SSE.Views.ParagraphSettingsAdvanced.strParagraphFont": "Font", "SSE.Views.ParagraphSettingsAdvanced.strParagraphIndents": "Indents & Spacing", "SSE.Views.ParagraphSettingsAdvanced.strSmallCaps": "Small caps", @@ -1836,13 +1836,14 @@ "SSE.Views.ParagraphSettingsAdvanced.textFirstLine": "First line", "SSE.Views.ParagraphSettingsAdvanced.textHanging": "Hanging", "SSE.Views.ParagraphSettingsAdvanced.strIndentsSpecialBy": "By", - "SSE.Views.ParagraphSettingsAdvanced.strIndentsSpacingBefore": "Spacing Before", - "SSE.Views.ParagraphSettingsAdvanced.strIndentsSpacingAfter": "Spacing After", - "SSE.Views.ParagraphSettingsAdvanced.strIndentLineSpacingAt": "At", + "SSE.Views.ParagraphSettingsAdvanced.strIndentsSpacingBefore": "Before", + "SSE.Views.ParagraphSettingsAdvanced.strIndentsSpacingAfter": "After", "SSE.Views.ParagraphSettingsAdvanced.strIndentsLineSpacing": "Line Spacing", "SSE.Views.ParagraphSettingsAdvanced.txtAutoText": "Auto", "SSE.Views.ParagraphSettingsAdvanced.textAuto": "Multiple", "SSE.Views.ParagraphSettingsAdvanced.textExact": "Exactly", + "SSE.Views.ParagraphSettingsAdvanced.strIndent": "Indents", + "SSE.Views.ParagraphSettingsAdvanced.strSpacing": "Spacing", "SSE.Views.PivotSettings.notcriticalErrorTitle": "Warning", "SSE.Views.PivotSettings.textAdvanced": "Show advanced settings", "SSE.Views.PivotSettings.textCancel": "Cancel", From 16b1c2df1efd87248bc6052eeeb90aec14b67de5 Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Fri, 9 Aug 2019 16:48:27 +0300 Subject: [PATCH 12/15] [DE] [PE] [SSE] Fix translations --- .../ParagraphSettingsAdvanced.template | 2 +- .../app/view/ParagraphSettingsAdvanced.js | 8 +++---- apps/documenteditor/main/locale/en.json | 1 - apps/documenteditor/main/locale/ru.json | 21 ++++++++++++++++++- .../ParagraphSettingsAdvanced.template | 2 +- .../app/view/ParagraphSettingsAdvanced.js | 10 +++------ apps/presentationeditor/main/locale/en.json | 4 ---- apps/presentationeditor/main/locale/ru.json | 14 ++++++++++++- .../ParagraphSettingsAdvanced.template | 2 +- .../app/view/ParagraphSettingsAdvanced.js | 11 +++------- apps/spreadsheeteditor/main/locale/en.json | 4 ---- apps/spreadsheeteditor/main/locale/ru.json | 14 ++++++++++++- 12 files changed, 58 insertions(+), 35 deletions(-) diff --git a/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template b/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template index ba85abc73e..f7eb47c28c 100644 --- a/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template +++ b/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template @@ -2,7 +2,7 @@
- +
diff --git a/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js b/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js index f35abbd3de..6d311f1d6f 100644 --- a/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js +++ b/apps/documenteditor/main/app/view/ParagraphSettingsAdvanced.js @@ -112,9 +112,9 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem this.CurSpecial = undefined; this._arrTextAlignment = [ - {displayValue: this.textLeft, value: c_paragraphTextAlignment.LEFT}, - {displayValue: this.textCentered, value: c_paragraphTextAlignment.CENTERED}, - {displayValue: this.textRight, value: c_paragraphTextAlignment.RIGHT}, + {displayValue: this.textTabLeft, value: c_paragraphTextAlignment.LEFT}, + {displayValue: this.textTabCenter, value: c_paragraphTextAlignment.CENTERED}, + {displayValue: this.textTabRight, value: c_paragraphTextAlignment.RIGHT}, {displayValue: this.textJustified, value: c_paragraphTextAlignment.JUSTIFIED} ]; @@ -1505,11 +1505,9 @@ define([ 'text!documenteditor/main/app/template/ParagraphSettingsAdvanced.tem textNoneSpecial: '(none)', textFirstLine: 'First line', textHanging: 'Hanging', - textCentered: 'Centered', textJustified: 'Justified', textBodyText: 'BodyText', textLevel: 'Level ', - strIndentsTextAlignment: 'Text Alignment', strIndentsOutlinelevel: 'Outline level', strIndent: 'Indents', strSpacing: 'Spacing' diff --git a/apps/documenteditor/main/locale/en.json b/apps/documenteditor/main/locale/en.json index 3b0bbac7e7..255c7fbf8f 100644 --- a/apps/documenteditor/main/locale/en.json +++ b/apps/documenteditor/main/locale/en.json @@ -1772,7 +1772,6 @@ "DE.Views.ParagraphSettingsAdvanced.textJustified": "Justified", "DE.Views.ParagraphSettingsAdvanced.textBodyText": "BodyText", "DE.Views.ParagraphSettingsAdvanced.textLevel": "Level ", - "DE.Views.ParagraphSettingsAdvanced.strIndentsTextAlignment": "Text Alignment", "DE.Views.ParagraphSettingsAdvanced.strIndentsOutlinelevel": "Outline level", "DE.Views.ParagraphSettingsAdvanced.strIndent": "Indents", "DE.Views.ParagraphSettingsAdvanced.strSpacing": "Spacing", diff --git a/apps/documenteditor/main/locale/ru.json b/apps/documenteditor/main/locale/ru.json index 0e7a5ed34f..dc93b40d9c 100644 --- a/apps/documenteditor/main/locale/ru.json +++ b/apps/documenteditor/main/locale/ru.json @@ -1712,7 +1712,8 @@ "DE.Views.ParagraphSettingsAdvanced.strMargins": "Внутренние поля", "DE.Views.ParagraphSettingsAdvanced.strOrphan": "Запрет висячих строк", "DE.Views.ParagraphSettingsAdvanced.strParagraphFont": "Шрифт", - "DE.Views.ParagraphSettingsAdvanced.strParagraphIndents": "Отступы и положение", + "DE.Views.ParagraphSettingsAdvanced.strParagraphIndents": "Отступы и интервалы", + "DE.Views.ParagraphSettingsAdvanced.strParagraphLine": "Положение на странице", "DE.Views.ParagraphSettingsAdvanced.strParagraphPosition": "Положение", "DE.Views.ParagraphSettingsAdvanced.strSmallCaps": "Малые прописные", "DE.Views.ParagraphSettingsAdvanced.strStrike": "Зачёркивание", @@ -1753,6 +1754,24 @@ "DE.Views.ParagraphSettingsAdvanced.tipRight": "Задать только правую границу", "DE.Views.ParagraphSettingsAdvanced.tipTop": "Задать только верхнюю границу", "DE.Views.ParagraphSettingsAdvanced.txtNoBorders": "Без границ", + "DE.Views.ParagraphSettingsAdvanced.strIndentsSpacingBefore": "Перед", + "DE.Views.ParagraphSettingsAdvanced.strIndentsSpacingAfter": "После", + "DE.Views.ParagraphSettingsAdvanced.strIndentsLineSpacing": "Междустрочный интервал", + "DE.Views.ParagraphSettingsAdvanced.txtAutoText": "Auto", + "DE.Views.ParagraphSettingsAdvanced.textAuto": "Множитель", + "DE.Views.ParagraphSettingsAdvanced.textAtLeast": "Минимум", + "DE.Views.ParagraphSettingsAdvanced.textExact": "Точно", + "DE.Views.ParagraphSettingsAdvanced.strSomeParagraphSpace": "Не добавлять интервал между абзацами одного стиля", + "DE.Views.ParagraphSettingsAdvanced.strIndentsSpecial": "Первая строка", + "DE.Views.ParagraphSettingsAdvanced.textNoneSpecial": "(нет)", + "DE.Views.ParagraphSettingsAdvanced.textFirstLine": "Отступ", + "DE.Views.ParagraphSettingsAdvanced.textHanging": "Выступ", + "DE.Views.ParagraphSettingsAdvanced.textJustified": "По ширине", + "DE.Views.ParagraphSettingsAdvanced.textBodyText": "Основной текст", + "DE.Views.ParagraphSettingsAdvanced.textLevel": "Уровень ", + "DE.Views.ParagraphSettingsAdvanced.strIndentsOutlinelevel": "Уровень", + "DE.Views.ParagraphSettingsAdvanced.strIndent": "Отступы", + "DE.Views.ParagraphSettingsAdvanced.strSpacing": "Интервал между абзацами", "DE.Views.RightMenu.txtChartSettings": "Параметры диаграммы", "DE.Views.RightMenu.txtHeaderFooterSettings": "Параметры верхнего и нижнего колонтитулов", "DE.Views.RightMenu.txtImageSettings": "Параметры изображения", diff --git a/apps/presentationeditor/main/app/template/ParagraphSettingsAdvanced.template b/apps/presentationeditor/main/app/template/ParagraphSettingsAdvanced.template index 88d2cb31cc..622c720517 100644 --- a/apps/presentationeditor/main/app/template/ParagraphSettingsAdvanced.template +++ b/apps/presentationeditor/main/app/template/ParagraphSettingsAdvanced.template @@ -2,7 +2,7 @@
- +
diff --git a/apps/presentationeditor/main/app/view/ParagraphSettingsAdvanced.js b/apps/presentationeditor/main/app/view/ParagraphSettingsAdvanced.js index 36f30ee9fc..b432738741 100644 --- a/apps/presentationeditor/main/app/view/ParagraphSettingsAdvanced.js +++ b/apps/presentationeditor/main/app/view/ParagraphSettingsAdvanced.js @@ -91,9 +91,9 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced this.CurLineRuleIdx = this._arrLineRule.indexOf(curItem); this._arrTextAlignment = [ - {displayValue: this.textLeft, value: c_paragraphTextAlignment.LEFT}, - {displayValue: this.textCentered, value: c_paragraphTextAlignment.CENTERED}, - {displayValue: this.textRight, value: c_paragraphTextAlignment.RIGHT}, + {displayValue: this.textTabLeft, value: c_paragraphTextAlignment.LEFT}, + {displayValue: this.textTabCenter, value: c_paragraphTextAlignment.CENTERED}, + {displayValue: this.textTabRight, value: c_paragraphTextAlignment.RIGHT}, {displayValue: this.textJustified, value: c_paragraphTextAlignment.JUSTIFIED} ]; @@ -798,11 +798,7 @@ define([ 'text!presentationeditor/main/app/template/ParagraphSettingsAdvanced textTabPosition: 'Tab Position', textDefault: 'Default Tab', noTabs: 'The specified tabs will appear in this field', - strIndentsTextAlignment: 'Text Alignment', - textLeft: 'Left', - textCentered: 'Centered', textJustified: 'Justified', - textRight: 'Right', strIndentsSpecial: 'Special', textNoneSpecial: '(none)', textFirstLine: 'First line', diff --git a/apps/presentationeditor/main/locale/en.json b/apps/presentationeditor/main/locale/en.json index 375ab56579..1bd4d734bc 100644 --- a/apps/presentationeditor/main/locale/en.json +++ b/apps/presentationeditor/main/locale/en.json @@ -1345,11 +1345,7 @@ "PE.Views.ParagraphSettingsAdvanced.textTabPosition": "Tab Position", "PE.Views.ParagraphSettingsAdvanced.textTabRight": "Right", "PE.Views.ParagraphSettingsAdvanced.textTitle": "Paragraph - Advanced Settings", - "PE.Views.ParagraphSettingsAdvanced.strIndentsTextAlignment": "Text Alignment", - "PE.Views.ParagraphSettingsAdvanced.textLeft": "Left", - "PE.Views.ParagraphSettingsAdvanced.textCentered": "Centered", "PE.Views.ParagraphSettingsAdvanced.textJustified": "Justified", - "PE.Views.ParagraphSettingsAdvanced.textRight": "Right", "PE.Views.ParagraphSettingsAdvanced.strIndentsSpecial": "Special", "PE.Views.ParagraphSettingsAdvanced.textNoneSpecial": "(none)", "PE.Views.ParagraphSettingsAdvanced.textFirstLine": "First line", diff --git a/apps/presentationeditor/main/locale/ru.json b/apps/presentationeditor/main/locale/ru.json index 61bac22100..4c132fcfa9 100644 --- a/apps/presentationeditor/main/locale/ru.json +++ b/apps/presentationeditor/main/locale/ru.json @@ -1326,7 +1326,7 @@ "PE.Views.ParagraphSettingsAdvanced.strIndentsLeftText": "Слева", "PE.Views.ParagraphSettingsAdvanced.strIndentsRightText": "Справа", "PE.Views.ParagraphSettingsAdvanced.strParagraphFont": "Шрифт", - "PE.Views.ParagraphSettingsAdvanced.strParagraphIndents": "Отступы и положение", + "PE.Views.ParagraphSettingsAdvanced.strParagraphIndents": "Отступы и интервалы", "PE.Views.ParagraphSettingsAdvanced.strSmallCaps": "Малые прописные", "PE.Views.ParagraphSettingsAdvanced.strStrike": "Зачёркивание", "PE.Views.ParagraphSettingsAdvanced.strSubscript": "Подстрочные", @@ -1344,6 +1344,18 @@ "PE.Views.ParagraphSettingsAdvanced.textTabPosition": "Позиция", "PE.Views.ParagraphSettingsAdvanced.textTabRight": "По правому краю", "PE.Views.ParagraphSettingsAdvanced.textTitle": "Абзац - дополнительные параметры", + "PE.Views.ParagraphSettingsAdvanced.strIndentsSpacingBefore": "Перед", + "PE.Views.ParagraphSettingsAdvanced.strIndentsSpacingAfter": "После", + "PE.Views.ParagraphSettingsAdvanced.strIndentsLineSpacing": "Междустрочный интервал", + "PE.Views.ParagraphSettingsAdvanced.textAuto": "Множитель", + "PE.Views.ParagraphSettingsAdvanced.textExact": "Точно", + "PE.Views.ParagraphSettingsAdvanced.strIndentsSpecial": "Первая строка", + "PE.Views.ParagraphSettingsAdvanced.textNoneSpecial": "(нет)", + "PE.Views.ParagraphSettingsAdvanced.textFirstLine": "Отступ", + "PE.Views.ParagraphSettingsAdvanced.textHanging": "Выступ", + "PE.Views.ParagraphSettingsAdvanced.textJustified": "По ширине", + "PE.Views.ParagraphSettingsAdvanced.strIndent": "Отступы", + "PE.Views.ParagraphSettingsAdvanced.strSpacing": "Интервал между абзацами", "PE.Views.RightMenu.txtChartSettings": "Параметры диаграммы", "PE.Views.RightMenu.txtImageSettings": "Параметры изображения", "PE.Views.RightMenu.txtParagraphSettings": "Параметры текста", diff --git a/apps/spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced.template b/apps/spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced.template index 88d2cb31cc..622c720517 100644 --- a/apps/spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced.template +++ b/apps/spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced.template @@ -2,7 +2,7 @@
- +
diff --git a/apps/spreadsheeteditor/main/app/view/ParagraphSettingsAdvanced.js b/apps/spreadsheeteditor/main/app/view/ParagraphSettingsAdvanced.js index cd4b61c8bc..228de3e9c6 100644 --- a/apps/spreadsheeteditor/main/app/view/ParagraphSettingsAdvanced.js +++ b/apps/spreadsheeteditor/main/app/view/ParagraphSettingsAdvanced.js @@ -91,9 +91,9 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. this.CurLineRuleIdx = this._arrLineRule.indexOf(curItem); this._arrTextAlignment = [ - {displayValue: this.textLeft, value: c_paragraphTextAlignment.LEFT}, - {displayValue: this.textCentered, value: c_paragraphTextAlignment.CENTERED}, - {displayValue: this.textRight, value: c_paragraphTextAlignment.RIGHT}, + {displayValue: this.textTabLeft, value: c_paragraphTextAlignment.LEFT}, + {displayValue: this.textTabCenter, value: c_paragraphTextAlignment.CENTERED}, + {displayValue: this.textTabRight, value: c_paragraphTextAlignment.RIGHT}, {displayValue: this.textJustified, value: c_paragraphTextAlignment.JUSTIFIED} ]; @@ -801,16 +801,11 @@ define([ 'text!spreadsheeteditor/main/app/template/ParagraphSettingsAdvanced. textTabPosition: 'Tab Position', textDefault: 'Default Tab', noTabs: 'The specified tabs will appear in this field', - strIndentsTextAlignment: 'Text Alignment', - textLeft: 'Left', - textCentered: 'Centered', textJustified: 'Justified', - textRight: 'Right', strIndentsSpecial: 'Special', textNoneSpecial: '(none)', textFirstLine: 'First line', textHanging: 'Hanging', - strIndentsSpecialBy: 'By', strIndentsSpacingBefore: 'Before', strIndentsSpacingAfter: 'After', strIndentsLineSpacing: 'Line Spacing', diff --git a/apps/spreadsheeteditor/main/locale/en.json b/apps/spreadsheeteditor/main/locale/en.json index ba924f6487..fb5d413898 100644 --- a/apps/spreadsheeteditor/main/locale/en.json +++ b/apps/spreadsheeteditor/main/locale/en.json @@ -1826,11 +1826,7 @@ "SSE.Views.ParagraphSettingsAdvanced.textTabPosition": "Tab Position", "SSE.Views.ParagraphSettingsAdvanced.textTabRight": "Right", "SSE.Views.ParagraphSettingsAdvanced.textTitle": "Paragraph - Advanced Settings", - "SSE.Views.ParagraphSettingsAdvanced.strIndentsTextAlignment": "Text Alignment", - "SSE.Views.ParagraphSettingsAdvanced.textLeft": "Left", - "SSE.Views.ParagraphSettingsAdvanced.textCentered": "Centered", "SSE.Views.ParagraphSettingsAdvanced.textJustified": "Justified", - "SSE.Views.ParagraphSettingsAdvanced.textRight": "Right", "SSE.Views.ParagraphSettingsAdvanced.strIndentsSpecial": "Special", "SSE.Views.ParagraphSettingsAdvanced.textNoneSpecial": "(none)", "SSE.Views.ParagraphSettingsAdvanced.textFirstLine": "First line", diff --git a/apps/spreadsheeteditor/main/locale/ru.json b/apps/spreadsheeteditor/main/locale/ru.json index 7511369893..f17354befa 100644 --- a/apps/spreadsheeteditor/main/locale/ru.json +++ b/apps/spreadsheeteditor/main/locale/ru.json @@ -1803,7 +1803,7 @@ "SSE.Views.ParagraphSettingsAdvanced.strIndentsLeftText": "Слева", "SSE.Views.ParagraphSettingsAdvanced.strIndentsRightText": "Справа", "SSE.Views.ParagraphSettingsAdvanced.strParagraphFont": "Шрифт", - "SSE.Views.ParagraphSettingsAdvanced.strParagraphIndents": "Отступы и положение", + "SSE.Views.ParagraphSettingsAdvanced.strParagraphIndents": "Отступы и интервалы", "SSE.Views.ParagraphSettingsAdvanced.strSmallCaps": "Малые прописные", "SSE.Views.ParagraphSettingsAdvanced.strStrike": "Зачёркивание", "SSE.Views.ParagraphSettingsAdvanced.strSubscript": "Подстрочные", @@ -1821,6 +1821,18 @@ "SSE.Views.ParagraphSettingsAdvanced.textTabPosition": "Позиция", "SSE.Views.ParagraphSettingsAdvanced.textTabRight": "По правому краю", "SSE.Views.ParagraphSettingsAdvanced.textTitle": "Абзац - дополнительные параметры", + "SSE.Views.ParagraphSettingsAdvanced.strIndentsSpacingBefore": "Перед", + "SSE.Views.ParagraphSettingsAdvanced.strIndentsSpacingAfter": "После", + "SSE.Views.ParagraphSettingsAdvanced.strIndentsLineSpacing": "Междустрочный интервал", + "SSE.Views.ParagraphSettingsAdvanced.textAuto": "Множитель", + "SSE.Views.ParagraphSettingsAdvanced.textExact": "Точно", + "SSE.Views.ParagraphSettingsAdvanced.strIndentsSpecial": "Первая строка", + "SSE.Views.ParagraphSettingsAdvanced.textNoneSpecial": "(нет)", + "SSE.Views.ParagraphSettingsAdvanced.textFirstLine": "Отступ", + "SSE.Views.ParagraphSettingsAdvanced.textHanging": "Выступ", + "SSE.Views.ParagraphSettingsAdvanced.textJustified": "По ширине", + "SSE.Views.ParagraphSettingsAdvanced.strIndent": "Отступы", + "SSE.Views.ParagraphSettingsAdvanced.strSpacing": "Интервал между абзацами", "SSE.Views.PivotSettings.notcriticalErrorTitle": "Внимание", "SSE.Views.PivotSettings.textAdvanced": "Дополнительные параметры", "SSE.Views.PivotSettings.textCancel": "Отмена", From 15c62110f3147abba7d98f1758c49a7d9f6640a1 Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Fri, 9 Aug 2019 17:06:01 +0300 Subject: [PATCH 13/15] [SSE] Fix resize filter dialog --- .../main/app/view/AutoFilterDialog.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/spreadsheeteditor/main/app/view/AutoFilterDialog.js b/apps/spreadsheeteditor/main/app/view/AutoFilterDialog.js index eecd78c84a..4c3b659c1b 100644 --- a/apps/spreadsheeteditor/main/app/view/AutoFilterDialog.js +++ b/apps/spreadsheeteditor/main/app/view/AutoFilterDialog.js @@ -517,7 +517,7 @@ define([ this.handler = options.handler; this.throughIndexes = []; this.filteredIndexes = []; - this.curSize = undefined; + this.curSize = null; _options.tpl = _.template(this.template)(_options); @@ -1372,9 +1372,14 @@ define([ onWindowResize: function () { var size = this.getSize(); - if (size !== this.curSize) { - this.$window.find('.combo-values').css({'height': size[1]-100 + 'px'}); + if (this.curSize === null) { this.curSize = size; + } else { + if (size[0] !== this.curSize[0] || size[1] !== this.curSize[1]) { + this.$window.find('.combo-values').css({'height': size[1] - 100 + 'px'}); + this.curSize = size; + this.cellsList.scroller.update({minScrollbarLength : 40, alwaysVisibleY: true, suppressScrollX: true}); + } } }, From 331bb11f76626e7f01ce9632711ec9ce3fdfbf01 Mon Sep 17 00:00:00 2001 From: Julia Svinareva Date: Fri, 9 Aug 2019 17:11:51 +0300 Subject: [PATCH 14/15] [DE] [PE] [SSE] Display none Outline level and preview --- .../main/app/template/ParagraphSettingsAdvanced.template | 4 ++-- .../main/app/template/ParagraphSettingsAdvanced.template | 2 +- .../main/app/template/ParagraphSettingsAdvanced.template | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template b/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template index f7eb47c28c..685afabe84 100644 --- a/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template +++ b/apps/documenteditor/main/app/template/ParagraphSettingsAdvanced.template @@ -5,7 +5,7 @@
-
+ @@ -53,7 +53,7 @@
-
+
-
+
-
+