changeset 768:380edfecac67

changes on the margins, erratic behaviour is not fixed
author Dustin Demuth <dustin@intevation.de>
date Tue, 12 May 2015 15:07:23 +0200
parents 5ee59111b188
children 274a843caf44 afc9076db490
files app/controller/grid/Messmethode.js app/view/grid/Messmethoden.js app/view/grid/Nuklide.js
diffstat 3 files changed, 15 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/app/controller/grid/Messmethode.js	Tue May 12 14:53:54 2015 +0200
+++ b/app/controller/grid/Messmethode.js	Tue May 12 15:07:23 2015 +0200
@@ -22,7 +22,8 @@
             'messmethodengrid': {
                 edit: this.gridSave,
                 canceledit: this.cancelEdit,
-                select: this.selectRow
+                select: this.selectRow,
+                deselect: this.deselectRow
             },
             'messmethodengrid button[action=add]': {
                 click: this.add
@@ -147,6 +148,14 @@
     },
 
     /**
+     * Clear the nuklideGrid when a MMT Row is deselected
+     */
+    deselectRow: function(row, record, index){
+        var ngrid = row.view.up('window').down('nuklidegrid');
+        ngrid.initData();
+    },
+
+    /**
      * This function syncs the Messmethoden-Messgroessen Array
      * With the Nuklide Store.
      * It simply overwrites the Array
--- a/app/view/grid/Messmethoden.js	Tue May 12 14:53:54 2015 +0200
+++ b/app/view/grid/Messmethoden.js	Tue May 12 15:07:23 2015 +0200
@@ -22,9 +22,10 @@
     viewConfig: {
         deferEmptyText: false
     },
-    //margin: '0, 0, 5, 5',
+    margin: '0, 5, 5, 0',
 
     recordId: null,
+    allowDeselect: true,
 
     initComponent: function() {
         var i18n = Lada.getApplication().bundle;
--- a/app/view/grid/Nuklide.js	Tue May 12 14:53:54 2015 +0200
+++ b/app/view/grid/Nuklide.js	Tue May 12 15:07:23 2015 +0200
@@ -23,9 +23,10 @@
         deferEmptyText: false,
         markDirty: false //Remove Dirty-Flags
     },
-    //margin: '0, 0, 5, 5',
+    margin: '0, 0, 5, 5',
 
     recordId: null,
+    allowDeselect: true,
 
     initComponent: function() {
         var i18n = Lada.getApplication().bundle;
@@ -110,7 +111,7 @@
     },
     initData: function() {
         if (this.store) {
-            this.store.reload();
+            this.store.removeAll();
         }
     },
     setData: function(store) {

http://lada.wald.intevation.org