Commit 1d3f12bb1bf3c3bb7140e3d1b3de8b3531f56865
1 parent
5d173fb0
Exists in
master
and in
9 other branches
#11583 - Done
Showing
2 changed files
with
12 additions
and
10 deletions
Show diff stats
js/app/views/CatalogUI.js
... | ... | @@ -158,16 +158,10 @@ Ext.define('amdaUI.CatalogUI', { |
158 | 158 | updateSurveyDates : function(res){ |
159 | 159 | if (this.TTGrid.getStore().getTotalCount() <= 0) |
160 | 160 | return; |
161 | - | |
162 | - if(! this.object.get('surveyStart') ){ | |
163 | - this.object.set('surveyStart', res['minStart']); | |
164 | - this.status.isModified = true; | |
165 | - } | |
166 | - if(! this.object.get('surveyStop') ){ | |
167 | - this.object.set('surveyStop', res['maxStop']); | |
168 | - this.status.isModified = true; | |
169 | - } | |
170 | - }, | |
161 | + this.object.set('surveyStart', res['minStart']); | |
162 | + this.object.set('surveyStop', res['maxStop']); | |
163 | + this.status.isModified = true; | |
164 | + }, | |
171 | 165 | |
172 | 166 | createTT: function (catId) { |
173 | 167 | var ttObj = Ext.create('amdaModel.TimeTable'); | ... | ... |
php/classes/TimeTableMgr.php
... | ... | @@ -541,6 +541,14 @@ class TimeTableMgr extends AmdaObjectMgr |
541 | 541 | $this->objectDom->documentElement->appendChild($newInterval); |
542 | 542 | } |
543 | 543 | |
544 | + // Update SurveyStart & SurveyStop | |
545 | + $surveyStartNodes = $objToGet->getElementsByTagName('surveyStart'); | |
546 | + $surveyStopNodes = $objToGet->getElementsByTagName('surveyStop'); | |
547 | + if ($surveyStartNodes->length > 0 && $surveyStopNodes->length > 0) { | |
548 | + $surveyStartNodes->item(0)->nodeValue = TimeUtils::stamp2iso($minStart); | |
549 | + $surveyStopNodes->item(0)->nodeValue = TimeUtils::stamp2iso($maxStop); | |
550 | + } | |
551 | + | |
544 | 552 | //save modifications |
545 | 553 | $this->id = $id; |
546 | 554 | $this->resFileName = USERTTDIR . $this->id . '.xml'; | ... | ... |