diff app/controller/grid/Ortszuordnung.js @ 1304:9f15a932a525

Fixed ort filter close actions.
author Raimund Renkert <raimund.renkert@intevation.de>
date Thu, 02 Feb 2017 14:40:26 +0100
parents e9f812528324
children 3754111e365a
line wrap: on
line diff
--- a/app/controller/grid/Ortszuordnung.js	Thu Feb 02 13:46:41 2017 +0100
+++ b/app/controller/grid/Ortszuordnung.js	Thu Feb 02 14:40:26 2017 +0100
@@ -202,6 +202,16 @@
      * Search triggered by textfield key event.
      */
     search: function(field, evt, opts) {
+        if (evt.getKey() === 27) {
+            if (this.resultPanel.isVisible()) {
+                this.resultPanel.close();
+                return;
+            }
+            else {
+                field.up('window').close();
+                return;
+            }
+        }
         this.searchField = field;
         if ((evt.getKey() == 13 || evt.getKey() == 8) && field.getValue() && field.getValue().length > 0) {
             this.execSearch(field, field.getValue());

http://lada.wald.intevation.org