Mercurial > lada > lada-client
diff 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 |
line wrap: on
line diff
--- a/app/view/form/Messprogramm.js Wed May 06 16:24:23 2015 +0200 +++ b/app/view/form/Messprogramm.js Thu May 07 10:55:44 2015 +0200 @@ -316,6 +316,8 @@ var svalUpper = null var svalLower = null + var min = null + var max = null if (!intervallstore) { intervallstore = Ext.create('Lada.store.Probenintervall'); @@ -325,7 +327,7 @@ // called from the controller, //and the probenintervall was not changed. // Load the records in this case - if (!intervall) { + if (!intervall && record) { intervall = record.get('probenintervall', 0, false, false, true); @@ -338,8 +340,12 @@ .findRecord('probenintervall', intervall, 0, false, false, true); - var min = intrec.get('periodstart'); - var max = intrec.get('periodend'); + if (intrec) { // in cases when a new messprogramm is + // created and the discard function is used, intrec will be null + // consequently the assertion below will fail. + min = intrec.get('periodstart'); + max = intrec.get('periodend'); + } if (!svalUpper) { svalUpper = max;