Mercurial > lada > lada-client
comparison app/controller/grid/ProbeList.js @ 1272:208254152ac0
Printing: calcualte NWG < sign in the client.
Also: removed ToDos from printing
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Mon, 19 Dec 2016 14:23:04 +0100 |
parents | e9a624998179 |
children | 69ebd572fe5c |
comparison
equal
deleted
inserted
replaced
1271:43f394c10866 | 1272:208254152ac0 |
---|---|
207 probe = data[i]; | 207 probe = data[i]; |
208 deskriptoren = probe.deskriptoren; | 208 deskriptoren = probe.deskriptoren; |
209 messstelle = probe.messstelle; | 209 messstelle = probe.messstelle; |
210 labormessstelle = probe.labormessstelle; | 210 labormessstelle = probe.labormessstelle; |
211 ortszuordnung = probe.ortszuordnung; | 211 ortszuordnung = probe.ortszuordnung; |
212 zusatzwerte = probe.zusatzwerte; | |
212 | 213 |
213 if (messstelle != null) { | 214 if (messstelle != null) { |
214 prep[i].messstelle = []; | 215 prep[i].messstelle = []; |
215 prep[i].messstelle[0] = messstelle; | 216 prep[i].messstelle[0] = messstelle; |
216 prep[i]['messstelle.messStelle'] = messstelle.messStelle; | 217 prep[i]['messstelle.messStelle'] = messstelle.messStelle; |
235 else { | 236 else { |
236 prep[i].deskriptoren = []; | 237 prep[i].deskriptoren = []; |
237 prep[i].deskriptoren[0] = emptyDeskriptor; | 238 prep[i].deskriptoren[0] = emptyDeskriptor; |
238 } | 239 } |
239 | 240 |
240 debugger; | 241 // See: app/view/grid/Probenzusatzwert.js |
242 // Calculate NWG < symbol , as this is NOT done by the server | |
243 for (z in zusatzwerte){ | |
244 var nwg = zusatzwerte[z]['nwgZuMesswert']; | |
245 var mw = zusatzwerte[z]['messwertPzs']; | |
246 if ( mw < nwg) { | |
247 prep[i].zusatzwerte[z]['messwertNwg'] = '<'; | |
248 } | |
249 else { | |
250 prep[i].zusatzwerte[z]['messwertNwg'] = null; | |
251 } | |
252 } | |
241 | 253 |
242 // Flatten the Ortszuodnung Array | 254 // Flatten the Ortszuodnung Array |
243 for (var o in ortszuordnung) { | 255 for (var o in ortszuordnung) { |
244 oz = ortszuordnung[o]; | 256 oz = ortszuordnung[o]; |
245 for (var e in oz.ort) { | 257 for (var e in oz.ort) { |
343 scope: cbscope, | 355 scope: cbscope, |
344 success: printFunctionCallback, | 356 success: printFunctionCallback, |
345 failure: function(response) { | 357 failure: function(response) { |
346 console.log('failure'); | 358 console.log('failure'); |
347 // Error handling | 359 // Error handling |
348 // TODO | |
349 console.log(response.responseText) | |
350 button.enable(); | 360 button.enable(); |
351 button.setLoading(false); | 361 button.setLoading(false); |
352 if (response.responseText) { | 362 if (response.responseText) { |
353 try { | 363 try { |
354 var json = Ext.JSON.decode(response.responseText); | 364 var json = Ext.JSON.decode(response.responseText); |
509 }, | 519 }, |
510 failure: function(response) { | 520 failure: function(response) { |
511 var i18n = Lada.getApplication().bundle; | 521 var i18n = Lada.getApplication().bundle; |
512 console.log('failure'); | 522 console.log('failure'); |
513 // Error handling | 523 // Error handling |
514 // TODO | |
515 //console.log(response.responseText) | |
516 button.enable(); | 524 button.enable(); |
517 button.setLoading(false); | 525 button.setLoading(false); |
518 if (response.responseText) { | 526 if (response.responseText) { |
519 try { | 527 try { |
520 var json = Ext.JSON.decode(response.responseText); | 528 var json = Ext.JSON.decode(response.responseText); |