From 098d15a9c2157e82f1e3f180d6b8a470c939d899 Mon Sep 17 00:00:00 2001 From: Benjamin Renard Date: Thu, 20 Dec 2018 09:16:51 +0100 Subject: [PATCH] Give the possibility to put header in a separate file (#6497) --- js/app/models/Download.js | 7 ++++--- js/app/views/DownloadUI.js | 6 ++++++ 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/js/app/models/Download.js b/js/app/models/Download.js index c853ca5..4b859c5 100644 --- a/js/app/models/Download.js +++ b/js/app/models/Download.js @@ -20,6 +20,7 @@ Ext.define('amdaModel.Download', { {name: 'timeformatTT', type: 'string'}, {name: 'structure', type: 'string'}, {name: 'refparamSampling', type: 'boolean', defaultValue: false}, + {name: 'separateInfoFile', type: 'boolean', defaultValue: false}, {name: 'sampling', type: 'int', defaultValue: '600'}, {name: 'fileprefix', type: 'string'}, {name: 'fileformat', type: 'string'}, @@ -28,7 +29,7 @@ Ext.define('amdaModel.Download', { {name: 'compressionTT', type: 'string'} ], - propertiesToCopy : 'id,name,downloadSrc,refparamSampling,sampling,list,timeformat,timeformatTT,structure,fileprefix,fileformat,fileformatTT,compression,compressionTT', + propertiesToCopy : 'id,name,downloadSrc,refparamSampling,separateInfoFile,sampling,list,timeformat,timeformatTT,structure,fileprefix,fileformat,fileformatTT,compression,compressionTT', getJsonValues : function(){ @@ -40,6 +41,7 @@ Ext.define('amdaModel.Download', { if (myValues.downloadSrc === '0') { // Data download myValues.structure = this.get('structure'); myValues.refparamSampling = this.get('refparamSampling'); + myValues.separateInfoFile = this.get('separateInfoFile'); myValues.sampling = this.get('sampling'); myValues.fileprefix = this.get('fileprefix'); @@ -47,8 +49,7 @@ Ext.define('amdaModel.Download', { // if there's at least one timeTable in case of Download data if (this.get('timesrc') == amdaModel.AmdaTimeObject.inputTimeSrc[0] && this.get('timeTables') && this.get('timeTables').length){ // get complete timeTables collection - var timeTables = this.get('timeTables'); - // init an empty array for timeTables + var timeTables = this.get('timeTables'); // init an empty array for timeTables myValues.timeTables=[]; // for each interval record Ext.Array.each(timeTables, function(item, index, all){ diff --git a/js/app/views/DownloadUI.js b/js/app/views/DownloadUI.js index 7e09995..d82a859 100644 --- a/js/app/views/DownloadUI.js +++ b/js/app/views/DownloadUI.js @@ -613,6 +613,12 @@ Ext.define('amdaUI.DownloadUI', { scope: this } }, + { + xtype: 'checkbox', boxLabel: 'Header in a separate file', + boxLabelAlign: 'before', + name: 'separateInfoFile', checked: false + + }, { xtype: 'checkbox', boxLabel: 'Use first param. as reference for sampling', boxLabelAlign: 'before', -- libgit2 0.21.2