Merge branch 'feature/de-preview-bullets' into develop

This commit is contained in:
Julia Radzhabova 2021-04-10 00:37:17 +03:00
commit 57b6acfd67
14 changed files with 157 additions and 72 deletions

View file

@ -141,7 +141,8 @@ define([
"Choose an item": this.txtChoose, "Choose an item": this.txtChoose,
"Enter a date": this.txtEnterDate, "Enter a date": this.txtEnterDate,
"Type equation here": this.txtTypeEquation, "Type equation here": this.txtTypeEquation,
"Click to load image": this.txtClickToLoad "Click to load image": this.txtClickToLoad,
"None": this.txtNone
}; };
styleNames.forEach(function(item){ styleNames.forEach(function(item){
translate[item] = me['txtStyle_' + item.replace(/ /g, '_')] || item; translate[item] = me['txtStyle_' + item.replace(/ /g, '_')] || item;
@ -2903,7 +2904,8 @@ define([
errorSubmit: 'Submit failed.', errorSubmit: 'Submit failed.',
txtClickToLoad: 'Click to load image', txtClickToLoad: 'Click to load image',
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.',
textTryUndoRedoWarn: 'The Undo/Redo functions are disabled for the Fast co-editing mode.' textTryUndoRedoWarn: 'The Undo/Redo functions are disabled for the Fast co-editing mode.',
txtNone: 'None'
} }
})(), DE.Controllers.Main || {})) })(), DE.Controllers.Main || {}))
}); });

View file

