[Lada-commits] [PATCH 3 of 3] Set mandatory fields

Wald Commits scm-commit at wald.intevation.org
Mon Feb 1 13:17:33 CET 2016


# HG changeset patch
# User Dustin Demuth <dustin at intevation.de>
# Date 1454075477 -3600
# Branch stammdatengrids
# Node ID e9e974d31924d88e9f866311cdfee2b2d3ddb2c4
# Parent  75ce503ab2969da1eae4c9afcc8264aed12e926d
Set mandatory fields

diff -r 75ce503ab296 -r e9e974d31924 app/view/grid/DatensatzErzeuger.js
--- a/app/view/grid/DatensatzErzeuger.js	Tue Jan 26 12:29:59 2016 +0100
+++ b/app/view/grid/DatensatzErzeuger.js	Fri Jan 29 14:51:17 2016 +0100
@@ -44,7 +44,6 @@
             dock: 'top',
             items: [{
                 xtype: 'tbtext',
-                id: 'tbtitle',
                 text: i18n.getMsg('de.gridTitle')
             },
             '->',
@@ -87,14 +86,15 @@
             header: i18n.getMsg('daErzeugerId'),
             dataIndex: 'daErzeugerId',
             editor: {
+                xtype: 'textfield',
                 allowBlank: false
             }
         }, {
             header: i18n.getMsg('bezeichnung'),
             dataIndex: 'bezeichnung',
             editor: {
-                allowBlank: false,
-                xtype: 'textfield'
+                xtype: 'textfield',
+                allowBlank: false
             }
         }, {
             header: i18n.getMsg('mstId'),
@@ -132,12 +132,16 @@
         var i18n = Lada.getApplication().bundle;
 
         if (store) {
-            this.removeDocked(Ext.getCmp('ptbar'), true);
             this.reconfigure(store);
+
+            var ptbar = this.down('pagingtoolbar');
+            if (ptbar) {
+                this.removeDocked(ptbar);
+            }
+
             this.down('button[action=add]').enable();
             this.addDocked([{
                 xtype: 'pagingtoolbar',
-                id: 'ptbar',
                 dock: 'bottom',
                 store: store,
                 displayInfo: true
diff -r 75ce503ab296 -r e9e974d31924 app/view/grid/MessprogrammKategorie.js
--- a/app/view/grid/MessprogrammKategorie.js	Tue Jan 26 12:29:59 2016 +0100
+++ b/app/view/grid/MessprogrammKategorie.js	Fri Jan 29 14:51:17 2016 +0100
@@ -44,7 +44,6 @@
             dock: 'top',
             items: [{
                 xtype: 'tbtext',
-                id: 'tbtitle',
                 text: i18n.getMsg('mk.gridTitle')
             },
             '->',
@@ -87,12 +86,14 @@
             header: i18n.getMsg('mplId'),
             dataIndex: 'mplId',
             editor: {
+                xtype: 'textfield',
                 allowBlank: false
             }
         }, {
             header: i18n.getMsg('bezeichnung'),
             dataIndex: 'bezeichnung',
             editor: {
+                xtype: 'textfield',
                 allowBlank: false
             }
         }, {
@@ -108,15 +109,21 @@
     setStore: function(store){
         var i18n = Lada.getApplication().bundle;
 
-        this.removeDocked(Ext.getCmp('ptbar'), true);
-        this.reconfigure(store);
-        this.down('button[action=add]').enable();
-        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
+            }]);
+        }
     }
 });
diff -r 75ce503ab296 -r e9e974d31924 app/view/grid/Probenehmer.js
--- a/app/view/grid/Probenehmer.js	Tue Jan 26 12:29:59 2016 +0100
+++ b/app/view/grid/Probenehmer.js	Fri Jan 29 14:51:17 2016 +0100
@@ -44,7 +44,6 @@
             dock: 'top',
             items: [{
                 xtype: 'tbtext',
-                id: 'tbtitle',
                 text: i18n.getMsg('pn.gridTitle')
             },
             '->',
@@ -86,66 +85,64 @@
             header: i18n.getMsg('bearbeiter'),
             dataIndex: 'bearbeiter',
             editor: {
-                allowBlank: false
+                xtype: 'textfield'
             }
         }, {
             header: i18n.getMsg('prnId'),
             dataIndex: 'prnId',
             editor: {
+                xtype: 'textfield',
                 allowBlank: false
             }
         }, {
             header: i18n.getMsg('bemerkung'),
             dataIndex: 'bemerkung',
             editor: {
-                allowBlank: false,
-                xtype: 'textfield'
+                xtype: 'textfield',
+                allowBlank: false
             }
         }, {
             header: i18n.getMsg('kurzBezeichnung'),
             dataIndex: 'kurzBezeichnung',
             editor: {
-                allowBlank: false,
-                xtype: 'textfield'
+                xtype: 'textfield',
+                allowBlank: false
             }
         }, {
             header: i18n.getMsg('ort'),
             dataIndex: 'ort',
             editor: {
-                allowBlank: false,
                 xtype: 'textfield'
             }
         }, {
             header: i18n.getMsg('plz'),
             dataIndex: 'plz',
             editor: {
-                allowBlank: false,
                 xtype: 'numberfield'
             }
         }, {
             header: i18n.getMsg('strasse'),
             dataIndex: 'strasse',
             editor: {
-                allowBlank: false,
                 xtype: 'textfield'
             }
         }, {
             header: i18n.getMsg('telefon'),
             dataIndex: 'telefon',
             editor: {
-                allowBlank: false
+                xtype: 'textfield'
             }
         }, {
             header: i18n.getMsg('tp'),
             dataIndex: 'tp',
             editor: {
-                allowBlank: false
+                xtype: 'textfield'
             }
         }, {
             header: i18n.getMsg('typ'),
             dataIndex: 'typ',
             editor: {
-                allowBlank: false
+                xtype: 'textfield'
             }
         }, {
             header: i18n.getMsg('letzteAenderung'),
@@ -161,12 +158,16 @@
         var i18n = Lada.getApplication().bundle;
 
         if (store) {
-            this.removeDocked(Ext.getCmp('ptbar'), true);
             this.reconfigure(store);
+
+            var ptbar = this.down('pagingtoolbar');
+            if (ptbar) {
+                this.removeDocked(ptbar);
+            }
+
             this.down('button[action=add]').enable();
             this.addDocked([{
                 xtype: 'pagingtoolbar',
-                id: 'ptbar',
                 dock: 'bottom',
                 store: store,
                 displayInfo: true


More information about the Lada-commits mailing list