diff --git a/apps/pdfeditor/main/app/template/FormSettings.template b/apps/pdfeditor/main/app/template/FormSettings.template index 8b97b448e5..85c0711585 100644 --- a/apps/pdfeditor/main/app/template/FormSettings.template +++ b/apps/pdfeditor/main/app/template/FormSettings.template @@ -286,6 +286,12 @@
+ + + +
+ +
diff --git a/apps/pdfeditor/main/app/view/FormSettings.js b/apps/pdfeditor/main/app/view/FormSettings.js index 2c2b0953e9..ea83859726 100644 --- a/apps/pdfeditor/main/app/view/FormSettings.js +++ b/apps/pdfeditor/main/app/view/FormSettings.js @@ -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) { diff --git a/apps/pdfeditor/main/locale/en.json b/apps/pdfeditor/main/locale/en.json index 52a85bb720..5b7524180f 100644 --- a/apps/pdfeditor/main/locale/en.json +++ b/apps/pdfeditor/main/locale/en.json @@ -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",