changeset 1046:39b162749778

merged.
author Raimund Renkert <raimund.renkert@intevation.de>
date Fri, 26 Feb 2016 09:41:39 +0100
parents d859fbfc8a53 (diff) 3ef492b5240b (current diff)
children fc6bf0e2444e
files
diffstat 6 files changed, 21 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/app/controller/Filter.js	Wed Feb 24 18:24:25 2016 +0100
+++ b/app/controller/Filter.js	Fri Feb 26 09:41:39 2016 +0100
@@ -86,11 +86,12 @@
         var filters = element.up('panel[name=main]').down('panel[name=filtervariables]');
         var filterValues = element.up('panel[name=main]').down('panel[name=filtervalues]');
 
+        var desc = element.up('fieldset').down('displayfield[name=description]');
         if (!record[0]) {
+            desc.setValue('');
             return;
         }
         // Set "Filter Auswahl" Description
-        var desc = element.up('fieldset').down('displayfield[name=description]');
         desc.setValue(record[0].data.description);
 
         this.displayFields = record[0].data.results;
@@ -452,6 +453,12 @@
                     return true;
                 }
             });
+            if (entries.getCount() === 0) {
+                fav.setValue(false);
+                entries = store.queryBy(function() {
+                    return true;
+                });
+            }
         }
         else {
             entries = store.queryBy(function() {
@@ -473,7 +480,7 @@
         var qId = search.getValue();
         var query = search.store.getById(qId);
         var ndx = 0;
-        for (var i = filters.items.length - 1; i >= 0; i--) {
+        for (var i = filters.items.items.length - 1; i >= 0; i--) {
             var filter = filters.items.items[i];
             var filterId = filter.filterId;
             var value = filter.getValue();
@@ -495,7 +502,7 @@
                             break;
                         }
                     }
-                    if (ndx < filter.items.length - 1) {
+                    if (ndx < filters.items.items.length - 1) {
                         return;
                     }
                     if (query.get('type') === 'probe') {
--- a/app/controller/grid/Status.js	Wed Feb 24 18:24:25 2016 +0100
+++ b/app/controller/grid/Status.js	Fri Feb 26 09:41:39 2016 +0100
@@ -136,6 +136,9 @@
             var record = Ext.create('Lada.model.Status', {
                 messungsId: button.up('statusgrid').recordId
             });
+            if (Ext.data.StoreManager.get('messstellenFiltered').count() === 1) {
+                record.set('erzeuger', Ext.data.StoreManager.get('messstellenFiltered').getAt(0).get('id'));
+            }
         }
 
         //Set the Date
--- a/app/view/grid/DatensatzErzeuger.js	Wed Feb 24 18:24:25 2016 +0100
+++ b/app/view/grid/DatensatzErzeuger.js	Fri Feb 26 09:41:39 2016 +0100
@@ -120,6 +120,8 @@
             }
         }, {
             header: i18n.getMsg('letzteAenderung'),
+            xtype: 'datecolumn',
+            format: 'd.m.Y H:i',
             dataIndex: 'letzteAenderung'
         }];
         this.listeners = {
--- a/app/view/grid/MessprogrammKategorie.js	Wed Feb 24 18:24:25 2016 +0100
+++ b/app/view/grid/MessprogrammKategorie.js	Fri Feb 26 09:41:39 2016 +0100
@@ -99,6 +99,8 @@
             }
         }, {
             header: i18n.getMsg('letzteAenderung'),
+            xtype: 'datecolumn',
+            format: 'd.m.Y H:i',
             dataIndex: 'letzteAenderung'
         }];
         this.listeners = {
--- a/app/view/grid/Probenehmer.js	Wed Feb 24 18:24:25 2016 +0100
+++ b/app/view/grid/Probenehmer.js	Fri Feb 26 09:41:39 2016 +0100
@@ -151,6 +151,8 @@
             }
         }, {
             header: i18n.getMsg('letzteAenderung'),
+            xtype: 'datecolumn',
+            format: 'd.m.Y H:i',
             dataIndex: 'letzteAenderung'
         }];
         this.listeners = {
--- a/app/view/grid/Status.js	Wed Feb 24 18:24:25 2016 +0100
+++ b/app/view/grid/Status.js	Fri Feb 26 09:41:39 2016 +0100
@@ -104,13 +104,8 @@
                 displayField: 'messStelle',
                 valueField: 'id',
                 allowBlank: false,
-                editable: false,
-                afterRender: function() {
-                    this.superclass.afterRender.apply(this, arguments);
-                    if (this.store.count() === 1) {
-                        this.setValue(this.store.getAt(0));
-                    }
-                }
+                queryMode: 'local',
+                editable: false
             },
             sortable: false
         }, {

http://lada.wald.intevation.org