[DE] Change preview for list types

This commit is contained in:
Julia Radzhabova 2021-04-01 18:57:00 +03:00
parent e007a9a7b6
commit 2b547dc8c5
3 changed files with 27 additions and 26 deletions

View file

@ -292,7 +292,9 @@ define([
toolbar.mnuMarkersPicker.on('item:click', _.bind(this.onSelectBullets, this, toolbar.btnMarkers));
toolbar.mnuNumbersPicker.on('item:click', _.bind(this.onSelectBullets, this, toolbar.btnNumbers));
toolbar.mnuMultilevelPicker.on('item:click', _.bind(this.onSelectBullets, this, toolbar.btnMultilevels));
toolbar.btnMultilevels.menu.on('show:after', _.bind(this.onMultilevelsShowAfter, this));
toolbar.btnMarkers.menu.on('show:after', _.bind(this.onListShowAfter, this, 0, toolbar.mnuMarkersPicker));
toolbar.btnNumbers.menu.on('show:after', _.bind(this.onListShowAfter, this, 1, toolbar.mnuNumbersPicker));
toolbar.btnMultilevels.menu.on('show:after', _.bind(this.onListShowAfter, this, 2, toolbar.mnuMultilevelPicker));
toolbar.mnuMarkerSettings.on('click', _.bind(this.onMarkerSettingsClick, this, 0));
toolbar.mnuNumberSettings.on('click', _.bind(this.onMarkerSettingsClick, this, 1));
toolbar.mnuMultilevelSettings.on('click', _.bind(this.onMarkerSettingsClick, this, 2));
@ -1355,14 +1357,14 @@ define([
Common.NotificationCenter.trigger('edit:complete', this.toolbar);
},
onMultilevelsShowAfter: function(menu) {
var store = this.toolbar.mnuMultilevelPicker.store;
onListShowAfter: function(type, picker) {
var store = picker.store;
var arr = [];
store.each(function(item){
arr.push(item.get('id'));
});
if (this.api) {
this.api.SetDrawImagePreviewBulletForMenu(arr, 2);
this.api.SetDrawImagePreviewBulletForMenu(arr, type);
}
},

View file

@ -1734,7 +1734,7 @@ define([
new Common.UI.Menu({
cls: 'shifted-left',
items: [
{template: _.template('<div id="id-toolbar-menu-numbering" class="menu-markers" style="width: 185px; margin: 0 9px;"></div>')},
{template: _.template('<div id="id-toolbar-menu-numbering" class="menu-markers" style="width: 353px; margin: 0 9px;"></div>')},
this.mnuNumberChangeLevel = new Common.UI.MenuItem({
caption: this.textChangeLevel,
style: 'padding-right:20px;',
@ -1856,17 +1856,17 @@ define([
restoreHeight: 138,
allowScrollbar: false,
store: new Common.UI.DataViewStore([
{offsety: 0, data: {type: 0, subtype: -1}},
{offsety: 38, data: {type: 0, subtype: 1}},
{offsety: 76, data: {type: 0, subtype: 2}},
{offsety: 114, data: {type: 0, subtype: 3}},
{offsety: 152, data: {type: 0, subtype: 4}},
{offsety: 190, data: {type: 0, subtype: 5}},
{offsety: 228, data: {type: 0, subtype: 6}},
{offsety: 266, data: {type: 0, subtype: 7}},
{offsety: 684, data: {type: 0, subtype: 8}}
{id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: -1}},
{id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 1}},
{id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 2}},
{id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 3}},
{id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 4}},
{id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 5}},
{id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 6}},
{id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 7}},
{id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 8}}
]),
itemTemplate: _.template('<div id="<%= id %>" class="item-markerlist" style="background-position: 0 -<%= offsety %>px;"></div>')
itemTemplate: _.template('<div id="<%= id %>" class="item-markerlist"></div>')
});
_conf && this.mnuMarkersPicker.selectByIndex(_conf.index, true);
@ -1877,16 +1877,16 @@ define([
restoreHeight: 92,
allowScrollbar: false,
store: new Common.UI.DataViewStore([
{offsety: 0, data: {type: 1, subtype: -1}},
{offsety: 570, data: {type: 1, subtype: 4}},
{offsety: 532, data: {type: 1, subtype: 5}},
{offsety: 608, data: {type: 1, subtype: 6}},
{offsety: 418, data: {type: 1, subtype: 1}},
{offsety: 456, data: {type: 1, subtype: 2}},
{offsety: 494, data: {type: 1, subtype: 3}},
{offsety: 646, data: {type: 1, subtype: 7}}
{id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: -1}},
{id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 4}},
{id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 5}},
{id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 6}},
{id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 1}},
{id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 2}},
{id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 3}},
{id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 7}}
]),
itemTemplate: _.template('<div id="<%= id %>" class="item-markerlist" style="background-position: 0 -<%= offsety %>px;"></div>')
itemTemplate: _.template('<div id="<%= id %>" class="item-multilevellist"></div>')
});
_conf && this.mnuNumbersPicker.selectByIndex(_conf.index, true);
@ -1902,7 +1902,7 @@ define([
{id: 'id-multilevels-' + Common.UI.getId(), data: {type: 2, subtype: 2}},
{id: 'id-multilevels-' + Common.UI.getId(), data: {type: 2, subtype: 3}}
]),
itemTemplate: _.template('<div id="<%= id %>" class="item-multilevellist" style=""></div>')
itemTemplate: _.template('<div id="<%= id %>" class="item-multilevellist"></div>')
});
_conf && this.mnuMultilevelPicker.selectByIndex(_conf.index, true);

View file

@ -33,7 +33,6 @@
}
.item-markerlist {
.background-ximage-v2('toolbar/bullets-and-numbering.png', 38px);
width: 38px;
height: 38px;
}