Merge pull request #1874 from ONLYOFFICE/fix/bug-39134

Fix/bug 39134
This commit is contained in:
Julia Radzhabova 2022-07-26 23:54:17 +03:00 committed by GitHub
commit 77bd151be0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 51 additions and 29 deletions

View file

@ -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);

View file

@ -202,22 +202,29 @@ define([
'</ul>',
'</div>'
]);
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) {

View file

@ -2043,7 +2043,7 @@ define([
cls: 'shifted-left',
style: 'min-width: 145px',
items: [
{template: _.template('<div id="id-toolbar-menu-markers" class="menu-markers" style="width: 145px; margin: 0 9px;"></div>')},
{template: _.template('<div id="id-toolbar-menu-markers" class="menu-markers" style="width: 153px; margin: 0 0 0 9px;"></div>')},
{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('<div id="id-toolbar-menu-numbering" class="menu-markers" style="width: 353px; margin: 0 9px;"></div>')},
{template: _.template('<div id="id-toolbar-menu-numbering" class="menu-markers" style="width: 361px; margin: 0 0 0 9px;"></div>')},
{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('<div id="id-toolbar-menu-multilevels" class="menu-markers" style="width: 185px; margin: 0 9px;"></div>')},
{template: _.template('<div id="id-toolbar-menu-multilevels" class="menu-markers" style="width: 185px; margin: 0 0 0 9px;"></div>')},
{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('<div id="<%= id %>" class="item-multilevellist"></div>')
});
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 || {}));
});