mirror of https://github.com/apache/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
This commit is contained in:
parent
d9a2049ab4
commit
1aa2466243
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue