Commit 339fb3802b1b4d7dc9fe04dfd1c2a3ae3e9c8fe9

Authored by Benjamin Renard
2 parents 648201bc 6f8612b5

Merge branch 'amdadev'

Showing 2 changed files with 5 additions and 3 deletions   Show diff stats
js/app/views/CatalogUI.js
... ... @@ -151,6 +151,8 @@ Ext.define('amdaUI.CatalogUI', {
151 151 updateSurveyDates : function(ttObj){
152 152 var starts = [];
153 153 var stops= [];
  154 + if (this.TTGrid.getStore().getTotalCount() <= 0)
  155 + return;
154 156 Ext.Array.each(this.TTGrid.getStore().data.first.value, function (item, index) {
155 157 starts[index] = (item.raw.start);
156 158 stops[index] = (item.raw.stop);
... ... @@ -162,11 +164,11 @@ Ext.define(&#39;amdaUI.CatalogUI&#39;, {
162 164 s = new Date(starts[0]);
163 165 e = new Date(stops[stops.length - 1]);
164 166 if(! ttObj.get('surveyStart') ){
165   - ttObj.set('surveyStart', this.convertUTCDateToLocalDate(s));
  167 + ttObj.set('surveyStart', s);
166 168 this.status.isModified = true;
167 169 }
168 170 if(! ttObj.get('surveyStop') ){
169   - ttObj.set('surveyStop', this.convertUTCDateToLocalDate(e));
  171 + ttObj.set('surveyStop', e);
170 172 this.status.isModified = true;
171 173 }
172 174 }
... ...
js/app/views/DownloadUI.js
... ... @@ -289,7 +289,7 @@ Ext.define(&#39;amdaUI.DownloadUI&#39;, {
289 289 //TT download
290 290 else
291 291 {
292   - var timeformat = values.timeformatTT ? alues.timeformatTT :amdaModel.DownloadConfig.defaultValues.timeformatTT;
  292 + var timeformat = values.timeformatTT ? values.timeformatTT :amdaModel.DownloadConfig.defaultValues.timeformatTT;
293 293 var compression = values.compressionTT;
294 294 var fileformat = values.fileformatTT;
295 295 if (this.TTGrid.getStore().count() == 0) {
... ...