[PDF] Add numeral settings

This commit is contained in:
Julia.Radzhabova
2025-08-11 20:11:30 +03:00
parent 9f6eb9db4a
commit 3f4caac3e3
3 changed files with 56 additions and 0 deletions

View File

@ -290,6 +290,24 @@
<div id="form-background-color-btn" style="display: inline-block;" class="float-right"></div>
</td>
</tr>
<tr class="form-not-check">
<td colspan=2 class="padding-small">
<div class="separator horizontal"></div>
</td>
</tr>
<tr class="form-not-check">
<td colspan=2>
<label class="header padding-small"><%= scope.textText %></label>
</td>
</tr>
<tr class="form-not-check">
<td class="padding-small" width="50%">
<label class="input-label" style="margin-top: 4px;"><%= scope.textNumeral %></label>
</td>
<td class="padding-small" width="50%">
<div id="form-combo-numeral"></div>
</td>
</tr>
</table>
<table cols="1" role="presentation">
<tr>

View File

@ -94,6 +94,7 @@ define([
this.linkAdvanced = el.find('#form-advanced-link');
this.RequiredSettings = el.find('#form-chb-required').closest('tr');
this.NameSettings = el.find('.form-name');
this.NotCheckSettings = el.find('.form-not-check');
},
createDelayedElements: function() {
@ -128,6 +129,24 @@ define([
this.cmbName.on('changed:after', this.onNameChanged.bind(this));
this.cmbName.on('hide:after', this.onHideMenus.bind(this));
this.cmbNumeral = new Common.UI.ComboBox({
el : $markup.findById('#form-combo-numeral'),
editable : false,
cls : 'input-group-nr',
menuStyle : 'min-width:100%;',
data : [
{ value: Asc.c_oNumeralType.arabic, displayValue: this.textArabic },
{ value: Asc.c_oNumeralType.hindi, displayValue: this.textHindi }
// { value: Asc.c_oNumeralType.context, displayValue: this.textContext }
],
dataHint: '1',
dataHintDirection: 'bottom',
dataHintOffset: 'big'
});
this.cmbNumeral.setValue(Asc.c_oNumeralType.arabic);
this.cmbNumeral.on('selected', this.onNumeralChanged.bind(this));
this.lockedControls.push(this.cmbNumeral);
this.cmbOrient = new Common.UI.ComboBox({
el: $markup.findById('#form-combo-orient'),
cls: 'input-group-nr',
@ -934,6 +953,14 @@ define([
}
},
onNumeralChanged: function(combo, record) {
if (this.api && !this._noApply) {
this._state.Numeral = undefined;
this.api.SetFieldDigitsType(record.value);
this.fireEvent('editcomplete', this);
}
},
onLineStyleChanged: function(combo, record) {
if (this.api && !this._noApply) {
this._state.StrokeStyle = undefined;
@ -1718,6 +1745,12 @@ define([
}
}
}
} else {
val = props.asc_getDigitsType();
if ( this._state.Numeral!==val ) {
this.cmbNumeral.setValue(val!==null && val!==undefined ? val : '');
this._state.Numeral=val;
}
}
this._noApply = false;
@ -1874,6 +1907,7 @@ define([
this._state.FormatType===AscPDF.FormatType.SPECIAL && this._state.SpecialType===-1));
this.DateSettings.toggleClass('hidden', !(isCombobox || isText) || this._state.FormatType!==AscPDF.FormatType.DATE);
this.TimeSettings.toggleClass('hidden', !(isCombobox || isText) || this._state.FormatType!==AscPDF.FormatType.TIME);
this.NotCheckSettings.toggleClass('hidden', isCheck || isRadio);
}
}, PDFE.Views.FormSettings || {}));

View File

@ -1522,6 +1522,10 @@
"PDFE.Views.FormSettings.textZipCode": "ZIP Code",
"PDFE.Views.FormSettings.textZipCode4": "ZIP Code + 4",
"PDFE.Views.FormSettings.txtCustom": "Custom",
"PDFE.Views.FormSettings.textText": "Text",
"PDFE.Views.FormSettings.textNumeral": "Numeral",
"PDFE.Views.FormSettings.textHindi": "Hindi",
"PDFE.Views.FormSettings.textArabic": "Arabic",
"PDFE.Views.FormsTab.capBtnCheckBox": "Checkbox",
"PDFE.Views.FormsTab.capBtnComboBox": "Combo Box",
"PDFE.Views.FormsTab.capBtnDropDown": "List Box",