LP740320: Make <enter> submit the new bookbag dialog
authorDan Scott <dscott@laurentian.ca>
Fri, 30 Sep 2011 03:27:19 +0000 (23:27 -0400)
committerDan Scott <dscott@laurentian.ca>
Fri, 30 Sep 2011 03:27:19 +0000 (23:27 -0400)
For the keyboard jockeys out there - if the enter key doesn't submit,
the UI reviewer will not commit.

Signed-off-by: Dan Scott <dscott@laurentian.ca>
Open-ILS/web/opac/skin/default/js/rdetail.js

index ca72ec7..3fbc501 100644 (file)
@@ -706,7 +706,12 @@ function finishBookbag(exitstatus) {
  * Creates a new Bookbag for the user.
  */
 function rdetailNewBookbag() {
-       newBBDialog.show(); // Show the bookbag dialog.
+    newBBDialog.show(); // Show the bookbag dialog.
+    dojo.connect(dijit.byId('newBBDialog'), 'onKeyPress', function(evt) {
+        if (evt.keyCode == dojo.keys.ENTER) {
+            finishBookbag(0);
+        }
+    });
 }
 
 function rdetailAddToBookbag() {