changeset 501:0ac39f006eb2

For #240, tweaked the Javascript to be able to submit the form when enter is typed.
author Brian Neal <bgneal@gmail.com>
date Sat, 03 Dec 2011 03:14:13 +0000
parents 886cc99e8406
children 9d096ceab0c0
files gpp/accounts/static/js/ajax_login.js
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/gpp/accounts/static/js/ajax_login.js	Sat Dec 03 02:48:18 2011 +0000
+++ b/gpp/accounts/static/js/ajax_login.js	Sat Dec 03 03:14:13 2011 +0000
@@ -44,6 +44,13 @@
          "Cancel": function() {
             loginDialog.dialog("close");
          }
+      },
+      focus: function() {
+         $(':input', this).keyup(function(event) {
+            if (event.keyCode == 13) {
+                $('.ui-dialog-buttonpane button:first').click();
+            }
+         });
       }
    });
    $('#login-link').click(function() {