Commit 9827d46840c7e0546621c76c2353546f1fc11bae
1 parent
f4b125fb
Exists in
master
and in
80 other branches
us ok
Showing
1 changed file
with
21 additions
and
3 deletions
Show diff stats
js/app/views/DownloadUI.js
... | ... | @@ -289,7 +289,7 @@ Ext.define('amdaUI.DownloadUI', { |
289 | 289 | //TT download |
290 | 290 | else |
291 | 291 | { |
292 | - var timeformat = values.timeformatTT; | |
292 | + var timeformat = values.timeformatTT ? alues.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) { |
... | ... | @@ -371,6 +371,21 @@ Ext.define('amdaUI.DownloadUI', { |
371 | 371 | samplingField.setDisabled((newValue == 2) || refParamCheck.getValue()); |
372 | 372 | } |
373 | 373 | }, |
374 | + onTTFileFormatChange: function (combo, newValue, oldValue) { | |
375 | + if (!this.formPanel) | |
376 | + return; | |
377 | + | |
378 | + var refTimeFormatField = this.formPanel.getForm().findField('timeformatTT'); | |
379 | + | |
380 | + if (refTimeFormatField && newValue !== oldValue) { | |
381 | + if (newValue === 'space' ){ | |
382 | + refTimeFormatField.setValue('YYYY-MM-DDThh:mm:ss'); | |
383 | + refTimeFormatField.setDisabled(true); | |
384 | + }else{ | |
385 | + refTimeFormatField.setDisabled(false); | |
386 | + } | |
387 | + } | |
388 | + }, | |
374 | 389 | |
375 | 390 | onRefParamSamplingChange: function (check, newValue, oldValue) { |
376 | 391 | if (!this.formPanel) |
... | ... | @@ -651,7 +666,6 @@ Ext.define('amdaUI.DownloadUI', { |
651 | 666 | fields: ['id', 'name', 'qtip'], |
652 | 667 | data: amdaModel.DownloadConfig.timeformatData |
653 | 668 | }); |
654 | - | |
655 | 669 | this.paramPanel = new Ext.container.Container({ |
656 | 670 | title: 'Parameters', |
657 | 671 | layout: { |
... | ... | @@ -802,7 +816,11 @@ Ext.define('amdaUI.DownloadUI', { |
802 | 816 | { |
803 | 817 | fieldLabel: 'File Format ', |
804 | 818 | name: 'fileformatTT', |
805 | - store: amdaModel.DownloadConfig.fileformatTTData | |
819 | + store: amdaModel.DownloadConfig.fileformatTTData, | |
820 | + listeners: { | |
821 | + change: {fn: this.onTTFileFormatChange}, | |
822 | + scope: this | |
823 | + } | |
806 | 824 | }, |
807 | 825 | { |
808 | 826 | fieldLabel: 'Compression ', | ... | ... |