[PE] [DE] Draw list preview in sdk

This commit is contained in:
Julia Radzhabova 2021-04-02 23:04:37 +03:00
parent d5bf62a72d
commit c3fc27031f
5 changed files with 43 additions and 23 deletions

View file

@ -123,7 +123,8 @@ define([
'Slide title': this.txtSlideTitle,
'Loading': this.txtLoading,
'Click to add notes': this.txtAddNotes,
'Click to add first slide': this.txtAddFirstSlide
'Click to add first slide': this.txtAddFirstSlide,
'None': this.txtNone
};
themeNames.forEach(function(item){
@ -2675,7 +2676,8 @@ define([
textLongName: 'Enter a name that is less than 128 characters.',
textGuest: 'Guest',
txtErrorLoadHistory: 'Loading history failed',
leavePageTextOnClose: 'All unsaved changes in this document will be lost.<br> Click \'Cancel\' then \'Save\' to save them. Click \'OK\' to discard all the unsaved changes.'
leavePageTextOnClose: 'All unsaved changes in this document will be lost.<br> Click \'Cancel\' then \'Save\' to save them. Click \'OK\' to discard all the unsaved changes.',
txtNone: 'None'
}
})(), PE.Controllers.Main || {}))
});

View file

@ -298,6 +298,8 @@ define([
toolbar.cmbFontSize.on('combo:focusin', _.bind(this.onComboOpen, this, false));
toolbar.mnuMarkersPicker.on('item:click', _.bind(this.onSelectBullets, this, toolbar.btnMarkers));
toolbar.mnuNumbersPicker.on('item:click', _.bind(this.onSelectBullets, this, toolbar.btnNumbers));
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.btnFontColor.on('click', _.bind(this.onBtnFontColor, this));
toolbar.mnuFontColorPicker.on('select', _.bind(this.onSelectFontColor, this));
$('#id-toolbar-menu-new-fontcolor').on('click', _.bind(this.onNewFontColor, this));
@ -1301,6 +1303,17 @@ define([
}
},
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) {
this.api.SetDrawImagePreviewBulletForMenu(arr, type);
}
},
onSelectBullets: function(btn, picker, itemView, record) {
var rawData = {},
isPickerSelect = _.isFunction(record.toJSON);

View file

@ -1232,7 +1232,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.mnuNumberSettings = new Common.UI.MenuItem({
caption: this.textListSettings,
value: 'settings'
@ -1303,17 +1303,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);
@ -1324,16 +1324,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);

View file

@ -713,6 +713,7 @@
"PE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
"PE.Controllers.Main.txtErrorLoadHistory": "History loading failed",
"PE.Controllers.Main.leavePageTextOnClose": "All unsaved changes in this presentation will be lost.<br> Click \"Cancel\" then \"Save\" to save them. Click \"OK\" to discard all the unsaved changes.",
"PE.Controllers.Main.txtNone": "None",
"PE.Controllers.Statusbar.zoomText": "Zoom {0}%",
"PE.Controllers.Toolbar.confirmAddFontName": "The font you are going to save is not available on the current device.<br>The text style will be displayed using one of the system fonts, the saved font will be used when it is available.<br>Do you want to continue?",
"PE.Controllers.Toolbar.textAccent": "Accents",

View file

@ -51,11 +51,15 @@
}
.item-markerlist {
.background-ximage-v2('toolbar/bullets-and-numbering.png', 38px);
width: 38px;
height: 38px;
}
.item-multilevellist {
width: 80px;
height: 80px;
}
// menu zoom
.menu-zoom {
line-height: @line-height-base;