From e704ee57c2ba08420087c4123ac593ddc4525355 Mon Sep 17 00:00:00 2001 From: Julia Radzhabova Date: Wed, 31 Aug 2022 18:31:17 +0300 Subject: [PATCH] For Bug 39134 --- .../main/app/controller/Toolbar.js | 16 +++++++++------- .../main/app/view/ListSettingsDialog.js | 13 ++++++------- apps/documenteditor/main/app/view/Toolbar.js | 17 ++++++++--------- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index 7768d08e6..7260571e4 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -569,15 +569,17 @@ define([ idx = 7; break; } - if ('{{DEFAULT_LANG}}' === 'ru') { - if (this._state.bullets.subtype>7 && this._state.bullets.subtype<=11) { - idx = this._state.bullets.subtype; - } + if (this._state.bullets.subtype>7 && this._state.bullets.subtype<=11) { + idx = this._state.bullets.subtype; } this.toolbar.btnNumbers.toggle(true, true); - if (idx!==undefined) - this.toolbar.mnuNumbersPicker.selectByIndex(idx, true); - else + if (idx!==undefined) { + if (this.toolbar.mnuNumbersPicker.store && idx>=this.toolbar.mnuNumbersPicker.store.length) + this.toolbar.mnuNumbersPicker.deselectAll(true); + else + this.toolbar.mnuNumbersPicker.selectByIndex(idx, true); + + } else this.toolbar.mnuNumbersPicker.deselectAll(true); this.toolbar.mnuMultilevelPicker.deselectAll(true); this.toolbar.mnuNumberSettings && this.toolbar.mnuNumberSettings.setDisabled(idx==0); diff --git a/apps/documenteditor/main/app/view/ListSettingsDialog.js b/apps/documenteditor/main/app/view/ListSettingsDialog.js index 5d9a0d05d..7d1e0c3c7 100644 --- a/apps/documenteditor/main/app/view/ListSettingsDialog.js +++ b/apps/documenteditor/main/app/view/ListSettingsDialog.js @@ -208,14 +208,13 @@ define([ { displayValue: 'a, b, c,...', value: Asc.c_oAscNumberingFormat.LowerLetter }, { displayValue: 'A, B, C,...', value: Asc.c_oAscNumberingFormat.UpperLetter }, { displayValue: 'i, ii, iii,...', value: Asc.c_oAscNumberingFormat.LowerRoman }, - { displayValue: 'I, II, III,...', value: Asc.c_oAscNumberingFormat.UpperRoman } + { displayValue: 'I, II, III,...', value: Asc.c_oAscNumberingFormat.UpperRoman }, + { displayValue: 'а, б, в,...', value: Asc.c_oAscNumberingFormat.RussianLower, lang: 'ru' }, + { displayValue: 'А, Б, В,...', value: Asc.c_oAscNumberingFormat.RussianUpper, lang: 'ru' } ]; - if ('{{DEFAULT_LANG}}' === 'ru') { - items = items.concat([ - { displayValue: 'а, б, в,...', value: Asc.c_oAscNumberingFormat.RussianLower }, - { displayValue: 'А, Б, В,...', value: Asc.c_oAscNumberingFormat.RussianUpper } - ]); - } + items = _.reject(items, function(item){ + return (item.lang!==undefined && item.lang!=='{{DEFAULT_LANG}}'); + }); this.cmbFormat = new Common.UI.ComboBoxCustom({ el : $window.find('#id-dlg-numbering-format'), menuStyle : 'min-width: 100%;max-height: 220px;', diff --git a/apps/documenteditor/main/app/view/Toolbar.js b/apps/documenteditor/main/app/view/Toolbar.js index 93f63587e..dbd4350ea 100644 --- a/apps/documenteditor/main/app/view/Toolbar.js +++ b/apps/documenteditor/main/app/view/Toolbar.js @@ -2253,16 +2253,15 @@ define([ {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 1}, skipRenderOnChange: true, tip: this.tipNumNumbersPoint}, {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 2}, skipRenderOnChange: true, tip: this.tipNumNumbersParentheses}, {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 3}, skipRenderOnChange: true, tip: this.tipNumRoman}, - {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 7}, skipRenderOnChange: true, tip: this.tipNumRomanSmall} + {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 7}, skipRenderOnChange: true, tip: this.tipNumRomanSmall}, + {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 8}, skipRenderOnChange: true, tip: this.tipRusUpperPoints, lang: 'ru'}, + {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 9}, skipRenderOnChange: true, tip: this.tipRusUpperParentheses, lang: 'ru'}, + {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 10}, skipRenderOnChange: true, tip: this.tipRusLowerPoints, lang: 'ru'}, + {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 11}, skipRenderOnChange: true, tip: this.tipRusLowerParentheses, lang: 'ru'} ]; - if ('{{DEFAULT_LANG}}' === 'ru') { - items = items.concat([ - {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 8}, skipRenderOnChange: true, tip: this.tipRusUpperPoints}, - {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 9}, skipRenderOnChange: true, tip: this.tipRusUpperParentheses}, - {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 10}, skipRenderOnChange: true, tip: this.tipRusLowerPoints}, - {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 11}, skipRenderOnChange: true, tip: this.tipRusLowerParentheses} - ]); - } + items = _.reject(items, function(item){ + return (item.lang!==undefined && item.lang!=='{{DEFAULT_LANG}}'); + }); this.mnuNumbersPicker = new Common.UI.DataView({ el: $('#id-toolbar-menu-numbering'), parentMenu: this.btnNumbers.menu,