[DE] Add font settings for numbering/bullets. Change components

This commit is contained in:
Julia Radzhabova 2022-10-11 13:27:35 +03:00
parent 2353327dd9
commit 58bd480a74

View file

@ -122,23 +122,20 @@ define([
'</table>', '</table>',
'<table cols="4" style="width: 100%;">', '<table cols="4" style="width: 100%;">',
'<tr>', '<tr>',
'<td colspan="2" style="padding-right: 5px;">', '<td colspan="3" style="padding-right: 5px;">',
'<label class="input-label" style="display: block;">' + this.txtFontName + '</label>', '<label class="input-label" style="display: block;">' + this.txtFontName + '</label>',
'<div id="id-dlg-numbering-font-name" style="display: inline-block;width: 200px;height:22px;margin-bottom: 10px;vertical-align: middle;"></div>', '<div id="id-dlg-numbering-font-name" style="display: inline-block;width: 200px;height:22px;margin-bottom: 10px;vertical-align: middle;"></div>',
'<div id="id-dlg-numbering-bold" style="display: inline-block;margin-left: 4px;margin-bottom: 10px;vertical-align: middle;"></div>', '<div id="id-dlg-numbering-bold" style="display: inline-block;margin-left: 4px;margin-bottom: 10px;vertical-align: middle;"></div>',
'<div id="id-dlg-numbering-italic" style="display: inline-block;margin-left: 4px;margin-bottom: 10px;vertical-align: middle;"></div>', '<div id="id-dlg-numbering-italic" style="display: inline-block;margin-left: 4px;margin-bottom: 10px;vertical-align: middle;"></div>',
'<div id="id-dlg-bullet-color" style="display: inline-block;margin-left: 4px;margin-bottom: 10px;vertical-align: middle;"></div>',
'</td>', '</td>',
'<td style="padding-left: 5px;padding-right: 5px;">', '<td style="padding-left: 5px;">',
'<label class="input-label">' + this.txtSize + '</label>', '<label class="input-label">' + this.txtSize + '</label>',
'<div id="id-dlg-bullet-size" class="input-group-nr" style="width: 115px;margin-bottom: 10px;"></div>', '<div id="id-dlg-bullet-size" class="input-group-nr" style="width: 115px;margin-bottom: 10px;"></div>',
'</td>', '</td>',
'<td style="padding-left: 5px;">',
'<label class="input-label">' + this.txtColor + '</label>',
'<div id="id-dlg-bullet-color" style="margin-bottom: 10px;"></div>',
'</td>',
'</tr>', '</tr>',
'</table>', '</table>',
'<% } else {%>', '<% } else if (type == 0) {%>', // bullets
'<table cols="2" style="width: 100%;">', '<table cols="2" style="width: 100%;">',
'<tr>', '<tr>',
'<td style="padding-right: 5px;">', '<td style="padding-right: 5px;">',
@ -155,14 +152,41 @@ define([
'<div id="id-dlg-bullet-align" class="input-group-nr" style="width: 100%;margin-bottom: 10px;"></div>', '<div id="id-dlg-bullet-align" class="input-group-nr" style="width: 100%;margin-bottom: 10px;"></div>',
'</td>', '</td>',
'</tr>', '</tr>',
'<tr>',
'<td colspan="2">',
'<label class="input-label" style="display: block;">' + this.txtSize + '</label>',
'<div id="id-dlg-bullet-size" class="input-group-nr" style="width: 120px;display: inline-block;margin-bottom: 10px;vertical-align: middle;"></div>',
'<div id="id-dlg-numbering-bold" style="display: inline-block;margin-left: 4px;margin-bottom: 10px;vertical-align: middle;"></div>',
'<div id="id-dlg-numbering-italic" style="display: inline-block;margin-left: 4px;margin-bottom: 10px;vertical-align: middle;"></div>',
'<div id="id-dlg-bullet-color" style="display: inline-block;margin-left: 4px;margin-bottom: 10px;vertical-align: middle;"></div>',
'</td>',
'</tr>',
'</table>',
'<% } else { %>', // numbering
'<table cols="2" style="width: 100%;">',
'<tr>', '<tr>',
'<td style="padding-right: 5px;">', '<td style="padding-right: 5px;">',
'<label class="input-label">' + this.txtSize + '</label>', '<label class="input-label">' + this.txtType + '</label>',
'<div id="id-dlg-bullet-size" class="input-group-nr" style="width: 100%;margin-bottom: 10px;"></div>', '<div id="id-dlg-numbering-format" class="input-group-nr" style="width: 100%;margin-bottom: 10px;"></div>',
'</td>', '</td>',
'<td style="padding-left: 5px;">', '<td style="padding-left: 5px;">',
'<label class="input-label">' + this.txtColor + '</label>', '<label class="input-label">' + this.txtAlign + '</label>',
'<div id="id-dlg-bullet-color" style="margin-bottom: 10px;"></div>', '<div id="id-dlg-bullet-align" class="input-group-nr" style="width: 100%;margin-bottom: 10px;"></div>',
'</td>',
'</tr>',
'</table>',
'<table cols="2" style="width: 100%;">',
'<tr>',
'<td style="padding-right: 5px;">',
'<label class="input-label" style="display: block;">' + this.txtFontName + '</label>',
'<div id="id-dlg-numbering-font-name" style="display: inline-block;width: 90px;height:22px;margin-bottom: 10px;vertical-align: middle;"></div>',
'<div id="id-dlg-numbering-bold" style="display: inline-block;margin-left: 4px;margin-bottom: 10px;vertical-align: middle;"></div>',
'<div id="id-dlg-numbering-italic" style="display: inline-block;margin-left: 4px;margin-bottom: 10px;vertical-align: middle;"></div>',
'<div id="id-dlg-bullet-color" style="display: inline-block;margin-left: 4px;margin-bottom: 10px;vertical-align: middle;"></div>',
'</td>',
'<td style="padding-left: 5px;">',
'<label class="input-label">' + this.txtSize + '</label>',
'<div id="id-dlg-bullet-size" class="input-group-nr" style="width: 85px;margin-bottom: 10px;"></div>',
'</td>', '</td>',
'</tr>', '</tr>',
'</table>', '</table>',
@ -207,8 +231,12 @@ define([
$window = this.getChild(); $window = this.getChild();
$window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this)); $window.find('.dlg-btn').on('click', _.bind(this.onBtnClick, this));
this.btnColor = new Common.UI.ColorButton({ this.btnColor = new Common.UI.ButtonColored({
parentEl: $window.find('#id-dlg-bullet-color'), parentEl: $window.find('#id-dlg-bullet-color'),
cls : 'btn-toolbar',
iconCls : 'toolbar__icon btn-fontcolor',
hint : this.txtColor,
menu: true,
additionalItems: [{ additionalItems: [{
id: 'id-dlg-bullet-text-color', id: 'id-dlg-bullet-text-color',
caption: this.txtLikeText, caption: this.txtLikeText,
@ -224,10 +252,9 @@ define([
style: 'padding-left: 20px;' style: 'padding-left: 20px;'
}, },
{caption: '--'}], {caption: '--'}],
additionalAlign: this.menuAddAlign, additionalAlign: this.menuAddAlign
cls: 'move-focus',
takeFocusOnClose: true
}); });
this.btnColor.setMenu();
this.btnColor.on('color:select', _.bind(this.onColorsSelect, this)); this.btnColor.on('color:select', _.bind(this.onColorsSelect, this));
this.btnColor.menu.items[0].on('toggle', _.bind(this.onLikeTextColor, this)); this.btnColor.menu.items[0].on('toggle', _.bind(this.onLikeTextColor, this));
this.btnColor.menu.items[1].on('toggle', _.bind(this.onAutoColor, this)); this.btnColor.menu.items[1].on('toggle', _.bind(this.onAutoColor, this));
@ -360,7 +387,6 @@ define([
this.cmbSize = new Common.UI.ComboBox({ this.cmbSize = new Common.UI.ComboBox({
el : $window.find('#id-dlg-bullet-size'), el : $window.find('#id-dlg-bullet-size'),
menuStyle : 'min-width: 100%;max-height: 183px;', menuStyle : 'min-width: 100%;max-height: 183px;',
style : this.type==1 ? "width: 129px;" : "width: auto;",
editable : false, editable : false,
cls : 'input-group-nr', cls : 'input-group-nr',
data : [ data : [