Made it so that the login dialog works properly with Chrome. Don't know if I broke it in something else, but Firefox and Chrome work.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5762 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
20818652a1
commit
361180de02
@ -83,22 +83,19 @@ function openDialog(){
|
||||
});
|
||||
|
||||
$("#username").keydown(function(event) { //When 'enter' is hit while in username, advance to password
|
||||
if (event.keyCode==13) {
|
||||
if ((event.which && event.which == 13) || (event.keyCode && event.keyCode == 13)) {
|
||||
event.preventDefault();
|
||||
$("#password").focus();
|
||||
}
|
||||
});
|
||||
|
||||
$("#password").keydown(function(event) { //Submit authentication if enter is pressed in password field
|
||||
if (event.keyCode==13) {
|
||||
//TODO: it doesn't work on Chrome and Safari
|
||||
$(".ui-dialog-buttonpane button").each(function() {
|
||||
if($(this).html() == "Log In") {
|
||||
$(this).click();
|
||||
}
|
||||
});
|
||||
//authenticate();
|
||||
if ((event.which && event.which == 13) || (event.keyCode && event.keyCode == 13)) {
|
||||
event.preventDefault();
|
||||
authenticate();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$("#logout").click(function(event){
|
||||
logout();
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user