diff --git a/apps/documenteditor/main/app/controller/Toolbar.js b/apps/documenteditor/main/app/controller/Toolbar.js index 77806961a..32922483c 100644 --- a/apps/documenteditor/main/app/controller/Toolbar.js +++ b/apps/documenteditor/main/app/controller/Toolbar.js @@ -301,6 +301,9 @@ define([ toolbar.mnuNumberChangeLevel && toolbar.mnuNumberChangeLevel.menu && toolbar.mnuNumberChangeLevel.menu.on('show:after', _.bind(this.onChangeLevelShowAfter, this, 1)); toolbar.mnuNumberChangeLevel.menu.on('item:click', _.bind(this.onChangeLevelClick, this, 1)); + toolbar.mnuMultiChangeLevel && toolbar.mnuMultiChangeLevel.menu && + toolbar.mnuMultiChangeLevel.menu.on('show:after', _.bind(this.onChangeLevelShowAfter, this, 2)); + toolbar.mnuMultiChangeLevel.menu.on('item:click', _.bind(this.onChangeLevelClick, this, 2)); toolbar.btnHighlightColor.on('click', _.bind(this.onBtnHighlightColor, this)); toolbar.btnFontColor.on('click', _.bind(this.onBtnFontColor, this)); toolbar.btnParagraphColor.on('click', _.bind(this.onBtnParagraphColor, this)); @@ -526,6 +529,7 @@ define([ this.toolbar.mnuMarkerSettings && this.toolbar.mnuMarkerSettings.setDisabled(this._state.bullets.subtype<0); this.toolbar.mnuMarkerChangeLevel && this.toolbar.mnuMarkerChangeLevel.setDisabled(this._state.bullets.subtype<0); this.toolbar.mnuMultilevelSettings && this.toolbar.mnuMultilevelSettings.setDisabled(this._state.bullets.subtype<0); + this.toolbar.mnuMultiChangeLevel && this.toolbar.mnuMultiChangeLevel.setDisabled(this._state.bullets.subtype<0); break; case 1: var idx; @@ -561,6 +565,7 @@ define([ this.toolbar.mnuNumberSettings && this.toolbar.mnuNumberSettings.setDisabled(idx==0); this.toolbar.mnuNumberChangeLevel && this.toolbar.mnuNumberChangeLevel.setDisabled(idx==0); this.toolbar.mnuMultilevelSettings && this.toolbar.mnuMultilevelSettings.setDisabled(idx==0); + this.toolbar.mnuMultiChangeLevel && this.toolbar.mnuMultiChangeLevel.setDisabled(idx==0); break; case 2: this.toolbar.btnMultilevels.toggle(true, true); @@ -1409,7 +1414,6 @@ define([ onChangeLevelShowAfter: function(type, menu) { var me = this; var listId = me.api.asc_GetCurrentNumberingId(), - level = me.api.asc_GetCurrentNumberingLvl(), props = (listId !== null) ? me.api.asc_GetNumberingPr(listId) : null; if (props) { this.api.SetDrawImagePreviewBulletChangeListLevel(menu.options.previewIds, props); @@ -2387,6 +2391,7 @@ define([ this.toolbar.mnuMultilevelSettings && this.toolbar.mnuMultilevelSettings.setDisabled(true); this.toolbar.mnuMarkerChangeLevel && this.toolbar.mnuMarkerChangeLevel.setDisabled(true); this.toolbar.mnuNumberChangeLevel && this.toolbar.mnuNumberChangeLevel.setDisabled(true); + this.toolbar.mnuMultiChangeLevel && this.toolbar.mnuMultiChangeLevel.setDisabled(true); }, _getApiTextSize: function () { diff --git a/apps/documenteditor/main/app/view/Toolbar.js b/apps/documenteditor/main/app/view/Toolbar.js index 329ad4379..b73c4c089 100644 --- a/apps/documenteditor/main/app/view/Toolbar.js +++ b/apps/documenteditor/main/app/view/Toolbar.js @@ -1707,6 +1707,7 @@ define([ style: 'min-width: 139px', items: [ {template: _.template('
')}, + {caption: '--'}, this.mnuMarkerChangeLevel = new Common.UI.MenuItem({ caption: this.textChangeLevel, style: 'padding-right:20px;', @@ -1727,7 +1728,7 @@ define([ }) ); - items = [], ids = []; + items = []; ids = []; for (var i=0; i<9; i++) { ids.push('id-toolbar-menu-numbering-level-' + i); items.push({template: levelTemplate, previewId: ids[i], level: i }); @@ -1737,6 +1738,7 @@ define([ cls: 'shifted-left', items: [ {template: _.template('')}, + {caption: '--'}, this.mnuNumberChangeLevel = new Common.UI.MenuItem({ caption: this.textChangeLevel, style: 'padding-right:20px;', @@ -1756,13 +1758,29 @@ define([ ] }) ); - + items = []; ids = []; + for (var i=0; i<9; i++) { + ids.push('id-toolbar-menu-multilevels-level-' + i); + items.push({template: levelTemplate, previewId: ids[i], level: i }); + } this.btnMultilevels.setMenu( new Common.UI.Menu({ cls: 'shifted-left', style: 'min-width: 90px', items: [ - {template: _.template('')}, + {template: _.template('')}, + {caption: '--'}, + this.mnuMultiChangeLevel = new Common.UI.MenuItem({ + caption: this.textChangeLevel, + style: 'padding-right:20px;', + disabled: (this.mnuMultilevelPicker.conf.index || 0)==0, + menu: new Common.UI.Menu({ + cls: 'list-settings-level', + menuAlign: 'tl-tr', + items: items, + previewIds: ids + }) + }), this.mnuMultilevelSettings = new Common.UI.MenuItem({ caption: this.textListSettings, disabled: (this.mnuMultilevelPicker.conf.index || 0)==0,