comparison app/view/form/Messprogramm.js @ 759:b7484c7da2d4

Unified the Messprogramm windows. Unfortunately the Roweditor of Messmethodengrid is broken in this commit. This is due to the fact that the Mmt store is noit autoloaded anymore
author Dustin Demuth <dustin@intevation.de>
date Thu, 07 May 2015 10:55:44 +0200
parents b8502964f5c3
children afc9076db490
comparison
equal deleted inserted replaced
758:b2fcbdc4969d 759:b7484c7da2d4
314 var b = this.getForm().findField('teilintervallBis'); 314 var b = this.getForm().findField('teilintervallBis');
315 var intervallstore = Ext.data.StoreManager.get('Probenintervall'); 315 var intervallstore = Ext.data.StoreManager.get('Probenintervall');
316 316
317 var svalUpper = null 317 var svalUpper = null
318 var svalLower = null 318 var svalLower = null
319 var min = null
320 var max = null
319 321
320 if (!intervallstore) { 322 if (!intervallstore) {
321 intervallstore = Ext.create('Lada.store.Probenintervall'); 323 intervallstore = Ext.create('Lada.store.Probenintervall');
322 } 324 }
323 325
324 //It is likely that this method was not 326 //It is likely that this method was not
325 // called from the controller, 327 // called from the controller,
326 //and the probenintervall was not changed. 328 //and the probenintervall was not changed.
327 // Load the records in this case 329 // Load the records in this case
328 if (!intervall) { 330 if (!intervall && record) {
329 intervall = record.get('probenintervall', 331 intervall = record.get('probenintervall',
330 0, false, false, true); 332 0, false, false, true);
331 333
332 svalUpper = record.get('teilintervallBis'); 334 svalUpper = record.get('teilintervallBis');
333 svalLower = record.get('teilintervallVon'); 335 svalLower = record.get('teilintervallVon');
336 338
337 var intrec = intervallstore 339 var intrec = intervallstore
338 .findRecord('probenintervall', 340 .findRecord('probenintervall',
339 intervall, 0, false, false, true); 341 intervall, 0, false, false, true);
340 342
341 var min = intrec.get('periodstart'); 343 if (intrec) { // in cases when a new messprogramm is
342 var max = intrec.get('periodend'); 344 // created and the discard function is used, intrec will be null
345 // consequently the assertion below will fail.
346 min = intrec.get('periodstart');
347 max = intrec.get('periodend');
348 }
343 349
344 if (!svalUpper) { 350 if (!svalUpper) {
345 svalUpper = max; 351 svalUpper = max;
346 } 352 }
347 if (!svalLower) { 353 if (!svalLower) {

http://lada.wald.intevation.org