Commit 94a05aa20c19c76d1dcd5ca1c9700b7312edb6f8
1 parent
2e8be1ae
Exists in
master
and in
112 other branches
update object in stat
Showing
1 changed file
with
11 additions
and
7 deletions
Show diff stats
js/app/views/StatisticsUI.js
... | ... | @@ -57,19 +57,22 @@ Ext.define('amdaUI.StatisticsUI', { |
57 | 57 | var formValues = basicForm.getValues(); |
58 | 58 | // this.object.set('name',formValues.name); |
59 | 59 | // this.object.set('description',formValues.description); |
60 | - | |
60 | + | |
61 | 61 | var recs = this.paramGrid.getStore().getNewRecords(); |
62 | 62 | var paramArr = new Array(); |
63 | - Ext.Array.each(recs, function(rec, index,allItems){ | |
63 | + | |
64 | + Ext.Array.each(recs, function(rec, index,allItems) | |
65 | + { | |
64 | 66 | var obj = new Object(); |
65 | 67 | obj.param = rec.get('name'); |
66 | 68 | obj.function = rec.get('function'); |
67 | - paramArr.push(obj); | |
69 | + paramArr.push(obj); | |
68 | 70 | }); |
71 | + | |
69 | 72 | this.object.set('parameter', paramArr); |
70 | 73 | |
71 | 74 | var timeSource = this.timeSelector.getActiveTimeSource(); |
72 | - | |
75 | + | |
73 | 76 | if (timeSource === amdaModel.AmdaTimeObject.inputTimeSrc[0] // timeSource 'TimeTable' |
74 | 77 | && this.timeSelector.TTGrid.getStore().count() == 0) { |
75 | 78 | myDesktopApp.warningMsg('You\'ve chosen Time Selection `by TimeTable` but no timeTable was added!' |
... | ... | @@ -77,7 +80,8 @@ Ext.define('amdaUI.StatisticsUI', { |
77 | 80 | return false; |
78 | 81 | } |
79 | 82 | |
80 | - // basicForm.updateRecord(this.object); | |
83 | + basicForm.updateRecord(this.object); | |
84 | + | |
81 | 85 | this.object.set('timesrc', timeSource); |
82 | 86 | // set valid intervals into TimeTable object |
83 | 87 | if (timeSource === amdaModel.AmdaTimeObject.inputTimeSrc[0]) |
... | ... | @@ -297,8 +301,8 @@ Ext.define('amdaUI.StatisticsUI', { |
297 | 301 | // update object with user's values |
298 | 302 | // if the return is true (object had been updated) |
299 | 303 | // if(this.updateObject()){ |
300 | - this.updateObject(); | |
301 | - this.generateCatalog(); | |
304 | + this.updateObject(); | |
305 | + this.generateCatalog(); | |
302 | 306 | // } |
303 | 307 | } |
304 | 308 | }, |
... | ... |