Mercurial > lada > lada-client
changeset 1304:9f15a932a525
Fixed ort filter close actions.
author | Raimund Renkert <raimund.renkert@intevation.de> |
---|---|
date | Thu, 02 Feb 2017 14:40:26 +0100 |
parents | 996607be4752 |
children | 3754111e365a |
files | app/controller/grid/Ortszuordnung.js app/view/window/OrtFilter.js app/view/window/Ortszuordnung.js |
diffstat | 3 files changed, 21 insertions(+), 1 deletions(-) [+] |
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());
--- a/app/view/window/OrtFilter.js Thu Feb 02 13:46:41 2017 +0100 +++ b/app/view/window/OrtFilter.js Thu Feb 02 14:40:26 2017 +0100 @@ -23,6 +23,7 @@ resizable: false, shadow: false, alwaysOnTop: true, + closeAction: 'hide', initComponent: function() { var me = this;
--- a/app/view/window/Ortszuordnung.js Thu Feb 02 13:46:41 2017 +0100 +++ b/app/view/window/Ortszuordnung.js Thu Feb 02 14:40:26 2017 +0100 @@ -290,6 +290,15 @@ } osg.setLoading(false); map.setLoading(false); - } + }, + + onEsc: function() { + var me = this; + var search = me.down('textfield[name=search]'); + if (search.hasFocus) { + return; + } + me.callParent(arguments); + } });