diff --git a/js/app/views/StatisticsUI.js b/js/app/views/StatisticsUI.js index e8868ba..c7109f9 100644 --- a/js/app/views/StatisticsUI.js +++ b/js/app/views/StatisticsUI.js @@ -57,19 +57,22 @@ Ext.define('amdaUI.StatisticsUI', { var formValues = basicForm.getValues(); // this.object.set('name',formValues.name); // this.object.set('description',formValues.description); - + var recs = this.paramGrid.getStore().getNewRecords(); var paramArr = new Array(); - Ext.Array.each(recs, function(rec, index,allItems){ + + Ext.Array.each(recs, function(rec, index,allItems) + { var obj = new Object(); obj.param = rec.get('name'); obj.function = rec.get('function'); - paramArr.push(obj); + paramArr.push(obj); }); + this.object.set('parameter', paramArr); var timeSource = this.timeSelector.getActiveTimeSource(); - + if (timeSource === amdaModel.AmdaTimeObject.inputTimeSrc[0] // timeSource 'TimeTable' && this.timeSelector.TTGrid.getStore().count() == 0) { myDesktopApp.warningMsg('You\'ve chosen Time Selection `by TimeTable` but no timeTable was added!' @@ -77,7 +80,8 @@ Ext.define('amdaUI.StatisticsUI', { return false; } - // basicForm.updateRecord(this.object); + basicForm.updateRecord(this.object); + this.object.set('timesrc', timeSource); // set valid intervals into TimeTable object if (timeSource === amdaModel.AmdaTimeObject.inputTimeSrc[0]) @@ -297,8 +301,8 @@ Ext.define('amdaUI.StatisticsUI', { // update object with user's values // if the return is true (object had been updated) // if(this.updateObject()){ - this.updateObject(); - this.generateCatalog(); + this.updateObject(); + this.generateCatalog(); // } } }, -- libgit2 0.21.2