[SSE] Apply value field settings.
This commit is contained in:
parent
6c6451d39c
commit
5f6c29d952
|
@ -584,15 +584,16 @@ define([
|
||||||
var win;
|
var win;
|
||||||
if (me.api && !this._locked && me._state.field){
|
if (me.api && !this._locked && me._state.field){
|
||||||
if (me._state.field.type == 2) { // value field
|
if (me._state.field.type == 2) { // value field
|
||||||
|
var field = me._originalProps.asc_getDataFields()[me._state.field.record.get('index')];
|
||||||
(new SSE.Views.ValueFieldSettingsDialog(
|
(new SSE.Views.ValueFieldSettingsDialog(
|
||||||
{
|
{
|
||||||
props: me._originalProps,
|
props: me._originalProps,
|
||||||
fieldIndex: me._state.field.record.get('index'),
|
field: field,
|
||||||
names: me._state.names,
|
names: me._state.names,
|
||||||
api: me.api,
|
api: me.api,
|
||||||
handler: function(result, value) {
|
handler: function(result, value) {
|
||||||
if (result == 'ok' && me.api && value) {
|
if (result == 'ok' && me.api && value) {
|
||||||
// me.api.asc_changeFormatTableInfo(me._state.TableName, Asc.c_oAscChangeTableStyleInfo.advancedSettings, value);
|
field.asc_set(me.api, me._originalProps, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
Common.NotificationCenter.trigger('edit:complete', me);
|
Common.NotificationCenter.trigger('edit:complete', me);
|
||||||
|
|
|
@ -119,7 +119,7 @@ define([
|
||||||
this.api = options.api;
|
this.api = options.api;
|
||||||
this.handler = options.handler;
|
this.handler = options.handler;
|
||||||
this.props = options.props;
|
this.props = options.props;
|
||||||
this.fieldIndex = options.fieldIndex || 0;
|
this.field = options.field || 0;
|
||||||
this.names = options.names || [];
|
this.names = options.names || [];
|
||||||
|
|
||||||
Common.Views.AdvancedSettingsWindow.prototype.initialize.call(this, this.options);
|
Common.Views.AdvancedSettingsWindow.prototype.initialize.call(this, this.options);
|
||||||
|
@ -213,7 +213,7 @@ define([
|
||||||
|
|
||||||
_setDefaults: function (props) {
|
_setDefaults: function (props) {
|
||||||
if (props) {
|
if (props) {
|
||||||
var field = props.asc_getDataFields()[this.fieldIndex],
|
var field = this.field,
|
||||||
cache_names = props.asc_getCacheFields(),
|
cache_names = props.asc_getCacheFields(),
|
||||||
show_as = field.asc_getShowDataAs();
|
show_as = field.asc_getShowDataAs();
|
||||||
|
|
||||||
|
@ -239,7 +239,11 @@ define([
|
||||||
},
|
},
|
||||||
|
|
||||||
getSettings: function () {
|
getSettings: function () {
|
||||||
return {};
|
var field = this.field.asc_clone();
|
||||||
|
field.asc_setName(this.inputCustomName.getValue());
|
||||||
|
field.asc_setSubtotal(this.cmbSummarize.getValue());
|
||||||
|
|
||||||
|
return field;
|
||||||
},
|
},
|
||||||
|
|
||||||
onDlgBtnClick: function(event) {
|
onDlgBtnClick: function(event) {
|
||||||
|
|
Loading…
Reference in a new issue