mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-24 04:04:35 +08:00
Merge pull request '[DE] Add numeral option' (#507) from feature/de-numeral into release/v9.0.0
This commit is contained in:
@ -573,6 +573,10 @@ define([
|
||||
|
||||
Common.Utils.InternalSettings.set("de-settings-zoom", newZoomValue);
|
||||
|
||||
value = parseInt(Common.localStorage.getItem("de-settings-numeral"));
|
||||
Common.Utils.InternalSettings.set("de-settings-numeral", value);
|
||||
this.api.asc_setNumeralType(value);
|
||||
|
||||
menu.hide();
|
||||
},
|
||||
|
||||
|
||||
@ -1365,6 +1365,11 @@ define([
|
||||
|
||||
Common.Utils.InternalSettings.set("de-settings-showsnaplines", me.api.get_ShowSnapLines());
|
||||
|
||||
value = Common.localStorage.getItem("de-settings-numeral");
|
||||
value = value === null ? Asc.c_oNumeralType.arabic : parseInt(value);
|
||||
Common.Utils.InternalSettings.set("de-settings-numeral", value);
|
||||
this.api.asc_setNumeralType(value);
|
||||
|
||||
function checkWarns() {
|
||||
if (!Common.Controllers.Desktop.isActive()) {
|
||||
var tips = [];
|
||||
|
||||
@ -382,6 +382,14 @@ define([], function () {
|
||||
'<td colspan="2"><button type="button" class="btn btn-text-default" id="fms-btn-auto-correct" style="width:auto; display: inline-block;padding-right: 10px;padding-left: 10px;" data-hint="2" data-hint-direction="bottom" data-hint-offset="medium"><%= scope.txtAutoCorrect %></button></div></td>',
|
||||
'</tr>',
|
||||
'<tr class ="edit divider-group"></tr>',
|
||||
'<tr>',
|
||||
'<td class="group-name" colspan="2"><label><%= scope.strDocContent %></label></td>',
|
||||
'</tr>',
|
||||
'<tr class="">',
|
||||
'<td><label><%= scope.strNumeral %></label></td>',
|
||||
'<td><div id="fms-cmb-numeral"></div></td>',
|
||||
'</tr>',
|
||||
'<tr class ="divider-group"></tr>',
|
||||
'<tr class="appearance">',
|
||||
'<td colspan="2" class="group-name"><label><%= scope.txtAppearance %></label></td>',
|
||||
'</tr>',
|
||||
@ -856,6 +864,23 @@ define([], function () {
|
||||
me.chQuickPrint.setValue(!me.chQuickPrint.isChecked());
|
||||
});*/
|
||||
|
||||
this.cmbNumeral = new Common.UI.ComboBox({
|
||||
el : $markup.findById('#fms-cmb-numeral'),
|
||||
style : 'width: 160px;',
|
||||
editable : false,
|
||||
restoreMenuHeightAndTop: true,
|
||||
cls : 'input-group-nr',
|
||||
menuStyle : 'min-width:100%;',
|
||||
data : [
|
||||
{ value: Asc.c_oNumeralType.arabic, displayValue: this.txtArabic },
|
||||
{ value: Asc.c_oNumeralType.hindi, displayValue: this.txtHindi }
|
||||
// { value: Asc.c_oNumeralType.context, displayValue: this.txtContext }
|
||||
],
|
||||
dataHint: '2',
|
||||
dataHintDirection: 'bottom',
|
||||
dataHintOffset: 'big'
|
||||
});
|
||||
|
||||
this.pnlSettings = $markup.find('.flex-settings').addBack().filter('.flex-settings');
|
||||
this.pnlApply = $markup.find('.fms-flex-apply').addBack().filter('.fms-flex-apply');
|
||||
this.pnlTable = this.pnlSettings.find('table');
|
||||
@ -902,6 +927,7 @@ define([], function () {
|
||||
this.cmbTheme.options.menuAlignEl = scrolled ? this.pnlSettings : null;
|
||||
this.cmbMacros.options.menuAlignEl = scrolled ? this.pnlSettings : null;
|
||||
this.cmbTabStyle.options.menuAlignEl = scrolled ? this.pnlSettings : null;
|
||||
this.cmbNumeral.options.menuAlignEl = scrolled ? this.pnlSettings : null;
|
||||
}
|
||||
},
|
||||
|
||||
@ -1038,6 +1064,10 @@ define([], function () {
|
||||
|
||||
if (Common.Utils.InternalSettings.get("de-settings-western-font-size")!==undefined)
|
||||
this.cmbFontSizeType.setValue(Common.Utils.InternalSettings.get("de-settings-western-font-size"));
|
||||
|
||||
value = Common.Utils.InternalSettings.get("de-settings-numeral");
|
||||
item = this.cmbNumeral.store.findWhere({value: value});
|
||||
this.cmbNumeral.setValue(item ? item.get('value') : Asc.c_oNumeralType.arabic);
|
||||
},
|
||||
|
||||
applySettings: function() {
|
||||
@ -1107,6 +1137,8 @@ define([], function () {
|
||||
Common.Utils.InternalSettings.set("de-settings-western-font-size", val);
|
||||
}
|
||||
|
||||
Common.localStorage.setItem("de-settings-numeral", this.cmbNumeral.getValue());
|
||||
|
||||
Common.localStorage.save();
|
||||
|
||||
if (this.menu) {
|
||||
|
||||
@ -2347,6 +2347,11 @@
|
||||
"DE.Views.FileMenuPanels.Settings.txtWarnMacrosDesc": "Disable all macros with a notification",
|
||||
"DE.Views.FileMenuPanels.Settings.txtWin": "as Windows",
|
||||
"DE.Views.FileMenuPanels.Settings.txtWorkspace": "Workspace",
|
||||
"DE.Views.FileMenuPanels.Settings.strDocContent": "Document content",
|
||||
"DE.Views.FileMenuPanels.Settings.strNumeral": "Numeral",
|
||||
"DE.Views.FileMenuPanels.Settings.txtArabic": "Arabic",
|
||||
"DE.Views.FileMenuPanels.Settings.txtHindi": "Hindi",
|
||||
"DE.Views.FileMenuPanels.Settings.txtContext": "Context",
|
||||
"DE.Views.FileMenuPanels.ViewSaveAs.textDownloadAs": "Download as",
|
||||
"DE.Views.FileMenuPanels.ViewSaveCopy.textSaveCopyAs": "Save copy as",
|
||||
"DE.Views.FormSettings.textAlways": "Always",
|
||||
|
||||
Reference in New Issue
Block a user