changeset 1029:e3ca9f7d8a4f

Avoid an empty filter combobox on startup.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 17 Feb 2016 14:17:01 +0100
parents 859e2e9859cd
children f4bd170f8ee6
files app/view/FilterPanel.js
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/app/view/FilterPanel.js	Fri Feb 12 17:23:21 2016 +0100
+++ b/app/view/FilterPanel.js	Wed Feb 17 14:17:01 2016 +0100
@@ -117,6 +117,10 @@
                     return true;
                 }
             });
+            if (entries.getCount() === 0) {
+                var cb = me.down('checkbox[name=favorites]');
+                cb.setValue(false);
+            }
             combo.store.add(entries.items);
             combo.select(combo.store.getAt(0));
             combo.fireEvent('select', combo, [combo.store.getAt(0)]);

http://lada.wald.intevation.org