From: Olivier Lamy Date: Tue, 12 Jun 2012 09:05:14 +0000 (+0000) Subject: handle enter key press on login form X-Git-Tag: archiva-1.4-M3~627 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1aa2466243f194ab48d8286a6fa60f32b3dab19b;p=archiva.git handle enter key press on login form git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1349202 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js index c3137a1f9..03e0fcb3a 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js @@ -327,13 +327,18 @@ define("redback.user",["jquery","order!utils","i18n","jquery.validate","order!kn if (window.modalLoginWindow==null) { window.modalLoginWindow = $("#modal-login").modal(); window.modalLoginWindow.on('hidden', function () { - $("#modal-login-err-message").html(""); + $("#modal-login-err-message").hide(); removeValidationErrorMessages("#user-login-form"); }); // focus on user name window.modalLoginWindow.on('shown', function (e) { $("#user-login-form-username" ).focus(); - }) + }); + window.modalLoginWindow.keypress( function (event) { + if (event.which==13){ + $("#modal-login-ok" ).trigger("click"); + } + }); } var userLoginForm = $("#user-login-form");