changeset 1412:dc90e2997071

Merged branch release-2.5 into default.
author Tom Gottfried <tom@intevation.de>
date Mon, 27 Mar 2017 16:50:00 +0200
parents 50b04a7bee16 (current diff) e749d09fafca (diff)
children fc0ec9cde3aa
files app.js app/model/Messung.js app/view/form/Probe.js custom-vhosts.conf
diffstat 14 files changed, 83 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Wed Mar 22 16:28:22 2017 +0100
+++ b/.hgtags	Mon Mar 27 16:50:00 2017 +0200
@@ -65,3 +65,4 @@
 59cc259f7f21348e1e57e357adfcbf10cc09ea07 2.4.0
 254a5278ac2ddb286ed6f58e2735f4a72c676744 2.4.1
 bf41823cdcf25b173cc45777cee8c5a3b3862e2b 2.5
+a347cb704f93f43f8bc2b66298854dc715085058 2.5.1
--- a/app/controller/Filter.js	Wed Mar 22 16:28:22 2017 +0100
+++ b/app/controller/Filter.js	Mon Mar 27 16:50:00 2017 +0200
@@ -119,7 +119,7 @@
         // Setup Columns
         if (this.displayFields &&
             this.displayFields.length > 0 &&
-            this.displayFields[0].index === 0) {
+            this.displayFields[0].index <= 1) {
             this.displayFields.reverse();
         }
 
--- a/app/controller/grid/MessungList.js	Wed Mar 22 16:28:22 2017 +0100
+++ b/app/controller/grid/MessungList.js	Mon Mar 27 16:50:00 2017 +0200
@@ -28,6 +28,9 @@
             },
             'messunglistgrid toolbar button[action=setstatus]': {
                 click: this.setStatus
+            },
+            'messunglistgrid pagingtoolbar': {
+                change: this.pageChange
             }
         });
         this.callParent(arguments);
@@ -297,5 +300,18 @@
         if (btn === 'yes') {
             location.reload();
         }
+    },
+
+    pageChange: function(toolbar) {
+        var grid = toolbar.up('grid');
+        var store = grid.getStore();
+        var rowExpander = grid.plugins[0]
+        var nodes = rowExpander.view.getNodes();
+        for (var i = 0; i < nodes.length; i++) {
+            var node = Ext.fly(nodes[i]);
+            if (node.hasCls(rowExpander.rowCollapsedCls) === false) {
+                rowExpander.toggleRow(i, store.getAt(i));
+            }
+        }
     }
 });
--- a/app/controller/grid/ProbeList.js	Wed Mar 22 16:28:22 2017 +0100
+++ b/app/controller/grid/ProbeList.js	Mon Mar 27 16:50:00 2017 +0200
@@ -51,6 +51,9 @@
             'probelistgrid gridview': {
                 expandbody: this.expandBody,
                 collapsebody: this.collapseBody
+            },
+            'probelistgrid pagingtoolbar': {
+                change: this.pageChange
             }
         });
         this.callParent(arguments);
@@ -549,6 +552,19 @@
                 }
             }
         });
+    },
+
+    pageChange: function(toolbar) {
+        var grid = toolbar.up('grid');
+        var store = grid.getStore();
+        var rowExpander = grid.plugins[0]
+        var nodes = rowExpander.view.getNodes();
+        for (var i = 0; i < nodes.length; i++) {
+            var node = Ext.fly(nodes[i]);
+            if (node.hasCls(rowExpander.rowCollapsedCls) === false) {
+                rowExpander.toggleRow(i, store.getAt(i));
+            }
+        }
     }
 
 });
--- a/app/model/Messung.js	Wed Mar 22 16:28:22 2017 +0100
+++ b/app/model/Messung.js	Mon Mar 27 16:50:00 2017 +0200
@@ -37,7 +37,7 @@
         name: 'messzeitpunkt',
         convert: function(v) {
             if (!v) {
-                return new Date();
+                return null;
             }
             return new Date(v);
         }
--- a/app/store/MessprogrammKategorie.js	Wed Mar 22 16:28:22 2017 +0100
+++ b/app/store/MessprogrammKategorie.js	Mon Mar 27 16:50:00 2017 +0200
@@ -11,5 +11,6 @@
  */
 Ext.define('Lada.store.MessprogrammKategorie', {
     extend: 'Ext.data.Store',
-    model: 'Lada.model.MessprogrammKategorie'
+    model: 'Lada.model.MessprogrammKategorie',
+    pageSize: 50
 });
