Commit 098d15a9c2157e82f1e3f180d6b8a470c939d899
1 parent
fca728d7
Exists in
master
and in
107 other branches
Give the possibility to put header in a separate file (#6497)
Showing
2 changed files
with
10 additions
and
3 deletions
Show diff stats
js/app/models/Download.js
... | ... | @@ -20,6 +20,7 @@ Ext.define('amdaModel.Download', { |
20 | 20 | {name: 'timeformatTT', type: 'string'}, |
21 | 21 | {name: 'structure', type: 'string'}, |
22 | 22 | {name: 'refparamSampling', type: 'boolean', defaultValue: false}, |
23 | + {name: 'separateInfoFile', type: 'boolean', defaultValue: false}, | |
23 | 24 | {name: 'sampling', type: 'int', defaultValue: '600'}, |
24 | 25 | {name: 'fileprefix', type: 'string'}, |
25 | 26 | {name: 'fileformat', type: 'string'}, |
... | ... | @@ -28,7 +29,7 @@ Ext.define('amdaModel.Download', { |
28 | 29 | {name: 'compressionTT', type: 'string'} |
29 | 30 | ], |
30 | 31 | |
31 | - propertiesToCopy : 'id,name,downloadSrc,refparamSampling,sampling,list,timeformat,timeformatTT,structure,fileprefix,fileformat,fileformatTT,compression,compressionTT', | |
32 | + propertiesToCopy : 'id,name,downloadSrc,refparamSampling,separateInfoFile,sampling,list,timeformat,timeformatTT,structure,fileprefix,fileformat,fileformatTT,compression,compressionTT', | |
32 | 33 | |
33 | 34 | getJsonValues : function(){ |
34 | 35 | |
... | ... | @@ -40,6 +41,7 @@ Ext.define('amdaModel.Download', { |
40 | 41 | if (myValues.downloadSrc === '0') { // Data download |
41 | 42 | myValues.structure = this.get('structure'); |
42 | 43 | myValues.refparamSampling = this.get('refparamSampling'); |
44 | + myValues.separateInfoFile = this.get('separateInfoFile'); | |
43 | 45 | myValues.sampling = this.get('sampling'); |
44 | 46 | myValues.fileprefix = this.get('fileprefix'); |
45 | 47 | |
... | ... | @@ -47,8 +49,7 @@ Ext.define('amdaModel.Download', { |
47 | 49 | // if there's at least one timeTable in case of Download data |
48 | 50 | if (this.get('timesrc') == amdaModel.AmdaTimeObject.inputTimeSrc[0] && this.get('timeTables') && this.get('timeTables').length){ |
49 | 51 | // get complete timeTables collection |
50 | - var timeTables = this.get('timeTables'); | |
51 | - // init an empty array for timeTables | |
52 | + var timeTables = this.get('timeTables'); // init an empty array for timeTables | |
52 | 53 | myValues.timeTables=[]; |
53 | 54 | // for each interval record |
54 | 55 | Ext.Array.each(timeTables, function(item, index, all){ | ... | ... |
js/app/views/DownloadUI.js
... | ... | @@ -613,6 +613,12 @@ Ext.define('amdaUI.DownloadUI', { |
613 | 613 | scope: this |
614 | 614 | } |
615 | 615 | }, |
616 | + { | |
617 | + xtype: 'checkbox', boxLabel: 'Header in a separate file', | |
618 | + boxLabelAlign: 'before', | |
619 | + name: 'separateInfoFile', checked: false | |
620 | + | |
621 | + }, | |
616 | 622 | { |
617 | 623 | xtype: 'checkbox', boxLabel: 'Use first param. as reference for sampling', |
618 | 624 | boxLabelAlign: 'before', | ... | ... |