while the enter-key capturing is around, do it right at least
authorsenator <lebbeous@esilibrary.com>
Thu, 3 Feb 2011 20:03:54 +0000 (15:03 -0500)
committersenator <lebbeous@esilibrary.com>
Thu, 3 Feb 2011 20:03:54 +0000 (15:03 -0500)
Open-ILS/web/opac/skin/kcls-wire/js/misc.js
Open-ILS/web/templates/default/kcls-wire/parts/advanced/global_row.tt2

index 9e24b46..2d809bf 100644 (file)
@@ -120,7 +120,7 @@ function grabCharCode(evt) {
     evt = evt || window.event || event || null;
     if (evt) {
     // OLD CODE: return (evt.charCode ? evt.charCode : ((evt.which) ? evt.which : evt.keyCode));
-        return event.which || event.charCode || event.keyCode;
+        return evt.which || evt.charCode || evt.keyCode;
     } else {
         return -1;
     }
index 09e213b..7c60f98 100644 (file)
@@ -1,35 +1,30 @@
 <!-- ****************** adv_global_row.xml ***************************** -->
 <tr id='adv_global_trow' type='input'>
-       <td align='left' width='100%' nowrap='nowrap'>
-
-               <!-- select the search class -->
-               <select name='type' style='margin-right: 7px;'>
-                       <option value='keyword' selected='selected'>&common.keyword;</option>
-                       <option value='title'>&common.title;</option>
-                       <option value='author'>&common.author;</option>
-                       <option value='subject'>&common.subject;</option>
-                       <option value='series'>&common.series;</option>
-                       <option value='bibcn'>&common.bibcn;</option>
-                       
-                       </select>
-       
-               <!-- select how to treat the text -->
-               <select name='contains' style='margin-right: 7px;'>
-                       <option value='contains'>&opac.advanced.refined.contains;</option>
-                       <option value='nocontains'>&opac.advanced.refined.nocontains;</option>
-                       <option value='exact'>&opac.advanced.refined.exact;</option>
-               </select>
-                       
-               <!-- search term -->
-               <input type='text' size='18' name='term' style='margin-right: 3px;' />
-       
-               <!-- Remove this row -->
+    <td align='left' width='100%' nowrap='nowrap'>
+        <!-- select the search class -->
+        <select name='type' style='margin-right: 7px;'>
+            <option value='keyword' selected='selected'>&common.keyword;</option>
+            <option value='title'>&common.title;</option>
+            <option value='author'>&common.author;</option>
+            <option value='subject'>&common.subject;</option>
+            <option value='series'>&common.series;</option>
+            <option value='bibcn'>&common.bibcn;</option>
+            </select>
+        <!-- select how to treat the text -->
+        <select name='contains' style='margin-right: 7px;'>
+            <option value='contains'>&opac.advanced.refined.contains;</option>
+            <option value='nocontains'>&opac.advanced.refined.nocontains;</option>
+            <option value='exact'>&opac.advanced.refined.exact;</option>
+        </select>
+        <!-- search term -->
+        <input type='text' size='18' name='term'
+            style='margin-right: 3px;'
+            onkeydown="if (userPressedEnter(event)) alert('XXX Enter');" />
+        <!-- Remove this row -->
         <button onclick='
             var row = this.parentNode.parentNode;
-            var tbody = row.parentNode;
-            if( tbody.getElementsByTagName("tr").length > 2 )
+            if (row.parentNode.getElementsByTagName("tr").length > 2)
                 row.parentNode.removeChild(row);'>X</button>
-
-       </td>
+    </td>
 </tr>
 <!-- ****************** end: adv_global_row.xml ***************************** -->