# HG changeset patch # User Brian Neal # Date 1322882053 0 # Node ID 0ac39f006eb271a2cf73499c25c4d915c073ade1 # Parent 886cc99e84060ec0b6c98e06b4c3d3f1caf0feb0 For #240, tweaked the Javascript to be able to submit the form when enter is typed. diff -r 886cc99e8406 -r 0ac39f006eb2 gpp/accounts/static/js/ajax_login.js --- 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() {