mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-24 12:55:34 +08:00
[PDF] Add form orientation
This commit is contained in:
@ -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>
|
||||
|
||||
@ -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) {
|
||||
|
||||
@ -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",
|
||||
|
||||
Reference in New Issue
Block a user