[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,33 +122,30 @@ define([
'</table>',
'<table cols="4" style="width: 100%;">',
'<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>',
'<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-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;padding-right: 5px;">',
'<td style="padding-left: 5px;">',
'<label class="input-label">' + this.txtSize + '</label>',
'<div id="id-dlg-bullet-size" class="input-group-nr" style="width: 115px;margin-bottom: 10px;"></div>',
'</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>',
'</table>',
'<% } else {%>',
'<% } else if (type == 0) {%>', // bullets
'<table cols="2" style="width: 100%;">',
'<tr>',
'<td style="padding-right: 5px;">',
'<% if (type == 0) { %>',
'<label class="input-label">' + this.txtBullet + '</label>',
'<button type="button" class="btn btn-text-default" id="id-dlg-bullet-font" style="width: 100%;margin-bottom: 10px;">' + this.txtFont + '</button>',
'<% } else { %>',
'<label class="input-label">' + this.txtType + '</label>',
'<div id="id-dlg-numbering-format" class="input-group-nr" style="width: 100%;margin-bottom: 10px;"></div>',
'<% } %>',
'<% if (type == 0) { %>',
'<label class="input-label">' + this.txtBullet + '</label>',
'<button type="button" class="btn btn-text-default" id="id-dlg-bullet-font" style="width: 100%;margin-bottom: 10px;">' + this.txtFont + '</button>',
'<% } else { %>',
'<label class="input-label">' + this.txtType + '</label>',
'<div id="id-dlg-numbering-format" class="input-group-nr" style="width: 100%;margin-bottom: 10px;"></div>',
'<% } %>',
'</td>',
'<td style="padding-left: 5px;">',
'<label class="input-label">' + this.txtAlign + '</label>',
@ -156,16 +153,43 @@ define([
'</td>',
'</tr>',
'<tr>',
'<td style="padding-right: 5px;">',
'<label class="input-label">' + this.txtSize + '</label>',
'<div id="id-dlg-bullet-size" class="input-group-nr" style="width: 100%;margin-bottom: 10px;"></div>',
'</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 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>',
'</table>',
'<% } else { %>', // numbering
'<table cols="2" style="width: 100%;">',
'<tr>',
'<td style="padding-right: 5px;">',
'<label class="input-label">' + this.txtType + '</label>',
'<div id="id-dlg-numbering-format" class="input-group-nr" style="width: 100%;margin-bottom: 10px;"></div>',
'</td>',
'<td style="padding-left: 5px;">',
'<label class="input-label">' + this.txtAlign + '</label>',
'<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>',
'</tr>',
'</table>',
'<% } %>',
'<table cols="2" style="width: 100%;">',
'<tr>',
@ -207,8 +231,12 @@ define([
$window = this.getChild();
$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'),
cls : 'btn-toolbar',
iconCls : 'toolbar__icon btn-fontcolor',
hint : this.txtColor,
menu: true,
additionalItems: [{
id: 'id-dlg-bullet-text-color',
caption: this.txtLikeText,
@ -224,10 +252,9 @@ define([
style: 'padding-left: 20px;'
},
{caption: '--'}],
additionalAlign: this.menuAddAlign,
cls: 'move-focus',
takeFocusOnClose: true
additionalAlign: this.menuAddAlign
});
this.btnColor.setMenu();
this.btnColor.on('color:select', _.bind(this.onColorsSelect, this));
this.btnColor.menu.items[0].on('toggle', _.bind(this.onLikeTextColor, this));
this.btnColor.menu.items[1].on('toggle', _.bind(this.onAutoColor, this));
@ -360,7 +387,6 @@ define([
this.cmbSize = new Common.UI.ComboBox({
el : $window.find('#id-dlg-bullet-size'),
menuStyle : 'min-width: 100%;max-height: 183px;',
style : this.type==1 ? "width: 129px;" : "width: auto;",
editable : false,
cls : 'input-group-nr',
data : [