changeset 1225:19855757a950

Fix status reset.
author Tom Gottfried <tom@intevation.de>
date Thu, 27 Oct 2016 19:28:41 +0200
parents 5b5d9d7a771a
children 531db469779f
files app/controller/grid/Status.js
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/app/controller/grid/Status.js	Thu Oct 27 19:26:25 2016 +0200
+++ b/app/controller/grid/Status.js	Thu Oct 27 19:28:41 2016 +0200
@@ -181,8 +181,6 @@
      doReset: function(button) {
         var i18n = Lada.getApplication().bundle;
 
-        var resetStatusValue = 8;
-
         var s = button.up('window').down('messungform').getCurrentStatus();
         var messId = button.up('window').down('messungform').getRecord().get('id');
 
@@ -191,13 +189,13 @@
                 i18n.getMsg('err.msg.generic.body'));
             return;
         }
+
         //Set Status to 'Resetted' (8)
         var kombis = Ext.data.StoreManager.get('statuskombi');
-        var stufe = kombis.getById(s.get('statusKombi')).raw.statusStufe.id;
+        var stufe = kombis.getById(s.get('statusKombi')).get('statusStufe').id;
         var kombiNdx = kombis.findBy(function(record, id) {
-            if(record.raw.statusStufe.id === stufe && record.raw.statusWert.id === 8) {
-                return true;
-            }
+            return record.get('statusStufe').id === stufe
+                && record.get('statusWert').id === 8
         });
         var record = s.copy();
         record.set('datum', new Date());

http://lada.wald.intevation.org