Commit 708af637 authored by Julia Radzhabova's avatar Julia Radzhabova

Merge branch 'feature/format-cells' of https://github.com/ONLYOFFICE/web-apps...

Merge branch 'feature/format-cells' of https://github.com/ONLYOFFICE/web-apps into feature/format-cells
parents 75904432 4deb5c68
...@@ -913,7 +913,7 @@ define([ ...@@ -913,7 +913,7 @@ define([
var me = this, var me = this,
info = me.api.asc_getCellInfo(); info = me.api.asc_getCellInfo();
me.toolbar.numFormatData.forEach( function(item, index) { me.toolbar.numFormatData.forEach( function(item, index) {
item.exampleval = me.api.asc_getLocaleExample2(item.format); item.exampleval = me.api.asc_getLocaleExample(item.format);
}); });
me.toolbar.cmbNumberFormat.setData(me.toolbar.numFormatData); me.toolbar.cmbNumberFormat.setData(me.toolbar.numFormatData);
me.toolbar.cmbNumberFormat.setValue(me._state.numformattype, me.toolbar.txtCustom); me.toolbar.cmbNumberFormat.setValue(me._state.numformattype, me.toolbar.txtCustom);
......
...@@ -760,9 +760,9 @@ define([ ...@@ -760,9 +760,9 @@ define([
info.asc_setType(Asc.c_oAscNumFormatType.None); info.asc_setType(Asc.c_oAscNumFormatType.None);
info.asc_setSymbol(landId); info.asc_setSymbol(landId);
var arr = this.api.asc_getFormatCells(info); // all formats var arr = this.api.asc_getFormatCells(info); // all formats
text = this.api.asc_getLocaleExample2(arr[2], 1000.01, landId); text = this.api.asc_getLocaleExample(arr[2], 1000.01, landId);
text = text + ' ' + this.api.asc_getLocaleExample2(arr[4], (new Date()).getExcelDateWithTime(), landId); text = text + ' ' + this.api.asc_getLocaleExample(arr[4], (new Date()).getExcelDateWithTime(), landId);
text = text + ' ' + this.api.asc_getLocaleExample2(arr[6], (new Date()).getExcelDateWithTime(), landId); text = text + ' ' + this.api.asc_getLocaleExample(arr[6], (new Date()).getExcelDateWithTime(), landId);
} }
$('#fms-lbl-reg-settings').text(_.isEmpty(text) ? '' : this.strRegSettingsEx + text); $('#fms-lbl-reg-settings').text(_.isEmpty(text) ? '' : this.strRegSettingsEx + text);
} }
......
...@@ -258,8 +258,8 @@ define([ ...@@ -258,8 +258,8 @@ define([
this.onFormatSelect(this.cmbFormat, this.cmbFormat.getSelectedRecord()); this.onFormatSelect(this.cmbFormat, this.cmbFormat.getSelectedRecord());
// for fraction - if props.format not in cmbType - setValue(this.txtCustom) // for fraction - if props.format not in cmbType - setValue(this.txtCustom)
// for date/time - if props.format not in cmbType - setValue(this.api.asc_getLocaleExample2(props.format, 37973)) // for date/time - if props.format not in cmbType - setValue(this.api.asc_getLocaleExample(props.format, 37973))
// for cmbNegative - if props.format not in cmbNegative - setValue(this.api.asc_getLocaleExample2(props.format)) // for cmbNegative - if props.format not in cmbNegative - setValue(this.api.asc_getLocaleExample(props.format))
} }
}, },
...@@ -283,7 +283,7 @@ define([ ...@@ -283,7 +283,7 @@ define([
onNegativeSelect: function(combo, record) { onNegativeSelect: function(combo, record) {
this.Format = record.value; this.Format = record.value;
this.lblExample.text(this.api.asc_getLocaleExample2(this.Format)); this.lblExample.text(this.api.asc_getLocaleExample(this.Format));
}, },
onSymbolsSelect: function(combo, record) { onSymbolsSelect: function(combo, record) {
...@@ -297,14 +297,14 @@ define([ ...@@ -297,14 +297,14 @@ define([
var format = this.api.asc_getFormatCells(info), var format = this.api.asc_getFormatCells(info),
data = []; data = [];
format.forEach(function(item) { format.forEach(function(item) {
data.push({value: item, displayValue: me.api.asc_getLocaleExample2(item, -1234.12345678901234567890)}); data.push({value: item, displayValue: me.api.asc_getLocaleExample(item, -1234.12345678901234567890)});
}); });
this.cmbNegative.setData(data); this.cmbNegative.setData(data);
this.cmbNegative.selectRecord(this.cmbNegative.store.at(0)); this.cmbNegative.selectRecord(this.cmbNegative.store.at(0));
this.cmbNegative.cmpEl.find('li:nth-child(2) a, li:nth-child(4) a').css({color: '#ff0000'}); this.cmbNegative.cmpEl.find('li:nth-child(2) a, li:nth-child(4) a').css({color: '#ff0000'});
this.Format = format[0]; this.Format = format[0];
this.lblExample.text(this.api.asc_getLocaleExample2(this.Format)); this.lblExample.text(this.api.asc_getLocaleExample(this.Format));
}, },
onDecimalChange: function(field, newValue, oldValue, eOpts){ onDecimalChange: function(field, newValue, oldValue, eOpts){
...@@ -319,7 +319,7 @@ define([ ...@@ -319,7 +319,7 @@ define([
if (this.FormatType == Asc.c_oAscNumFormatType.Number || this.FormatType == Asc.c_oAscNumFormatType.Currency || this.FormatType == Asc.c_oAscNumFormatType.Accounting) { if (this.FormatType == Asc.c_oAscNumFormatType.Number || this.FormatType == Asc.c_oAscNumFormatType.Currency || this.FormatType == Asc.c_oAscNumFormatType.Accounting) {
var data = []; var data = [];
format.forEach(function(item) { format.forEach(function(item) {
data.push({value: item, displayValue: me.api.asc_getLocaleExample2(item, -1234.12345678901234567890)}); data.push({value: item, displayValue: me.api.asc_getLocaleExample(item, -1234.12345678901234567890)});
}); });
this.cmbNegative.setData(data); this.cmbNegative.setData(data);
this.cmbNegative.selectRecord(this.cmbNegative.store.at(0)); this.cmbNegative.selectRecord(this.cmbNegative.store.at(0));
...@@ -329,7 +329,7 @@ define([ ...@@ -329,7 +329,7 @@ define([
this.Format = format[0]; this.Format = format[0];
} }
this.lblExample.text(this.api.asc_getLocaleExample2(this.Format)); this.lblExample.text(this.api.asc_getLocaleExample(this.Format));
}, },
onSeparatorChange: function(field, newValue, oldValue, eOpts){ onSeparatorChange: function(field, newValue, oldValue, eOpts){
...@@ -342,24 +342,24 @@ define([ ...@@ -342,24 +342,24 @@ define([
var format = this.api.asc_getFormatCells(info), var format = this.api.asc_getFormatCells(info),
data = []; data = [];
format.forEach(function(item) { format.forEach(function(item) {
data.push({value: item, displayValue: me.api.asc_getLocaleExample2(item, -1234.12345678901234567890)}); data.push({value: item, displayValue: me.api.asc_getLocaleExample(item, -1234.12345678901234567890)});
}); });
this.cmbNegative.setData(data); this.cmbNegative.setData(data);
this.cmbNegative.selectRecord(this.cmbNegative.store.at(0)); this.cmbNegative.selectRecord(this.cmbNegative.store.at(0));
this.cmbNegative.cmpEl.find('li:nth-child(2) a, li:nth-child(4) a').css({color: '#ff0000'}); this.cmbNegative.cmpEl.find('li:nth-child(2) a, li:nth-child(4) a').css({color: '#ff0000'});
this.Format = format[0]; this.Format = format[0];
this.lblExample.text(this.api.asc_getLocaleExample2(this.Format)); this.lblExample.text(this.api.asc_getLocaleExample(this.Format));
}, },
onTypeSelect: function(combo, record){ onTypeSelect: function(combo, record){
this.Format = record.value; this.Format = record.value;
this.lblExample.text(this.api.asc_getLocaleExample2(this.Format)); this.lblExample.text(this.api.asc_getLocaleExample(this.Format));
}, },
onCodeSelect: function(combo, record){ onCodeSelect: function(combo, record){
this.Format = record.value; this.Format = record.value;
this.lblExample.text(this.api.asc_getLocaleExample2(this.Format)); this.lblExample.text(this.api.asc_getLocaleExample(this.Format));
}, },
onFormatSelect: function(combo, record) { onFormatSelect: function(combo, record) {
...@@ -402,7 +402,7 @@ define([ ...@@ -402,7 +402,7 @@ define([
data = [], data = [],
exampleVal = (record.value == Asc.c_oAscNumFormatType.Date) ? 37973 : ((record.value == Asc.c_oAscNumFormatType.Time) ? 0.123 : parseFloat("-1234.12345678901234567890")); exampleVal = (record.value == Asc.c_oAscNumFormatType.Date) ? 37973 : ((record.value == Asc.c_oAscNumFormatType.Time) ? 0.123 : parseFloat("-1234.12345678901234567890"));
formatsarr.forEach(function(item) { formatsarr.forEach(function(item) {
data.push({value: item, displayValue: me.api.asc_getLocaleExample2(item, exampleVal)}); data.push({value: item, displayValue: me.api.asc_getLocaleExample(item, exampleVal)});
}); });
if (hasNegative) { if (hasNegative) {
this.cmbNegative.setData(data); this.cmbNegative.setData(data);
...@@ -434,7 +434,7 @@ define([ ...@@ -434,7 +434,7 @@ define([
this.cmbCode.setValue(this.Format); this.cmbCode.setValue(this.Format);
} }
this.lblExample.text(this.api.asc_getLocaleExample2(this.Format)); this.lblExample.text(this.api.asc_getLocaleExample(this.Format));
this._decimalPanel.toggleClass('hidden', !hasDecimal); this._decimalPanel.toggleClass('hidden', !hasDecimal);
this._negativePanel.css('visibility', hasNegative ? '' : 'hidden'); this._negativePanel.css('visibility', hasNegative ? '' : 'hidden');
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment