Merged
Merge Request #41
·
created by
9628 - Resolution du download
From
9628
into
develop
-
mentioned in commit dc65a9a35715c1d0f9196fd25c64506348fa7e3a
-
Status changed to merged
Showing
1 changed file
Show diff stats
js/app/models/Download.js
... | ... | @@ -19,7 +19,7 @@ Ext.define('amdaModel.DownloadConfig', { |
19 | 19 | fileformatTT: 'text', |
20 | 20 | filecompress: 'tar+gzip', |
21 | 21 | filecompressTT: 'tar+gzip', |
22 | - filestructure: '2' | |
22 | + filestructure: '0' | |
23 | 23 | }, |
24 | 24 | |
25 | 25 | timeformatData: [ |
... | ... | @@ -69,7 +69,7 @@ Ext.define('amdaModel.Download', { |
69 | 69 | { name: 'timeformat', type: 'string', defaultValue: amdaModel.DownloadConfig.defaultValues.timeformat }, |
70 | 70 | { name: 'timeformatTT', type: 'string', defaultValue: amdaModel.DownloadConfig.defaultValues.timeformatTT }, |
71 | 71 | { name: 'filestructure', type: 'string', defaultValue: amdaModel.DownloadConfig.defaultValues.filestructure }, |
72 | - { name: 'refparamSampling', type: 'boolean', defaultValue: false }, | |
72 | + { name: 'refparamSampling', type: 'boolean', defaultValue: true }, | |
73 | 73 | { name: 'separateInfoFile', type: 'boolean', defaultValue: false }, |
74 | 74 | { name: 'sampling', type: 'float', defaultValue: '600' }, |
75 | 75 | { name: 'scientificformat', type: 'boolean', defaultValue: true }, |
... | ... | @@ -89,7 +89,7 @@ Ext.define('amdaModel.Download', { |
89 | 89 | |
90 | 90 | propertiesToCopy: 'id,name,downloadSrc,refparamSampling,separateInfoFile,sampling,scientificformat,list,timeformat,timeformatTT,filestructure,fileprefix,fileformat,fileformatTT,compression,compressionTT', |
91 | 91 | |
92 | - constructor: function() { | |
92 | + constructor: function () { | |
93 | 93 | var me = this; |
94 | 94 | me.callParent(arguments); |
95 | 95 | if ((arguments.length > 0) && arguments[0]) { |
... | ... | @@ -99,9 +99,9 @@ Ext.define('amdaModel.Download', { |
99 | 99 | this.dirty = false; |
100 | 100 | }, |
101 | 101 | |
102 | - loadParams: function(params) { | |
102 | + loadParams: function (params) { | |
103 | 103 | /* Compatability mode */ |
104 | - Ext.each(params, function(param, index) { | |
104 | + Ext.each(params, function (param, index) { | |
105 | 105 | if (param.hasOwnProperty('is-init')) { |
106 | 106 | return; |
107 | 107 | } |
... | ... | @@ -116,20 +116,20 @@ Ext.define('amdaModel.Download', { |
116 | 116 | this.params().loadData(params); |
117 | 117 | }, |
118 | 118 | |
119 | - isDirty: function() { | |
119 | + isDirty: function () { | |
120 | 120 | if (this.dirty) |
121 | 121 | return true; |
122 | 122 | |
123 | 123 | var d = false; |
124 | 124 | |
125 | - this.params().each(function(param, index) { | |
125 | + this.params().each(function (param, index) { | |
126 | 126 | if (param.dirty) |
127 | 127 | d = true; |
128 | 128 | }); |
129 | 129 | return d; |
130 | 130 | }, |
131 | 131 | |
132 | - getJsonValues: function() { | |
132 | + getJsonValues: function () { | |
133 | 133 | |
134 | 134 | var myValues = new Object(); |
135 | 135 | myValues.nodeType = 'download'; //amdaModel.DownloadNode.nodeType; |
... | ... | @@ -152,7 +152,7 @@ Ext.define('amdaModel.Download', { |
152 | 152 | var timeTables = this.get('timeTables'); // init an empty array for timeTables |
153 | 153 | myValues.timeTables = []; |
154 | 154 | // for each interval record |
155 | - Ext.Array.each(timeTables, function(item, index, all) { | |
155 | + Ext.Array.each(timeTables, function (item, index, all) { | |
156 | 156 | // get Json simplified value |
157 | 157 | if (!item.$className) { |
158 | 158 | myValues.timeTables[index] = { timeTableName: item.timeTableName, id: item.id }; |
... | ... | @@ -174,7 +174,7 @@ Ext.define('amdaModel.Download', { |
174 | 174 | |
175 | 175 | // if there's at least one parameter |
176 | 176 | myValues.list = [] |
177 | - this.params().each(function(param, index) { | |
177 | + this.params().each(function (param, index) { | |
178 | 178 | myValues.list[index] = param.getJsonValues(); |
179 | 179 | }); |
180 | 180 | myValues.fileformat = this.get('fileformat'); |
... | ... | @@ -188,7 +188,7 @@ Ext.define('amdaModel.Download', { |
188 | 188 | var list = this.get('timeTables'); |
189 | 189 | myValues.list = []; |
190 | 190 | |
191 | - Ext.each(list, function(item, index) { | |
191 | + Ext.each(list, function (item, index) { | |
192 | 192 | var tt = new Object(); |
193 | 193 | tt.name = item.get('name'); |
194 | 194 | tt.id = item.get('id'); |
... | ... | @@ -203,7 +203,7 @@ Ext.define('amdaModel.Download', { |
203 | 203 | else { |
204 | 204 | myValues.list = []; |
205 | 205 | if (this.get('list') && this.get('list').length) |
206 | - Ext.each(this.get('list'), function(item, index) { | |
206 | + Ext.each(this.get('list'), function (item, index) { | |
207 | 207 | var image = new Object(); |
208 | 208 | image.name = item['name']; |
209 | 209 | image.url = item['url']; | ... | ... |