[PE] Fix placement settings in advanced settings (2)

This commit is contained in:
JuliaSvinareva 2022-02-02 00:34:38 +03:00
parent 162e223f68
commit 32f018a950
8 changed files with 61 additions and 45 deletions

View file

@ -7,14 +7,14 @@
</td>
</tr>
<tr>
<td width="108px" class="padding-large">
<td width="93px" class="padding-large">
<label class="input-label"><%= scope.textWidth %></label>
<div id="chart-advanced-spin-width"></div>
</td>
<td width="28px" style="vertical-align: bottom;" class="padding-large">
<div id="chart-advanced-button-ratio"></div>
</td>
<td width="108px" class="padding-large">
<td width="93px" class="padding-large">
<label class="input-label"><%= scope.textHeight %></label>
<div id="chart-advanced-spin-height"></div>
</td>
@ -29,7 +29,7 @@
</td>
</tr>
<tr>
<td class="padding-small" width="115px">
<td class="padding-small" width="121px">
<label class="input-label"><%= scope.textHorizontal %></label>
<div id="chart-advanced-spin-x"></div>
</td>

View file

@ -32,7 +32,7 @@
</td>
</tr>
<tr>
<td class="padding-small" width="115px">
<td class="padding-small" width="106px">
<label class="input-label"><%= scope.textHorizontal %></label>
<div id="image-advanced-spin-x"></div>
</td>

View file

@ -7,14 +7,14 @@
</td>
</tr>
<tr>
<td width="108px">
<td width="93px">
<label class="input-label"><%= scope.textWidth %></label>
<div id="shape-advanced-spin-width"></div>
</td>
<td width="28px" style="vertical-align: bottom;">
<div id="shape-advanced-button-ratio"></div>
</td>
<td width="108px">
<td width="93px">
<label class="input-label"><%= scope.textHeight %></label>
<div id="shape-advanced-spin-height"></div>
</td>
@ -30,7 +30,7 @@
</td>
</tr>
<tr>
<td class="padding-small" width="115px">
<td class="padding-small" width="121px">
<label class="input-label"><%= scope.textHorizontal %></label>
<div id="shape-advanced-spin-x"></div>
</td>

View file

@ -7,14 +7,14 @@
</td>
</tr>
<tr>
<td width="108px">
<td width="93px">
<label class="input-label"><%= scope.textWidth %></label>
<div id="tableadv-spin-width"></div>
</td>
<td width="28px" style="vertical-align: bottom;">
<div id="tableadv-button-ratio"></div>
</td>
<td width="108px">
<td width="93px">
<label class="input-label"><%= scope.textHeight %></label>
<div id="tableadv-spin-height"></div>
</td>
@ -30,7 +30,7 @@
</td>
</tr>
<tr>
<td class="padding-small" width="115px">
<td class="padding-small" width="121px">
<label class="input-label"><%= scope.textHorizontal %></label>
<div id="tableadv-spin-x"></div>
</td>

View file

