diff app/view/grid/MessprogrammKategorie.js @ 1051:981339d774b8

merged stammdatengrids to default.
author Raimund Renkert <raimund.renkert@intevation.de>
date Tue, 01 Mar 2016 14:12:39 +0100
parents d859fbfc8a53 e9e974d31924
children 070255c0db28
line wrap: on
line diff
--- a/app/view/grid/MessprogrammKategorie.js	Mon Feb 29 15:10:17 2016 +0100
+++ b/app/view/grid/MessprogrammKategorie.js	Tue Mar 01 14:12:39 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.
@@ -46,7 +46,6 @@
             dock: 'top',
             items: [{
                 xtype: 'tbtext',
-                id: 'tbtitle',
                 text: i18n.getMsg('mk.gridTitle')
             },
             '->',
@@ -89,12 +88,14 @@
             header: i18n.getMsg('mplId'),
             dataIndex: 'mplId',
             editor: {
+                xtype: 'textfield',
                 allowBlank: false
             }
         }, {
             header: i18n.getMsg('bezeichnung'),
             dataIndex: 'bezeichnung',
             editor: {
+                xtype: 'textfield',
                 allowBlank: false
             }
         }, {
@@ -103,16 +104,6 @@
             format: 'd.m.Y H:i',
             dataIndex: 'letzteAenderung'
         }];
-        this.listeners = {
-           select: {
-               fn: this.activateRemoveButton,
-               scope: this
-            },
-            deselect: {
-                fn: this.deactivateRemoveButton,
-                scope: this
-            }
-        };
         this.callParent(arguments);
     },
 
@@ -125,14 +116,21 @@
             this.down('button[action=add]').enable();
         }
 
-        this.removeDocked(Ext.getCmp('ptbar'), true);
-        this.reconfigure(store);
-        this.addDocked([{
-            xtype: 'pagingtoolbar',
-            id: 'ptbar',
-            dock: 'bottom',
-            store: store,
-            displayInfo: true
-        }]);
+        if (store) {
+            this.reconfigure(store);
+
+            var ptbar = this.down('pagingtoolbar');
+            if (ptbar) {
+                this.removeDocked(ptbar);
+            }
+
+            this.down('button[action=add]').enable();
+            this.addDocked([{
+                xtype: 'pagingtoolbar',
+                dock: 'bottom',
+                store: store,
+                displayInfo: true
+            }]);
+        }
     }
 });

http://lada.wald.intevation.org