[Lada-commits] [PATCH] Fixed some issues when the status is null

Wald Commits scm-commit at wald.intevation.org
Tue Nov 3 14:44:08 CET 2015


# HG changeset patch
# User Dustin Demuth <dustin at intevation.de>
# Date 1446558241 -3600
# Node ID c7bf0b459074ff03390487229d003c81b34b9812
# Parent  6fb23d793caa5d82b5fd527c6f8b21e9b153087a
Fixed some issues when the status is null

diff -r 6fb23d793caa -r c7bf0b459074 app/view/form/Messung.js
--- a/app/view/form/Messung.js	Mon Nov 02 09:50:41 2015 +0100
+++ b/app/view/form/Messung.js	Tue Nov 03 14:44:01 2015 +0100
@@ -155,7 +155,7 @@
             function(records, operation, success) {
                 var ret;
                 var i18n = Lada.getApplication().bundle;
-                if (sStore.getTotalCount() === 0) {
+                if (sStore.getTotalCount() === 0 || !statusId) {
                     ret = 0;
                 }
                 else {
diff -r 6fb23d793caa -r c7bf0b459074 app/view/grid/Messung.js
--- a/app/view/grid/Messung.js	Mon Nov 02 09:50:41 2015 +0100
+++ b/app/view/grid/Messung.js	Tue Nov 03 14:44:01 2015 +0100
@@ -207,7 +207,7 @@
      */
     updateStatusColumn: function(sstore, record, success, opts) {
         var value = 0;
-        if (sstore.getTotalCount() === 0) {
+        if (sstore.getTotalCount() === 0 || !opts.statusId) {
             value = 0;
         }
         else {
diff -r 6fb23d793caa -r c7bf0b459074 app/view/grid/Status.js
--- a/app/view/grid/Status.js	Mon Nov 02 09:50:41 2015 +0100
+++ b/app/view/grid/Status.js	Tue Nov 03 14:44:01 2015 +0100
@@ -93,7 +93,7 @@
             header: 'Status',
             dataIndex: 'statusWert',
             renderer: function(value) {
-                if (!value || value === '') {
+                if (value===null || value === '') {
                     return '';
                 }
                 return statusStore.getById(value).get('wert');


More information about the Lada-commits mailing list