@ -84,7 +84,7 @@ define([ 'text!presentationeditor/main/app/template/ChartSettingsAdvanced.tem
this.spnWidth = new Common.UI.MetricSpinner({
el: $('#chart-advanced-spin-width'),
step: .1,
width: 100,
width: 85,
defaultUnit : "cm",
value: '3 cm',
maxValue: 55.88,
@ -111,7 +111,7 @@ define([ 'text!presentationeditor/main/app/template/ChartSettingsAdvanced.tem
this.spnHeight = new Common.UI.MetricSpinner({
el: $('#chart-advanced-spin-height'),
step: .1,
width: 100,
width: 85,
defaultUnit : "cm",
value: '3 cm',
maxValue: 55.88,
@ -179,23 +179,25 @@ define([ 'text!presentationeditor/main/app/template/ChartSettingsAdvanced.tem
this.cmbFromX = new Common.UI.ComboBox({
el: $('#chart-advanced-combo-from-x'),
cls: 'input-group-nr',
style: "width: 100px;",
menuStyle: 'min-width: 100px;',
style: "width: 115px;",
menuStyle: 'min-width: 115px;',
data: [
{ value: 'left', displayValue: this.textTopLeftCorner },
{ value: 'center', displayValue: this.textCenter }
]
],
editable: false
});
this.cmbFromY = new Common.UI.ComboBox({
el: $('#chart-advanced-combo-from-y'),
cls: 'input-group-nr',
style: "width: 100px;",
menuStyle: 'min-width: 100px;',
style: "width: 115px;",
menuStyle: 'min-width: 115px;',
data: [
{ value: 'left', displayValue: this.textTopLeftCorner },
{ value: 'center', displayValue: this.textCenter }
]
],
editable: false
});
// Alt Text
@ -231,7 +233,8 @@ define([ 'text!presentationeditor/main/app/template/ChartSettingsAdvanced.tem
getFocusedComponents: function() {
return [
this.inputAltTitle, this.textareaAltDescription // 0 tab
this.spnWidth, this.spnHeight, this.spnX, this.cmbFromX, this.spnY, this.cmbFromY, // 0 tab
this.inputAltTitle, this.textareaAltDescription // 1 tab
];
},
@ -242,6 +245,9 @@ define([ 'text!presentationeditor/main/app/template/ChartSettingsAdvanced.tem
setTimeout(function(){
switch (index) {
case 0:
me.spnWidth.focus();
break;
case 1:
me.inputAltTitle.focus();
break;
}

View file

@ -182,23 +182,25 @@ define([ 'text!presentationeditor/main/app/template/ImageSettingsAdvanced.tem
this.cmbFromX = new Common.UI.ComboBox({
el: $('#image-advanced-combo-from-x'),
cls: 'input-group-nr',
style: "width: 100px;",
menuStyle: 'min-width: 100px;',
style: "width: 115px;",
menuStyle: 'min-width: 115px;',
data: [
{ value: 'left', displayValue: this.textTopLeftCorner },
{ value: 'center', displayValue: this.textCenter }
]
],
editable: false
});
this.cmbFromY = new Common.UI.ComboBox({
el: $('#image-advanced-combo-from-y'),
cls: 'input-group-nr',
style: "width: 100px;",
menuStyle: 'min-width: 100px;',
style: "width: 115px;",
menuStyle: 'min-width: 115px;',
data: [
{ value: 'left', displayValue: this.textTopLeftCorner },
{ value: 'center', displayValue: this.textCenter }
]
],
editable: false
});
// Rotation

View file

@ -92,7 +92,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
this.spnWidth = new Common.UI.MetricSpinner({
el: $('#shape-advanced-spin-width'),
step: .1,
width: 100,
width: 85,
defaultUnit : "cm",
value: '3 cm',
maxValue: 55.88,
@ -119,7 +119,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
this.spnHeight = new Common.UI.MetricSpinner({
el: $('#shape-advanced-spin-height'),
step: .1,
width: 100,
width: 85,
defaultUnit : "cm",
value: '3 cm',
maxValue: 55.88,
@ -187,23 +187,25 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
this.cmbFromX = new Common.UI.ComboBox({
el: $('#shape-advanced-combo-from-x'),
cls: 'input-group-nr',
style: "width: 100px;",
menuStyle: 'min-width: 100px;',
style: "width: 115px;",
menuStyle: 'min-width: 115px;',
data: [
{ value: 'left', displayValue: this.textTopLeftCorner },
{ value: 'center', displayValue: this.textCenter }
]
],
editable: false
});
this.cmbFromY = new Common.UI.ComboBox({
el: $('#shape-advanced-combo-from-y'),
cls: 'input-group-nr',
style: "width: 100px;",
menuStyle: 'min-width: 100px;',
style: "width: 115px;",
menuStyle: 'min-width: 115px;',
data: [
{ value: 'left', displayValue: this.textTopLeftCorner },
{ value: 'center', displayValue: this.textCenter }
]
],
editable: false
});
// Margins
@ -568,7 +570,7 @@ define([ 'text!presentationeditor/main/app/template/ShapeSettingsAdvanced.tem
getFocusedComponents: function() {
return [
this.spnWidth, this.spnHeight, // 0 tab
this.spnWidth, this.spnHeight, this.spnX, this.cmbFromX, this.spnY, this.cmbFromY, // 0 tab
this.spnAngle, this.chFlipHor, this.chFlipVert, // 1 tab
this.cmbCapType, this.cmbJoinType, // 2 tab
this.radioNofit, this.radioShrink, this.radioFit, this.spnMarginTop, this.spnMarginLeft, this.spnMarginBottom, this.spnMarginRight, // 3 tab

View file

@ -100,7 +100,7 @@ define([ 'text!presentationeditor/main/app/template/TableSettingsAdvanced.tem
this.spnWidth = new Common.UI.MetricSpinner({
el: $('#tableadv-spin-width'),
step: .1,
width: 100,
width: 85,
defaultUnit : "cm",
value: '3 cm',
maxValue: 55.88,
@ -123,7 +123,7 @@ define([ 'text!presentationeditor/main/app/template/TableSettingsAdvanced.tem
this.spnHeight = new Common.UI.MetricSpinner({
el: $('#tableadv-spin-height'),
step: .1,
width: 100,
width: 85,
defaultUnit : "cm",
value: '3 cm',
maxValue: 55.88,
@ -184,23 +184,25 @@ define([ 'text!presentationeditor/main/app/template/TableSettingsAdvanced.tem
this.cmbFromX = new Common.UI.ComboBox({
el: $('#tableadv-combo-from-x'),
cls: 'input-group-nr',
style: "width: 100px;",
menuStyle: 'min-width: 100px;',
style: "width: 115px;",
menuStyle: 'min-width: 115px;',
data: [
{ value: 'left', displayValue: this.textTopLeftCorner },
{ value: 'center', displayValue: this.textCenter }
]
],
editable: false
});
this.cmbFromY = new Common.UI.ComboBox({
el: $('#tableadv-combo-from-y'),
cls: 'input-group-nr',
style: "width: 100px;",
menuStyle: 'min-width: 100px;',
style: "width: 115px;",
menuStyle: 'min-width: 115px;',
data: [
{ value: 'left', displayValue: this.textTopLeftCorner },
{ value: 'center', displayValue: this.textCenter }
]
],
editable: false
});
this._marginsChange = function(field, newValue, oldValue, eOpts, source, property){
@ -427,9 +429,10 @@ define([ 'text!presentationeditor/main/app/template/TableSettingsAdvanced.tem
getFocusedComponents: function() {
return [
this.spnWidth, this.spnHeight, this.spnX, this.cmbFromX, this.spnY, this.cmbFromY, // 0 tab
this.chCellMargins, this.spnMarginTop, this.spnMarginLeft, this.spnMarginBottom, this.spnMarginRight,
this.spnTableMarginTop, this.spnTableMarginLeft, this.spnTableMarginBottom, this.spnTableMarginRight, // 0 tab
this.inputAltTitle, this.textareaAltDescription // 1 tab
this.spnTableMarginTop, this.spnTableMarginLeft, this.spnTableMarginBottom, this.spnTableMarginRight, // 1 tab
this.inputAltTitle, this.textareaAltDescription // 2 tab
];
},
@ -440,12 +443,15 @@ define([ 'text!presentationeditor/main/app/template/TableSettingsAdvanced.tem
setTimeout(function(){
switch (index) {
case 0:
me.spnWidth.focus();
break;
case 1:
if (!me.spnMarginTop.isDisabled())
me.spnMarginTop.focus();
else
me.spnTableMarginTop.focus();
break;
case 1:
case 2:
me.inputAltTitle.focus();
break;
}