[Lada-commits] [PATCH 2 of 2] Fix status reset

Wald Commits scm-commit at wald.intevation.org
Thu Oct 27 19:33:22 CEST 2016


# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1477589321 -7200
# Node ID 19855757a9505bd6a2553fa96be0b804b474a092
# Parent  5b5d9d7a771a4b12c0e353464dc6a4f2f289e1ab
Fix status reset.

diff -r 5b5d9d7a771a -r 19855757a950 app/controller/grid/Status.js
--- 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());


More information about the Lada-commits mailing list