diff app/controller/grid/Messmethode.js @ 764:ba8c0e754979

Some work was done on the nuklidegrid, added a checkbox model to select the nuklide. Looks OK, but has no function right now
author Dustin Demuth <dustin@intevation.de>
date Fri, 08 May 2015 15:31:58 +0200
parents b2fcbdc4969d
children 62721a75d31d
line wrap: on
line diff
--- a/app/controller/grid/Messmethode.js	Fri May 08 12:47:28 2015 +0200
+++ b/app/controller/grid/Messmethode.js	Fri May 08 15:31:58 2015 +0200
@@ -20,7 +20,8 @@
         this.control({
             'messmethodengrid': {
                 edit: this.gridSave,
-                canceledit: this.cancelEdit
+                canceledit: this.cancelEdit,
+                select: this.selectRow
             },
             'messmethodengrid button[action=add]': {
                 click: this.add
@@ -75,6 +76,22 @@
     },
 
     /**
+     * When a row is selected,
+     * the nuklid-grid will be updated
+     * to display the nuklide which are possible for this
+     * Messmethod
+     */
+    selectRow: function(row, record, index) {
+        var ngrid = row.view.up('window').down('nuklidegrid');
+        var nuklide = record.get('messgroessen');
+        var store = Ext.data.StoreManager.get('messgroessen');
+        if (!store) {
+            store = Ext.create('Lada.store.Messgroessen');
+        }
+        ngrid.setData(store);
+    },
+
+    /**
      * This function adds a new row
      */
     add: function(button) {

http://lada.wald.intevation.org