LP #1100914: Input focus for staff client portal should be the text box.
authorDan Pearl <dpearl@cwmars.org>
Thu, 17 Jan 2013 19:56:18 +0000 (14:56 -0500)
committerBen Shum <bshum@biblio.org>
Fri, 1 Feb 2013 17:15:50 +0000 (12:15 -0500)
Suggested by a librarian:
Save a click by putting the initial focus of the Portal page in the search box.
Previously, entering the text box would eliminate the decorative background image;
now, pressing on any key while focus in the box will eliminate the text.

Signed-off-by: Dan Pearl <dpearl@cwmars.org>
Signed-off-by: Pasi Kallinen <pasi.kallinen@pttk.fi>
Signed-off-by: Ben Shum <bshum@biblio.org>

Open-ILS/xul/staff_client/server/index.xhtml

index b0ddccd..324c017 100644 (file)
@@ -81,6 +81,7 @@
         
                 //this function will allow for the "Hello, Staff Member" messages
                 function init() { 
+                        document.getElementById('quicksearch').focus();
                         SearchOnBlur();
                         JSAN.use('OpenILS.data'); 
                         var data = new OpenILS.data(); 
               <td colspan="2" rowspan="1">
                 <form action="#" onsubmit="return SearchOnSubmit();">
                   <input id="quicksearch" onfocus="SearchOnFocus();" onblur=
-                  "SearchOnBlur();" /> <input value="Search" type="submit" />
+                  "SearchOnBlur();" onkeydown="SearchOnFocus();" /> <input value="Search" type="submit" />
                 </form>
               </td>
             </tr>