diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index aafe23e8e..7768d08e6 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -569,6 +569,11 @@ define([ idx = 7; break; } + if ('{{DEFAULT_LANG}}' === 'ru') { + 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); diff --git a/apps/documenteditor/main/app/view/ListSettingsDialog.js b/apps/documenteditor/main/app/view/ListSettingsDialog.js index abbb251c9..5d9a0d05d 100644 --- a/apps/documenteditor/main/app/view/ListSettingsDialog.js +++ b/apps/documenteditor/main/app/view/ListSettingsDialog.js @@ -202,22 +202,29 @@ define([ '', '' ]); + var items = [ + { displayValue: this.txtNone, value: Asc.c_oAscNumberingFormat.None }, + { displayValue: '1, 2, 3,...', value: Asc.c_oAscNumberingFormat.Decimal }, + { 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 } + ]; + if ('{{DEFAULT_LANG}}' === 'ru') { + items = items.concat([ + { displayValue: 'а, б, в,...', value: Asc.c_oAscNumberingFormat.RussianLower }, + { displayValue: 'А, Б, В,...', value: Asc.c_oAscNumberingFormat.RussianUpper } + ]); + } this.cmbFormat = new Common.UI.ComboBoxCustom({ el : $window.find('#id-dlg-numbering-format'), - menuStyle : 'min-width: 100%;max-height: 183px;', + menuStyle : 'min-width: 100%;max-height: 220px;', style : this.type==2 ? "width: 107px;" : "width: 129px;", editable : false, template : _.template(template.join('')), itemsTemplate: _.template(itemsTemplate.join('')), takeFocusOnClose: true, - data : [ - { displayValue: this.txtNone, value: Asc.c_oAscNumberingFormat.None }, - { displayValue: '1, 2, 3,...', value: Asc.c_oAscNumberingFormat.Decimal }, - { 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 } - ], + data : items, updateFormControl: function(record) { var formcontrol = $(this.el).find('.form-control'); if (record) { diff --git a/apps/documenteditor/main/app/view/Toolbar.js b/apps/documenteditor/main/app/view/Toolbar.js index a294b8338..93f63587e 100644 --- a/apps/documenteditor/main/app/view/Toolbar.js +++ b/apps/documenteditor/main/app/view/Toolbar.js @@ -2043,7 +2043,7 @@ define([ cls: 'shifted-left', style: 'min-width: 145px', items: [ - {template: _.template('')}, + {template: _.template('')}, {caption: '--'}, this.mnuMarkerChangeLevel = new Common.UI.MenuItem({ caption: this.textChangeLevel, @@ -2074,7 +2074,7 @@ define([ new Common.UI.Menu({ cls: 'shifted-left', items: [ - {template: _.template('')}, + {template: _.template('')}, {caption: '--'}, this.mnuNumberChangeLevel = new Common.UI.MenuItem({ caption: this.textChangeLevel, @@ -2105,7 +2105,7 @@ define([ cls: 'shifted-left', style: 'min-width: 177px', items: [ - {template: _.template('')}, + {template: _.template('')}, {caption: '--'}, this.mnuMultiChangeLevel = new Common.UI.MenuItem({ caption: this.textChangeLevel, @@ -2226,8 +2226,7 @@ define([ el: $('#id-toolbar-menu-markers'), parentMenu: this.btnMarkers.menu, outerMenu: {menu: this.btnMarkers.menu, index: 0}, - restoreHeight: 138, - allowScrollbar: false, + restoreHeight: 144, delayRenderTips: true, store: new Common.UI.DataViewStore([ {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: -1}, skipRenderOnChange: true, tip: this.textNone}, @@ -2246,23 +2245,31 @@ define([ _conf && this.mnuMarkersPicker.selectByIndex(_conf.index, true); _conf = this.mnuNumbersPicker.conf; + var items = [ + {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: -1}, skipRenderOnChange: true, tip: this.textNone}, + {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 4}, skipRenderOnChange: true, tip: this.tipNumCapitalLetters}, + {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 5}, skipRenderOnChange: true, tip: this.tipNumLettersParentheses}, + {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 6}, skipRenderOnChange: true, tip: this.tipNumLettersPoints}, + {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} + ]; + 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} + ]); + } this.mnuNumbersPicker = new Common.UI.DataView({ el: $('#id-toolbar-menu-numbering'), parentMenu: this.btnNumbers.menu, outerMenu: {menu: this.btnNumbers.menu, index: 0}, - restoreHeight: 92, - allowScrollbar: false, + restoreHeight: 265, delayRenderTips: true, - store: new Common.UI.DataViewStore([ - {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: -1}, skipRenderOnChange: true, tip: this.textNone}, - {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 4}, skipRenderOnChange: true, tip: this.tipNumCapitalLetters}, - {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 5}, skipRenderOnChange: true, tip: this.tipNumLettersParentheses}, - {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 6}, skipRenderOnChange: true, tip: this.tipNumLettersPoints}, - {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} - ]), + store: new Common.UI.DataViewStore(items), itemTemplate: _.template('
') }); this.btnNumbers.menu.setInnerMenu([{menu: this.mnuNumbersPicker, index: 0}]); @@ -2273,8 +2280,7 @@ define([ el: $('#id-toolbar-menu-multilevels'), parentMenu: this.btnMultilevels.menu, outerMenu: {menu: this.btnMultilevels.menu, index: 0}, - restoreHeight: 92, - allowScrollbar: false, + restoreHeight: 176, delayRenderTips: true, store: new Common.UI.DataViewStore([ {id: 'id-multilevels-' + Common.UI.getId(), data: {type: 2, subtype: -1}, skipRenderOnChange: true, tip: this.textNone}, @@ -2870,7 +2876,11 @@ define([ mniRemoveFooter: 'Remove Footer', mniInsertSSE: 'Insert Spreadsheet', tipSelectAll: 'Select all', - tipCut: 'Cut' + tipCut: 'Cut', + tipRusUpperPoints: 'А. Б. В.', + tipRusUpperParentheses: 'А) Б) В)', + tipRusLowerPoints: 'а. б. в.', + tipRusLowerParentheses: 'а) б) в)' } })(), DE.Views.Toolbar || {})); });