@ -292,6 +292,9 @@ define([
toolbar.mnuMarkersPicker.on('item:click', _.bind(this.onSelectBullets, this, toolbar.btnMarkers)); toolbar.mnuMarkersPicker.on('item:click', _.bind(this.onSelectBullets, this, toolbar.btnMarkers));
toolbar.mnuNumbersPicker.on('item:click', _.bind(this.onSelectBullets, this, toolbar.btnNumbers)); toolbar.mnuNumbersPicker.on('item:click', _.bind(this.onSelectBullets, this, toolbar.btnNumbers));
toolbar.mnuMultilevelPicker.on('item:click', _.bind(this.onSelectBullets, this, toolbar.btnMultilevels)); toolbar.mnuMultilevelPicker.on('item:click', _.bind(this.onSelectBullets, this, toolbar.btnMultilevels));
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.mnuMarkerSettings.on('click', _.bind(this.onMarkerSettingsClick, this, 0));
toolbar.mnuNumberSettings.on('click', _.bind(this.onMarkerSettingsClick, this, 1)); toolbar.mnuNumberSettings.on('click', _.bind(this.onMarkerSettingsClick, this, 1));
toolbar.mnuMultilevelSettings.on('click', _.bind(this.onMarkerSettingsClick, this, 2)); toolbar.mnuMultilevelSettings.on('click', _.bind(this.onMarkerSettingsClick, this, 2));
@ -1354,6 +1357,17 @@ define([
Common.NotificationCenter.trigger('edit:complete', this.toolbar); Common.NotificationCenter.trigger('edit:complete', this.toolbar);
}, },
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, type);
}
},
onSelectBullets: function(btn, picker, itemView, record) { onSelectBullets: function(btn, picker, itemView, record) {
var rawData = {}, var rawData = {},
isPickerSelect = _.isFunction(record.toJSON); isPickerSelect = _.isFunction(record.toJSON);

View file

@ -1736,7 +1736,7 @@ define([
new Common.UI.Menu({ new Common.UI.Menu({
cls: 'shifted-left', cls: 'shifted-left',
items: [ 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({ this.mnuNumberChangeLevel = new Common.UI.MenuItem({
caption: this.textChangeLevel, caption: this.textChangeLevel,
style: 'padding-right:20px;', style: 'padding-right:20px;',
@ -1760,9 +1760,9 @@ define([
this.btnMultilevels.setMenu( this.btnMultilevels.setMenu(
new Common.UI.Menu({ new Common.UI.Menu({
cls: 'shifted-left', cls: 'shifted-left',
style: 'min-width: 90px', style: 'min-width: 177px',
items: [ 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: 177px; margin: 0 9px;"></div>')},
this.mnuMultilevelSettings = new Common.UI.MenuItem({ this.mnuMultilevelSettings = new Common.UI.MenuItem({
caption: this.textListSettings, caption: this.textListSettings,
disabled: (this.mnuMultilevelPicker.conf.index || 0)==0, disabled: (this.mnuMultilevelPicker.conf.index || 0)==0,
@ -1859,17 +1859,17 @@ define([
restoreHeight: 138, restoreHeight: 138,
allowScrollbar: false, allowScrollbar: false,
store: new Common.UI.DataViewStore([ store: new Common.UI.DataViewStore([
{offsety: 0, data: {type: 0, subtype: -1}}, {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: -1}},
{offsety: 38, data: {type: 0, subtype: 1}}, {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 1}},
{offsety: 76, data: {type: 0, subtype: 2}}, {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 2}},
{offsety: 114, data: {type: 0, subtype: 3}}, {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 3}},
{offsety: 152, data: {type: 0, subtype: 4}}, {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 4}},
{offsety: 190, data: {type: 0, subtype: 5}}, {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 5}},
{offsety: 228, data: {type: 0, subtype: 6}}, {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 6}},
{offsety: 266, data: {type: 0, subtype: 7}}, {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 7}},
{offsety: 684, data: {type: 0, subtype: 8}} {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); _conf && this.mnuMarkersPicker.selectByIndex(_conf.index, true);
@ -1880,16 +1880,16 @@ define([
restoreHeight: 92, restoreHeight: 92,
allowScrollbar: false, allowScrollbar: false,
store: new Common.UI.DataViewStore([ store: new Common.UI.DataViewStore([
{offsety: 0, data: {type: 1, subtype: -1}}, {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: -1}},
{offsety: 570, data: {type: 1, subtype: 4}}, {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 4}},
{offsety: 532, data: {type: 1, subtype: 5}}, {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 5}},
{offsety: 608, data: {type: 1, subtype: 6}}, {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 6}},
{offsety: 418, data: {type: 1, subtype: 1}}, {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 1}},
{offsety: 456, data: {type: 1, subtype: 2}}, {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 2}},
{offsety: 494, data: {type: 1, subtype: 3}}, {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 3}},
{offsety: 646, data: {type: 1, subtype: 7}} {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); _conf && this.mnuNumbersPicker.selectByIndex(_conf.index, true);
@ -1900,12 +1900,12 @@ define([
restoreHeight: 92, restoreHeight: 92,
allowScrollbar: false, allowScrollbar: false,
store: new Common.UI.DataViewStore([ store: new Common.UI.DataViewStore([
{offsety: 0, data: {type: 2, subtype: -1}}, {id: 'id-multilevels-' + Common.UI.getId(), data: {type: 2, subtype: -1}},
{offsety: 304, data: {type: 2, subtype: 1}}, {id: 'id-multilevels-' + Common.UI.getId(), data: {type: 2, subtype: 1}},
{offsety: 342, data: {type: 2, subtype: 2}}, {id: 'id-multilevels-' + Common.UI.getId(), data: {type: 2, subtype: 2}},
{offsety: 380, data: {type: 2, subtype: 3}} {id: 'id-multilevels-' + Common.UI.getId(), data: {type: 2, subtype: 3}}
]), ]),
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.mnuMultilevelPicker.selectByIndex(_conf.index, true); _conf && this.mnuMultilevelPicker.selectByIndex(_conf.index, true);

View file

@ -851,6 +851,7 @@
"DE.Controllers.Main.warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.<br>Contact %1 sales team for personal upgrade terms.", "DE.Controllers.Main.warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.<br>Contact %1 sales team for personal upgrade terms.",
"DE.Controllers.Main.warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.", "DE.Controllers.Main.warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.",
"DE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.", "DE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
"DE.Controllers.Main.txtNone": "None",
"DE.Controllers.Navigation.txtBeginning": "Beginning of document", "DE.Controllers.Navigation.txtBeginning": "Beginning of document",
"DE.Controllers.Navigation.txtGotoBeginning": "Go to the beginning of the document", "DE.Controllers.Navigation.txtGotoBeginning": "Go to the beginning of the document",
"DE.Controllers.Statusbar.textHasChanges": "New changes have been tracked", "DE.Controllers.Statusbar.textHasChanges": "New changes have been tracked",

View file

@ -842,6 +842,7 @@
"DE.Controllers.Main.warnNoLicense": "Вы достигли лимита на одновременные подключения к редакторам %1. Этот документ будет открыт на просмотр.<br>Напишите в отдел продаж %1, чтобы обсудить индивидуальные условия лицензирования.", "DE.Controllers.Main.warnNoLicense": "Вы достигли лимита на одновременные подключения к редакторам %1. Этот документ будет открыт на просмотр.<br>Напишите в отдел продаж %1, чтобы обсудить индивидуальные условия лицензирования.",
"DE.Controllers.Main.warnNoLicenseUsers": "Вы достигли лимита на одновременные подключения к редакторам %1.<br>Напишите в отдел продаж %1, чтобы обсудить индивидуальные условия лицензирования.", "DE.Controllers.Main.warnNoLicenseUsers": "Вы достигли лимита на одновременные подключения к редакторам %1.<br>Напишите в отдел продаж %1, чтобы обсудить индивидуальные условия лицензирования.",
"DE.Controllers.Main.warnProcessRightsChange": "Вам было отказано в праве на редактирование этого файла.", "DE.Controllers.Main.warnProcessRightsChange": "Вам было отказано в праве на редактирование этого файла.",
"DE.Controllers.Main.txtNone": "Нет",
"DE.Controllers.Navigation.txtBeginning": "Начало документа", "DE.Controllers.Navigation.txtBeginning": "Начало документа",
"DE.Controllers.Navigation.txtGotoBeginning": "Перейти в начало документа", "DE.Controllers.Navigation.txtGotoBeginning": "Перейти в начало документа",
"DE.Controllers.Statusbar.textHasChanges": "Отслежены новые изменения", "DE.Controllers.Statusbar.textHasChanges": "Отслежены новые изменения",

View file

@ -33,11 +33,15 @@
} }
.item-markerlist { .item-markerlist {
.background-ximage-v2('toolbar/bullets-and-numbering.png', 38px);
width: 38px; width: 38px;
height: 38px; height: 38px;
} }
.item-multilevellist {
width: 80px;
height: 80px;
}
.dropdown-menu.toc-menu { .dropdown-menu.toc-menu {
@contents-menu-item-height: 72px; @contents-menu-item-height: 72px;
--bckgHOffset: ~"0px"; --bckgHOffset: ~"0px";

View file

@ -123,7 +123,8 @@ define([
'Slide title': this.txtSlideTitle, 'Slide title': this.txtSlideTitle,
'Loading': this.txtLoading, 'Loading': this.txtLoading,
'Click to add notes': this.txtAddNotes, '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){ themeNames.forEach(function(item){
@ -2699,7 +2700,8 @@ define([
textGuest: 'Guest', textGuest: 'Guest',
txtErrorLoadHistory: 'Loading history failed', 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.',
textTryUndoRedoWarn: 'The Undo/Redo functions are disabled for the Fast co-editing mode.' textTryUndoRedoWarn: 'The Undo/Redo functions are disabled for the Fast co-editing mode.',
txtNone: 'None'
} }
})(), PE.Controllers.Main || {})) })(), PE.Controllers.Main || {}))
}); });

View file

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

View file

@ -1233,7 +1233,7 @@ define([
new Common.UI.Menu({ new Common.UI.Menu({
cls: 'shifted-left', cls: 'shifted-left',
items: [ 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({ this.mnuNumberSettings = new Common.UI.MenuItem({
caption: this.textListSettings, caption: this.textListSettings,
value: 'settings' value: 'settings'
@ -1304,17 +1304,17 @@ define([
restoreHeight: 138, restoreHeight: 138,
allowScrollbar: false, allowScrollbar: false,
store: new Common.UI.DataViewStore([ store: new Common.UI.DataViewStore([
{offsety: 0, data: {type: 0, subtype: -1}}, {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: -1}},
{offsety: 38, data: {type: 0, subtype: 1}}, {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 1}},
{offsety: 76, data: {type: 0, subtype: 2}}, {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 2}},
{offsety: 114, data: {type: 0, subtype: 3}}, {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 3}},
{offsety: 152, data: {type: 0, subtype: 4}}, {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 4}},
{offsety: 190, data: {type: 0, subtype: 5}}, {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 5}},
{offsety: 228, data: {type: 0, subtype: 6}}, {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 6}},
{offsety: 266, data: {type: 0, subtype: 7}}, {id: 'id-markers-' + Common.UI.getId(), data: {type: 0, subtype: 7}},
{offsety: 684, data: {type: 0, subtype: 8}} {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); _conf && this.mnuMarkersPicker.selectByIndex(_conf.index, true);
@ -1325,16 +1325,16 @@ define([
restoreHeight: 92, restoreHeight: 92,
allowScrollbar: false, allowScrollbar: false,
store: new Common.UI.DataViewStore([ store: new Common.UI.DataViewStore([
{offsety: 0, data: {type: 1, subtype: -1}}, {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: -1}},
{offsety: 570, data: {type: 1, subtype: 4}}, {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 4}},
{offsety: 532, data: {type: 1, subtype: 5}}, {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 5}},
{offsety: 608, data: {type: 1, subtype: 6}}, {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 6}},
{offsety: 418, data: {type: 1, subtype: 1}}, {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 1}},
{offsety: 456, data: {type: 1, subtype: 2}}, {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 2}},
{offsety: 494, data: {type: 1, subtype: 3}}, {id: 'id-numbers-' + Common.UI.getId(), data: {type: 1, subtype: 3}},
{offsety: 646, data: {type: 1, subtype: 7}} {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); _conf && this.mnuNumbersPicker.selectByIndex(_conf.index, true);

View file

@ -721,6 +721,7 @@
"PE.Controllers.Main.warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.<br>Contact %1 sales team for personal upgrade terms.", "PE.Controllers.Main.warnNoLicense": "You've reached the limit for simultaneous connections to %1 editors. This document will be opened for viewing only.<br>Contact %1 sales team for personal upgrade terms.",
"PE.Controllers.Main.warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.", "PE.Controllers.Main.warnNoLicenseUsers": "You've reached the user limit for %1 editors. Contact %1 sales team for personal upgrade terms.",
"PE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.", "PE.Controllers.Main.warnProcessRightsChange": "You have been denied the right to edit the file.",
"PE.Controllers.Main.txtNone": "None",
"PE.Controllers.Statusbar.zoomText": "Zoom {0}%", "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.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", "PE.Controllers.Toolbar.textAccent": "Accents",

View file

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

View file

@ -225,6 +225,8 @@ define([
view.menuParagraphVAlign.menu.on('item:click', _.bind(me.onParagraphVAlign, me)); view.menuParagraphVAlign.menu.on('item:click', _.bind(me.onParagraphVAlign, me));
view.menuParagraphDirection.menu.on('item:click', _.bind(me.onParagraphDirection, me)); view.menuParagraphDirection.menu.on('item:click', _.bind(me.onParagraphDirection, me));
view.menuParagraphBullets.menu.on('item:click', _.bind(me.onSelectBulletMenu, me)); view.menuParagraphBullets.menu.on('item:click', _.bind(me.onSelectBulletMenu, me));
view.menuParagraphBullets.menu.on('render:after', _.bind(me.onBulletMenuShowAfter, me));
view.menuParagraphBullets.menu.on('show:after', _.bind(me.onBulletMenuShowAfter, me));
view.menuAddHyperlinkShape.on('click', _.bind(me.onInsHyperlink, me)); view.menuAddHyperlinkShape.on('click', _.bind(me.onInsHyperlink, me));
view.menuEditHyperlinkShape.on('click', _.bind(me.onInsHyperlink, me)); view.menuEditHyperlinkShape.on('click', _.bind(me.onInsHyperlink, me));
view.menuRemoveHyperlinkShape.on('click', _.bind(me.onRemoveHyperlinkShape, me)); view.menuRemoveHyperlinkShape.on('click', _.bind(me.onRemoveHyperlinkShape, me));
@ -3437,13 +3439,33 @@ define([
view.paraBulletsPicker = new Common.UI.DataView({ view.paraBulletsPicker = new Common.UI.DataView({
el : $('#id-docholder-menu-bullets'), el : $('#id-docholder-menu-bullets'),
parentMenu : view.menuParagraphBullets.menu, parentMenu : view.menuParagraphBullets.menu,
groups : view.paraBulletsPicker.groups,
store : view.paraBulletsPicker.store, store : view.paraBulletsPicker.store,
itemTemplate: _.template('<div id="<%= id %>" class="item-markerlist" style="background-position: 0 -<%= offsety %>px;"></div>') itemTemplate: _.template('<% if (type==0) { %>' +
'<div id="<%= id %>" class="item-markerlist"></div>' +
'<% } else if (type==1) { %>' +
'<div id="<%= id %>" class="item-multilevellist"></div>' +
'<% } %>')
}); });
view.paraBulletsPicker.on('item:click', _.bind(this.onSelectBullets, this)); view.paraBulletsPicker.on('item:click', _.bind(this.onSelectBullets, this));
_conf && view.paraBulletsPicker.selectRecord(_conf.rec, true); _conf && view.paraBulletsPicker.selectRecord(_conf.rec, true);
}, },
onBulletMenuShowAfter: function() {
var store = this.documentHolder.paraBulletsPicker.store;
var arrNum = [], arrMarker = [];
store.each(function(item){
if (item.get('group')=='menu-list-bullet-group')
arrMarker.push(item.get('id'));
else
arrNum.push(item.get('id'));
});
if (this.api && this.api.SetDrawImagePreviewBulletForMenu) {
this.api.SetDrawImagePreviewBulletForMenu(arrMarker, 0);
this.api.SetDrawImagePreviewBulletForMenu(arrNum, 1);
}
},
onSignatureClick: function(item) { onSignatureClick: function(item) {
var datavalue = item.cmpEl.attr('data-value'); var datavalue = item.cmpEl.attr('data-value');
switch (item.value) { switch (item.value) {

View file

@ -925,7 +925,7 @@ define([
cls: 'shifted-right', cls: 'shifted-right',
menuAlign: 'tl-tr', menuAlign: 'tl-tr',
items : [ items : [
{ template: _.template('<div id="id-docholder-menu-bullets" class="menu-layouts" style="width: 184px; margin: 0 4px;"></div>') }, { template: _.template('<div id="id-docholder-menu-bullets" class="menu-layouts" style="width: 372px; margin: 4px 6px;"></div>') },
{caption: '--'}, {caption: '--'},
me.menuParagraphBulletNone = new Common.UI.MenuItem({ me.menuParagraphBulletNone = new Common.UI.MenuItem({
caption : me.textNone, caption : me.textNone,
@ -940,24 +940,29 @@ define([
] ]
}) })
}); });
me.paraBulletsPicker = { me.paraBulletsPicker = {
conf: {rec: null}, conf: {rec: null},
store : new Common.UI.DataViewStore([ store : new Common.UI.DataViewStore([
{offsety: 38, type: 0, subtype: 1}, {group: 'menu-list-bullet-group', id: 'id-markers-' + Common.UI.getId(), type: 0, subtype: 1},
{offsety: 76, type: 0, subtype: 2}, {group: 'menu-list-bullet-group', id: 'id-markers-' + Common.UI.getId(), type: 0, subtype: 2},
{offsety: 114, type: 0, subtype: 3}, {group: 'menu-list-bullet-group', id: 'id-markers-' + Common.UI.getId(), type: 0, subtype: 3},
{offsety: 152, type: 0, subtype: 4}, {group: 'menu-list-bullet-group', id: 'id-markers-' + Common.UI.getId(), type: 0, subtype: 4},
{offsety: 190, type: 0, subtype: 5}, {group: 'menu-list-bullet-group', id: 'id-markers-' + Common.UI.getId(), type: 0, subtype: 5},
{offsety: 228, type: 0, subtype: 6}, {group: 'menu-list-bullet-group', id: 'id-markers-' + Common.UI.getId(), type: 0, subtype: 6},
{offsety: 266, type: 0, subtype: 7}, {group: 'menu-list-bullet-group', id: 'id-markers-' + Common.UI.getId(), type: 0, subtype: 7},
{offsety: 684, type: 0, subtype: 8}, {group: 'menu-list-bullet-group', id: 'id-markers-' + Common.UI.getId(), type: 0, subtype: 8},
{offsety: 570, type: 1, subtype: 4}, {group: 'menu-list-number-group', id: 'id-numbers-' + Common.UI.getId(), type: 1, subtype: 4},
{offsety: 532, type: 1, subtype: 5}, {group: 'menu-list-number-group', id: 'id-numbers-' + Common.UI.getId(), type: 1, subtype: 5},
{offsety: 608, type: 1, subtype: 6}, {group: 'menu-list-number-group', id: 'id-numbers-' + Common.UI.getId(), type: 1, subtype: 6},
{offsety: 418, type: 1, subtype: 1}, {group: 'menu-list-number-group', id: 'id-numbers-' + Common.UI.getId(), type: 1, subtype: 1},
{offsety: 456, type: 1, subtype: 2}, {group: 'menu-list-number-group', id: 'id-numbers-' + Common.UI.getId(), type: 1, subtype: 2},
{offsety: 494, type: 1, subtype: 3}, {group: 'menu-list-number-group', id: 'id-numbers-' + Common.UI.getId(), type: 1, subtype: 3},
{offsety: 646, type: 1, subtype: 7} {group: 'menu-list-number-group', id: 'id-numbers-' + Common.UI.getId(), type: 1, subtype: 7}
]),
groups: new Common.UI.DataViewGroupStore([
{id: 'menu-list-bullet-group', caption: this.textBullets},
{id: 'menu-list-number-group', caption: this.textNumbering}
]), ]),
selectRecord: function (rec) { selectRecord: function (rec) {
this.conf.rec = rec; this.conf.rec = rec;
@ -1240,7 +1245,9 @@ define([
textVar: 'Var', textVar: 'Var',
textMore: 'More functions', textMore: 'More functions',
txtCustomSort: 'Custom sort', txtCustomSort: 'Custom sort',
txtCondFormat: 'Conditional Formatting' txtCondFormat: 'Conditional Formatting',
textBullets: 'Bullets',
textNumbering: 'Numbering',
}, SSE.Views.DocumentHolder || {})); }, SSE.Views.DocumentHolder || {}));
}); });

View file

@ -133,11 +133,25 @@
} }
.item-markerlist { .item-markerlist {
.background-ximage-v2('toolbar/bullets-and-numbering.png', 38px);
width: 38px; width: 38px;
height: 38px; height: 38px;
} }
.item-multilevellist {
width: 80px;
height: 80px;
}
#menu-list-number-group {
.item {
margin-right: 9px;
margin-bottom: 9px;
}
.group-items-container {
margin-bottom: 0;
}
}
#slot-field-zoom { #slot-field-zoom {
float: left; float: left;
min-width: 46px; min-width: 46px;