mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-13 01:15:47 +01:00
auto-focusing input on login screen
This commit is contained in:
@@ -12,16 +12,15 @@
|
|||||||
if (target) {
|
if (target) {
|
||||||
document.location.href = target.getAttribute('data-url');
|
document.location.href = target.getAttribute('data-url');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$('#login').on('click', function() {
|
$('#login').on('click', function() {
|
||||||
|
|
||||||
var loginData = {
|
var loginData = {
|
||||||
'username': $('#username').val(),
|
'username': $('#username').val(),
|
||||||
'password': $('#password').val(),
|
'password': $('#password').val(),
|
||||||
'_csrf': $('#csrf-token').val()
|
'_csrf': $('#csrf-token').val()
|
||||||
};
|
};
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type: "POST",
|
type: "POST",
|
||||||
url: RELATIVE_PATH + '/login',
|
url: RELATIVE_PATH + '/login',
|
||||||
@@ -44,5 +43,6 @@
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
document.querySelector('#content input').focus();
|
||||||
}());
|
}());
|
||||||
|
|||||||
Reference in New Issue
Block a user