[PDF] Add form orientation

This commit is contained in:
Julia.Radzhabova
2025-05-22 19:08:38 +03:00
parent 243321b2ee
commit 05088568aa
3 changed files with 41 additions and 0 deletions

View File

@ -286,6 +286,12 @@
<div class="separator horizontal"></div>
</td>
</tr>
<tr>
<td class="padding-small">
<label class="input-label" style="margin-top: 4px;"><%= scope.textOrientation %></label>
<div id="form-combo-orient" style="display: inline-block;" class="float-right"></div>
</td>
</tr>
<tr>
<td class="padding-small">
<div id="form-chb-required"></div>

View File

@ -127,6 +127,26 @@ define([
this.cmbName.on('changed:after', this.onNameChanged.bind(this));
this.cmbName.on('hide:after', this.onHideMenus.bind(this));
this.cmbOrient = new Common.UI.ComboBox({
el: $markup.findById('#form-combo-orient'),
cls: 'input-group-nr',
menuStyle: 'min-width: 100%;',
style: 'width: 48px;',
editable: false,
data: [
{displayValue: '0°', value: 0},
{displayValue: '90°', value: 90},
{displayValue: '180°', value: 180},
{displayValue: '270°', value: 270}
],
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
});
this.cmbOrient.setValue(0);
this.cmbOrient.on('selected', this.onOrientChanged.bind(this));
this.lockedControls.push(this.cmbOrient);
this.chRequired = new Common.UI.CheckBox({
el: $markup.findById('#form-chb-required'),
labelText: this.textRequired,
@ -874,6 +894,14 @@ define([
}
},
onOrientChanged: function(combo, record) {
if (this.api && !this._noApply) {
this._state.Orient = undefined;
this.api.SetFieldRotate(record.value);
this.fireEvent('editcomplete', this);
}
},
onLineStyleChanged: function(combo, record) {
if (this.api && !this._noApply) {
this._state.StrokeStyle = undefined;
@ -1296,6 +1324,12 @@ define([
this._state.Readonly=val;
}
val = props.asc_getRot();
if ( this._state.Orient!==val ) {
this.cmbOrient.setValue(val!==undefined ? val : 0);
this._state.Orient=val;
}
var color = props.asc_getStroke();
if (color) {
if (color.get_type() == Asc.c_oAscColor.COLOR_TYPE_SCHEME) {

View File

@ -1508,6 +1508,7 @@
"PDFE.Views.FormSettings.textZipCode": "ZIP Code",
"PDFE.Views.FormSettings.textZipCode4": "ZIP Code + 4",
"PDFE.Views.FormSettings.txtCustom": "Custom",
"PDFE.Views.FormSettings.textOrientation": "Orientation",
"PDFE.Views.FormsTab.capBtnCheckBox": "Checkbox",
"PDFE.Views.FormsTab.capBtnComboBox": "Combo Box",
"PDFE.Views.FormsTab.capBtnDropDown": "List Box",