From 7563ba25ea6ec1776e9ca40969898e83a9e6abc0 Mon Sep 17 00:00:00 2001 From: Heiko Date: Thu, 14 Dec 2017 12:59:33 +0100 Subject: [PATCH] Feature/ui modals usability 891 (#3989) --- CHANGELOG | 5 ++++- .../aardvark/APP/frontend/js/views/modalView.js | 13 ++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 2cee5b5689..c5cc28c0b5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,9 +1,12 @@ devel ----- +* UI: pressing the return key inside a select2 box no longer triggers the modals + success function + * UI: coordinators and db servers are now in sorted order (ascending) -* UI: fixed disappearing of the navigation label in some case special case +* UI: fixed disappearing of the navigation label in some cases * fixed issue #3917: traversals with high maximal depth take extremely long in planning phase. diff --git a/js/apps/system/_admin/aardvark/APP/frontend/js/views/modalView.js b/js/apps/system/_admin/aardvark/APP/frontend/js/views/modalView.js index 2aa34c4e15..d04b205aaa 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/js/views/modalView.js +++ b/js/apps/system/_admin/aardvark/APP/frontend/js/views/modalView.js @@ -97,17 +97,16 @@ // submit modal $(this.el).unbind('keydown'); $(this.el).unbind('return'); - // $(this.el).bind('keydown', 'return', function (e) {}); - $('.modal-body input').unbind('keydown'); - $('.modal-body input').unbind('return'); - $('.modal-body input', $(this.el)).bind('keydown', 'return', function () { + $('.modal-body .collectionTh > input').unbind('keydown'); + $('.modal-body .collectionTh > input').unbind('return'); + $('.modal-body .collectionTh > input', $(this.el)).bind('keydown', 'return', function (e) { $('.createModalDialog .modal-footer .button-success').click(); }); - $('.modal-body select').unbind('keydown'); - $('.modal-body select').unbind('return'); - $('.modal-body select', $(this.el)).bind('keydown', 'return', function () { + $('.modal-body .collectionTh > select').unbind('keydown'); + $('.modal-body .collectionTh > select').unbind('return'); + $('.modal-body .collectionTh > select', $(this.el)).bind('keydown', 'return', function (e) { $('.createModalDialog .modal-footer .button-success').click(); }); },