From 7bf0eb2d02fd8611bf938d33cb1ecdef38e4babc Mon Sep 17 00:00:00 2001 From: dbs Date: Thu, 23 Sep 2010 03:09:19 +0000 Subject: [PATCH] Remove most UI annoyances from authority management interface * term input field now gets the focus automatically * pressing enter in most places submits a new search * removed the onBlur event as that required users to click a second time to open the action menu git-svn-id: svn://svn.open-ils.org/ILS/trunk@17906 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/ui/default/cat/authority/list.js | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/Open-ILS/web/js/ui/default/cat/authority/list.js b/Open-ILS/web/js/ui/default/cat/authority/list.js index b719ecc08..f101dc5bf 100644 --- a/Open-ILS/web/js/ui/default/cat/authority/list.js +++ b/Open-ILS/web/js/ui/default/cat/authority/list.js @@ -176,10 +176,21 @@ function authListInit() { dijit.byId('authTerm').attr('value', term); displayRecords(); } - dojo.connect(dijit.byId('authTerm'), 'onBlur', function() { - dijit.byId('authPage').attr('value', 0); - displayRecords(); + + dojo.connect(dijit.byId('authAxis'), 'onKeyPress', function(evt) { + if (evt.keyCode == dojo.keys.ENTER) { + dijit.byId('authPage').attr('value', 0); + displayRecords(); + } + }); + + dojo.connect(dijit.byId('authPage'), 'onKeyPress', function(evt) { + if (evt.keyCode == dojo.keys.ENTER) { + dijit.byId('authPage').attr('value', 0); + displayRecords(); + } }); + dojo.connect(dijit.byId('authTerm'), 'onKeyPress', function(evt) { if (evt.keyCode == dojo.keys.ENTER) { dijit.byId('authPage').attr('value', 0); @@ -187,6 +198,8 @@ function authListInit() { } }); + dijit.byId('authTerm').focus(); + } dojo.addOnLoad(authListInit); -- 2.11.0