diff app/view/grid/Probenzusatzwert.js @ 571:1dedce48e3e1

Implemented the 'add' button; fixed renderer and controller.
author Raimund Renkert <raimund.renkert@intevation.de>
date Tue, 10 Mar 2015 12:11:50 +0100
parents 9a414a49dffe
children f59bda7551d7
line wrap: on
line diff
--- a/app/view/grid/Probenzusatzwert.js	Tue Mar 10 12:09:50 2015 +0100
+++ b/app/view/grid/Probenzusatzwert.js	Tue Mar 10 12:11:50 2015 +0100
@@ -27,11 +27,11 @@
     recordId: null,
 
     initComponent: function() {
-        var rowEditing = Ext.create('Ext.grid.plugin.RowEditing', {
+        this.rowEditing = Ext.create('Ext.grid.plugin.RowEditing', {
             clicksToMoveEditor: 1,
             autoCancel: false
         });
-        this.plugins = [rowEditing];
+        this.plugins = [this.rowEditing];
         this.dockedItems = [{
             xtype: 'toolbar',
             dock: 'bottom',
@@ -55,6 +55,9 @@
             dataIndex: 'pzsId',
             flex: 1,
             renderer: function(value) {
+                if (!value || value === '') {
+                    return '';
+                }
                 var store = Ext.data.StoreManager.get('probenzusaetze');
                 var record = store.getById(value);
                 return record.get('beschreibung');
@@ -85,6 +88,9 @@
             dataIndex: 'pzsId',
             width: 80,
             renderer: function(value) {
+                if (!value || value === '') {
+                    return '';
+                }
                 var zstore = Ext.data.StoreManager.get('probenzusaetze');
                 var mstore = Ext.data.StoreManager.get('messeinheiten');
                 var mehId = zstore.getById(value).get('mehId');

http://lada.wald.intevation.org