changeset 1011:6afdbc8ee920 stammdatengrids

Tidied up code, fixed buttons in Messprogrammkategoriegrid by renaming the alias of the grid
author Dustin Demuth <dustin@intevation.de>
date Thu, 21 Jan 2016 10:54:20 +0100
parents 04ac7bb4494f
children 2adc329d90fe
files app.js app/view/grid/DatensatzErzeuger.js app/view/grid/MessprogrammKategorie.js app/view/grid/Orte.js app/view/grid/Probenehmer.js
diffstat 5 files changed, 14 insertions(+), 60 deletions(-) [+]
line wrap: on
line diff
--- a/app.js	Wed Jan 20 17:38:10 2016 +0100
+++ b/app.js	Thu Jan 21 10:54:20 2016 +0100
@@ -202,23 +202,26 @@
     controllers: [
         'Lada.controller.Filter',
         'Lada.controller.ModeSwitcher',
-        'Lada.controller.grid.ProbeList',
-        'Lada.controller.grid.MessprogrammeList',
-        'Lada.controller.grid.Datensatzerzeuger',
-        'Lada.controller.grid.Probenehmer',
+        'Lada.controller.Map',
         'Lada.controller.form.Probe',
         'Lada.controller.form.Messung',
         'Lada.controller.form.Ort',
-        'Lada.controller.grid.Ort',
+        'Lada.controller.form.Location',
+        'Lada.controller.form.Messprogramm',
+        'Lada.controller.grid.Ortszuordnung',
         'Lada.controller.grid.Probenzusatzwert',
         'Lada.controller.grid.PKommentar',
+        'Lada.controller.grid.Messmethode',
         'Lada.controller.grid.MKommentar',
         'Lada.controller.grid.Messung',
         'Lada.controller.grid.Messwert',
         'Lada.controller.grid.Status',
-        'Lada.controller.Map',
-        'Lada.controller.form.Location',
-        'Lada.controller.form.Messprogramm',
-        'Lada.controller.grid.Messmethode'
+        //FilterResult
+        'Lada.controller.grid.MessprogrammeList',
+        'Lada.controller.grid.ProbeList',
+        //Stammdaten
+        'Lada.controller.grid.Datensatzerzeuger',
+        'Lada.controller.grid.Probenehmer',
+        'Lada.controller.grid.MessprogrammKategorie'
         ]
 });
--- a/app/view/grid/DatensatzErzeuger.js	Wed Jan 20 17:38:10 2016 +0100
+++ b/app/view/grid/DatensatzErzeuger.js	Thu Jan 21 10:54:20 2016 +0100
@@ -122,16 +122,6 @@
             header: i18n.getMsg('letzteAenderung'),
             dataIndex: 'letzteAenderung'
         }];
-        this.listeners = {
-           select: {
-               fn: this.activateRemoveButton,
-               scope: this
-            },
-            deselect: {
-                fn: this.deactivateRemoveButton,
-                scope: this
-            }
-        };
         this.callParent(arguments);
     },
 
--- a/app/view/grid/MessprogrammKategorie.js	Wed Jan 20 17:38:10 2016 +0100
+++ b/app/view/grid/MessprogrammKategorie.js	Thu Jan 21 10:54:20 2016 +0100
@@ -11,7 +11,7 @@
  */
 Ext.define('Lada.view.grid.MessprogrammKategorie', {
     extend: 'Ext.grid.Panel',
-    alias: 'widget.mkgrid',
+    alias: 'widget.messprogrammkategoriegrid',
 
     // minHeight and deferEmptyText are needed to be able to show the
     // emptyText message.
@@ -99,16 +99,6 @@
             header: i18n.getMsg('letzteAenderung'),
             dataIndex: 'letzteAenderung'
         }];
-        this.listeners = {
-           select: {
-               fn: this.activateRemoveButton,
-               scope: this
-            },
-            deselect: {
-                fn: this.deactivateRemoveButton,
-                scope: this
-            }
-        };
         this.callParent(arguments);
     },
 
@@ -120,6 +110,7 @@
 
         this.removeDocked(Ext.getCmp('ptbar'), true);
         this.reconfigure(store);
+        this.down('button[action=add]').enable();
         this.addDocked([{
             xtype: 'pagingtoolbar',
             id: 'ptbar',
--- a/app/view/grid/Orte.js	Wed Jan 20 17:38:10 2016 +0100
+++ b/app/view/grid/Orte.js	Thu Jan 21 10:54:20 2016 +0100
@@ -134,26 +134,6 @@
             header: i18n.getMsg('orte.letzteAenderung'),
             dataIndex: 'letzteAenderung'
         }];
-        this.listeners = {
-           select: {
-               fn: this.activateRemoveButton,
-               scope: this
-            },
-            deselect: {
-                fn: this.deactivateRemoveButton,
-                scope: this
-            }
-        };
-        this.listeners = {
-           select: {
-               fn: this.activateRemoveButton,
-               scope: this
-            },
-            deselect: {
-                fn: this.deactivateRemoveButton,
-                scope: this
-            }
-        };
         this.callParent(arguments);
     },
 
--- a/app/view/grid/Probenehmer.js	Wed Jan 20 17:38:10 2016 +0100
+++ b/app/view/grid/Probenehmer.js	Thu Jan 21 10:54:20 2016 +0100
@@ -151,16 +151,6 @@
             header: i18n.getMsg('letzteAenderung'),
             dataIndex: 'letzteAenderung'
         }];
-        this.listeners = {
-           select: {
-               fn: this.activateRemoveButton,
-               scope: this
-            },
-            deselect: {
-                fn: this.deactivateRemoveButton,
-                scope: this
-            }
-        };
         this.callParent(arguments);
     },
 

http://lada.wald.intevation.org