Commit a64a6068c06e3a5738a0e1ac268f61cda862a2d5

Authored by Erdogan Furkan
1 parent d786706b

9628 - Resolution du download

Showing 1 changed file with 12 additions and 12 deletions   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 };
... ... @@ -173,7 +173,7 @@ Ext.define('amdaModel.Download', {
173 173  
174 174 // if there's at least one parameter
175 175 myValues.list = []
176   - this.params().each(function(param, index) {
  176 + this.params().each(function (param, index) {
177 177 myValues.list[index] = param.getJsonValues();
178 178 });
179 179 myValues.fileformat = this.get('fileformat');
... ... @@ -187,7 +187,7 @@ Ext.define('amdaModel.Download', {
187 187 var list = this.get('timeTables');
188 188 myValues.list = [];
189 189  
190   - Ext.each(list, function(item, index) {
  190 + Ext.each(list, function (item, index) {
191 191 var tt = new Object();
192 192 tt.name = item.get('name');
193 193 tt.id = item.get('id');
... ... @@ -202,7 +202,7 @@ Ext.define('amdaModel.Download', {
202 202 else {
203 203 myValues.list = [];
204 204 if (this.get('list') && this.get('list').length)
205   - Ext.each(this.get('list'), function(item, index) {
  205 + Ext.each(this.get('list'), function (item, index) {
206 206 var image = new Object();
207 207 image.name = item['name'];
208 208 image.url = item['url'];
... ...