[SSE] Refactoring pivot settings

This commit is contained in:
Julia Radzhabova
2023-01-31 22:03:37 +03:00
parent 30789f83df
commit d8b0db2a18
3 changed files with 3 additions and 6 deletions

View File

@ -73,7 +73,6 @@ define([ 'text!spreadsheeteditor/main/app/template/FieldSettingsDialog.templa
this.handler = options.handler;
this.props = options.props;
this.fieldIndex = options.fieldIndex || 0;
this.names = options.names || [];
this.type = options.type || 0; // 0 - columns, 1 - rows, 3 - filters
Common.Views.AdvancedSettingsWindow.prototype.initialize.call(this, this.options);

View File

@ -787,7 +787,6 @@ define([
{
props: me._originalProps,
field: field,
names: me._state.names,
api: me.api,
handler: function(result, value) {
if (result == 'ok' && me.api && value) {
@ -805,7 +804,6 @@ define([
{
props: me._originalProps,
fieldIndex: pivotIndex,
names: me._state.names,
api: me.api,
type: me._state.field.type,
handler: function(result, value) {

View File

@ -107,7 +107,6 @@ define([
this.handler = options.handler;
this.props = options.props;
this.field = options.field || 0;
this.names = options.names || [];
Common.Views.AdvancedSettingsWindow.prototype.initialize.call(this, this.options);
},
@ -227,9 +226,10 @@ define([
this.cmbShowAs.setValue(show_as);
var data = [];
this.names.forEach(function(item, index){
data.push({value: index, displayValue: item});
this.pivot_names.forEach(function (item, index) {
data.push({value: index, displayValue: item.asc_getName() || me.cache_names[index].asc_getName()});
});
this.cmbBaseField.setData(data);
this.cmbBaseField.setValue(field.asc_getBaseField(), '');
this.cmbBaseField.setDisabled(show_as === Asc.c_oAscShowDataAs.Normal || show_as === Asc.c_oAscShowDataAs.PercentOfTotal || show_as === Asc.c_oAscShowDataAs.PercentOfRow ||