--- a/app/view/FilterPanel.js	Wed Mar 22 16:28:22 2017 +0100
+++ b/app/view/FilterPanel.js	Mon Mar 27 16:50:00 2017 +0200
@@ -72,6 +72,7 @@
             items: [{
                 xtype: 'button',
                 action: 'search',
+                icon: 'resources/img/Find.png',
                 text: 'Suchen',
                 margin: '0 10 0 0'
             }, {
--- a/app/view/form/Messprogramm.js	Wed Mar 22 16:28:22 2017 +0100
+++ b/app/view/form/Messprogramm.js	Mon Mar 27 16:50:00 2017 +0200
@@ -82,6 +82,13 @@
                         },
                         margin: '0, 10, 0, 0',
                         items: [{
+                             xtype: 'displayfield',
+                             name: 'id',
+                             fieldLabel: i18n.getMsg('mprId'),
+                             margin: '0, 5, 5, 5',
+                             labelWidth: 95,
+                             maxLength: 20
+                            }, {
                             layout: {
                                 type: 'hbox',
                                 align: 'stretch'
@@ -103,6 +110,7 @@
                                             var labor = newValue[0].get('laborMst');
                                             combo.up('fieldset').down('messstelle[name=mstId]').setValue(mst);
                                             combo.up('fieldset').down('messstelle[name=laborMstId]').setValue(labor);
+                                            combo.up('fieldset').down('messprogrammland[name=mplId]').setValue();
                                         }
                                     }
                                 }
@@ -134,6 +142,7 @@
                                 }
                             }, {
                                 xtype: 'netzbetreiber',
+                                name: 'netzbetreiber',
                                 editable: false,
                                 readOnly: true,
                                 isFormField: false,
@@ -374,7 +383,15 @@
                     margin: '0, 5, 5, 5',
                     //width: '100%',
                     anchor: '100%',
-                    labelWidth: 115
+                    labelWidth: 115,
+                    listeners: {
+                        expand : {
+                            fn: function(combo) {
+                                Ext.StoreManager.get('messprogrammkategorie').clearFilter();
+                                Ext.StoreManager.get('messprogrammkategorie').filter('netzbetreiberId', combo.up('fieldset').down('netzbetreiber[name=netzbetreiber]').getValue());
+                            }
+                        }
+                    }
                 }, {
                     xtype: 'textarea',
                     name: 'probeKommentar',
--- a/app/view/form/Probe.js	Wed Mar 22 16:28:22 2017 +0100
+++ b/app/view/form/Probe.js	Mon Mar 27 16:50:00 2017 +0200
@@ -112,6 +112,7 @@
                                             var labor = newValue[0].get('laborMst');
                                             combo.up('fieldset').down('messstelle[name=mstId]').setValue(mst);
                                             combo.up('fieldset').down('messstelle[name=laborMstId]').setValue(labor);
+                                            combo.up('fieldset').down('messprogrammland[name=mplId]').setValue();
                                         }
                                     }
                                 }
@@ -137,6 +138,7 @@
                                 hidden: true
                             }, {
                                 xtype: 'netzbetreiber',
+                                name: 'netzbetreiber',
                                 editable: false,
                                 readOnly: true,
                                 isFormField: false,
@@ -227,7 +229,15 @@
                             margin: '0, 5, 5, 5',
                             width: '100%',
                             anchor: '100%',
-                            labelWidth: 110
+                            labelWidth: 110,
+                            listeners: {
+                                expand : {
+                                    fn: function(combo) {
+                                       Ext.StoreManager.get('messprogrammkategorie').clearFilter();
+                                       Ext.StoreManager.get('messprogrammkategorie').filter('netzbetreiberId', combo.up('fieldset').down('netzbetreiber[name=netzbetreiber]').getValue());
+                                    }
+                                }
+                            }
                         }]
                 }, {
                     // Zeit
--- a/app/view/grid/Messung.js	Wed Mar 22 16:28:22 2017 +0100
+++ b/app/view/grid/Messung.js	Mon Mar 27 16:50:00 2017 +0200
@@ -310,7 +310,7 @@
         var grid = this;
         //only enable the remove buttone, when the grid is editable.
         if (! grid.readOnly &&
-            record.get('statusWert') === 0 &&
+            record.get('statusKombi') === 1 &&
             record.get('owner')) {
             grid.down('button[action=delete]').enable();
         }
--- a/app/view/widget/MessprogrammLand.js	Wed Mar 22 16:28:22 2017 +0100
+++ b/app/view/widget/MessprogrammLand.js	Mon Mar 27 16:50:00 2017 +0200
@@ -36,6 +36,8 @@
         this.store = Ext.data.StoreManager.get('messprogrammkategorie');
         if (!this.store) {
             this.store = Ext.create('Lada.store.MessprogrammKategorie');
+        } else {
+            this.store.clearFilter();
         }
         this.store.sort();
         this.callParent(arguments);
--- a/app/view/window/Ortszuordnung.js	Wed Mar 22 16:28:22 2017 +0100
+++ b/app/view/window/Ortszuordnung.js	Mon Mar 27 16:50:00 2017 +0200
@@ -135,13 +135,16 @@
                 }],
                 dockedItems: [{
                     xtype: 'toolbar',
-                    dock: 'bottom',
+                    dock: 'top',
                     items: [{
                         xtype: 'textfield',
                         name: 'search',
-                        labelWidth: 50,
+                        icon: 'resources/img/Find.png',
+                        width: '150px',
                         enableKeyEvents: true,
-                        fieldLabel: i18n.getMsg('ortszuordnung.ortsuche')
+                        emptyText: 'Ortssuche',
+                        emptyCls: 'empty-text-field',
+                        fieldLabel: ''
                     }, '->', {
                         text: i18n.getMsg('orte.new'),
                         icon: 'resources/img/list-add.png',
--- a/resources/css/lada.css	Wed Mar 22 16:28:22 2017 +0100
+++ b/resources/css/lada.css	Mon Mar 27 16:50:00 2017 +0200
@@ -85,3 +85,10 @@
 .row-expander-grid .x-grid-with-row-lines .x-grid-td {
     border-bottom: 1px solid #e0e0e0;
 }
+
+.empty-text-field {
+    background-image:url('../img/Find.png');
+    background-repeat: no-repeat;
+    background-position: left 5px center;
+    padding-left: 20px;
+}
Binary file resources/img/Find.png has changed

http://lada.wald.intevation.org