[Lada-commits] [PATCH 1 of 3] Avoid an empty filter combobox on startup

Wald Commits scm-commit at wald.intevation.org
Wed Feb 17 14:25:49 CET 2016


# HG changeset patch
# User Raimund Renkert <raimund.renkert at intevation.de>
# Date 1455715021 -3600
# Node ID e3ca9f7d8a4f14420e9dc7166f110ac5f7623227
# Parent  859e2e9859cda256b07505215d8ee3ab52f681c8
Avoid an empty filter combobox on startup.

diff -r 859e2e9859cd -r e3ca9f7d8a4f app/view/FilterPanel.js
--- 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)]);


More information about the Lada-commits mailing list