[open-ils-commits] r17906 - trunk/Open-ILS/web/js/ui/default/cat/authority (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Wed Sep 22 23:09:21 EDT 2010


Author: dbs
Date: 2010-09-22 23:09:19 -0400 (Wed, 22 Sep 2010)
New Revision: 17906

Modified:
   trunk/Open-ILS/web/js/ui/default/cat/authority/list.js
Log:
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


Modified: trunk/Open-ILS/web/js/ui/default/cat/authority/list.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/cat/authority/list.js	2010-09-23 02:49:36 UTC (rev 17905)
+++ trunk/Open-ILS/web/js/ui/default/cat/authority/list.js	2010-09-23 03:09:19 UTC (rev 17906)
@@ -176,10 +176,21 @@
         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 @@
         }
     });
 
+    dijit.byId('authTerm').focus();
+
 }
 dojo.addOnLoad(authListInit);
 



More information about the open-ils-commits mailing list