[DE] Add changing level to multilevel list menu
This commit is contained in:
parent
6f853a7c1f
commit
1ab9d09675
|
@ -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 () {
|
||||
|
|
|
@ -1707,6 +1707,7 @@ define([
|
|||
style: 'min-width: 139px',
|
||||
items: [
|
||||
{template: _.template('<div id="id-toolbar-menu-markers" class="menu-markers" style="width: 139px; margin: 0 9px;"></div>')},
|
||||
{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('<div id="id-toolbar-menu-numbering" class="menu-markers" style="width: 185px; margin: 0 9px;"></div>')},
|
||||
{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('<div id="id-toolbar-menu-multilevels" class="menu-markers" style="width: 93px; margin: 0 9px;"></div>')},
|
||||
{template: _.template('<div id="id-toolbar-menu-multilevels" class="menu-markers" style="width: 185px; margin: 0 9px;"></div>')},
|
||||
{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,
|
||||
|
|
Loading…
Reference in a new issue