[SSE] Bug Bug 38828

This commit is contained in:
Julia Radzhabova 2020-12-01 19:24:38 +03:00
parent 847945c6a1
commit 3cdd036ba7

View file

@ -139,6 +139,7 @@ define([
'<tr class="format-code">',
'<td colspan="1" class="padding-large">',
'<label class="header">', me.textFormat,'</label>',
'<div id="format-settings-txt-code" class="input-group-nr" style="height:22px;width:264px;margin-bottom: 8px;"></div>',
'<div id="format-settings-combo-code" class="input-group-nr" style="width:264px;"></div>',
'</td>',
'</tr>',
@ -239,6 +240,17 @@ define([
});
this.cmbCode.on('selected', _.bind(this.onCodeSelect, this));
this.inputCustomFormat = new Common.UI.InputField({
el : $('#format-settings-txt-code'),
allowBlank : true,
validateOnChange : true,
validation : function () { return true; }
}).on ('changing', function (input, value) {
(me.cmbCode.getValue() !== me.txtCustom) && me.cmbCode.setValue(me.txtCustom);
me.Format = me.api.asc_convertNumFormatLocal2NumFormat(value);
me.lblExample.text(me.api.asc_getLocaleExample(me.Format));
});
this._decimalPanel = this.$window.find('.format-decimal');
this._negativePanel = this.$window.find('.format-negative');
this._separatorPanel = this.$window.find('.format-separator');
@ -409,6 +421,7 @@ define([
onCodeSelect: function(combo, record){
this.Format = record.value;
this.lblExample.text(this.api.asc_getLocaleExample(this.Format));
this.inputCustomFormat.setValue(record.displayValue);
},
onFormatSelect: function(combo, record, e, initFormatInfo) {
@ -488,7 +501,7 @@ define([
data = [],
isCustom = (this.CustomFormat) ? true : false;
formatsarr.forEach(function(item) {
data.push({value: item, displayValue: item});
data.push({value: item, displayValue: me.api.asc_convertNumFormat2NumFormatLocal(item)});
if (me.CustomFormat == item)
isCustom = false;
});
@ -497,6 +510,7 @@ define([
}
this.cmbCode.setData(data);
this.cmbCode.setValue(this.Format);
this.inputCustomFormat.setValue(me.api.asc_convertNumFormat2NumFormatLocal(this.Format));
}
this.lblExample.text(this.api.asc_getLocaleExample(this.Format));