Upgrade jQuery to 3.x on fallback login/registration screens (#7236)

This commit is contained in:
Andrew Morgan 2020-04-09 12:23:30 +01:00 committed by GitHub
parent 24722de7c8
commit 55d46da59a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 15 additions and 16 deletions

1
changelog.d/7236.misc Normal file
View file

@ -0,0 +1 @@
Upgrade jQuery to v3.4.1 on fallback login/registration pages.

View file

@ -1,9 +1,10 @@
<!doctype html>
<html> <html>
<head> <head>
<title> Login </title> <title> Login </title>
<meta name='viewport' content='width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0'> <meta name='viewport' content='width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0'>
<link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="style.css">
<script src="js/jquery-2.1.3.min.js"></script> <script src="js/jquery-3.4.1.min.js"></script>
<script src="js/login.js"></script> <script src="js/login.js"></script>
</head> </head>
<body onload="matrixLogin.onLoad()"> <body onload="matrixLogin.onLoad()">

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -17,7 +17,7 @@ var submitPassword = function(user, pwd) {
}; };
$.post(matrixLogin.endpoint, JSON.stringify(data), function(response) { $.post(matrixLogin.endpoint, JSON.stringify(data), function(response) {
matrixLogin.onLogin(response); matrixLogin.onLogin(response);
}).error(errorFunc); }).fail(errorFunc);
}; };
var submitToken = function(loginToken) { var submitToken = function(loginToken) {
@ -29,7 +29,7 @@ var submitToken = function(loginToken) {
}; };
$.post(matrixLogin.endpoint, JSON.stringify(data), function(response) { $.post(matrixLogin.endpoint, JSON.stringify(data), function(response) {
matrixLogin.onLogin(response); matrixLogin.onLogin(response);
}).error(errorFunc); }).fail(errorFunc);
}; };
var errorFunc = function(err) { var errorFunc = function(err) {
@ -105,7 +105,7 @@ var fetch_info = function(cb) {
} }
cb(); cb();
}).error(errorFunc); }).fail(errorFunc);
} }
matrixLogin.onLoad = function() { matrixLogin.onLoad = function() {

View file

@ -1,9 +1,10 @@
<!doctype html>
<html> <html>
<head> <head>
<title> Registration </title> <title> Registration </title>
<meta name='viewport' content='width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0'> <meta name='viewport' content='width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0'>
<link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="style.css">
<script src="js/jquery-2.1.3.min.js"></script> <script src="js/jquery-3.4.1.min.js"></script>
<script src="https://www.recaptcha.net/recaptcha/api/js/recaptcha_ajax.js"></script> <script src="https://www.recaptcha.net/recaptcha/api/js/recaptcha_ajax.js"></script>
<script src="register_config.js"></script> <script src="register_config.js"></script>
<script src="js/register.js"></script> <script src="js/register.js"></script>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -33,7 +33,7 @@ var setupCaptcha = function() {
callback: Recaptcha.focus_response_field callback: Recaptcha.focus_response_field
}); });
window.matrixRegistration.isUsingRecaptcha = true; window.matrixRegistration.isUsingRecaptcha = true;
}).error(errorFunc); }).fail(errorFunc);
}; };
@ -49,7 +49,7 @@ var submitCaptcha = function(user, pwd) {
$.post(matrixRegistration.endpoint, JSON.stringify(data), function(response) { $.post(matrixRegistration.endpoint, JSON.stringify(data), function(response) {
console.log("Success -> "+JSON.stringify(response)); console.log("Success -> "+JSON.stringify(response));
submitPassword(user, pwd, response.session); submitPassword(user, pwd, response.session);
}).error(function(err) { }).fail(function(err) {
Recaptcha.reload(); Recaptcha.reload();
errorFunc(err); errorFunc(err);
}); });
@ -67,7 +67,7 @@ var submitPassword = function(user, pwd, session) {
matrixRegistration.onRegistered( matrixRegistration.onRegistered(
response.home_server, response.user_id, response.access_token response.home_server, response.user_id, response.access_token
); );
}).error(errorFunc); }).fail(errorFunc);
}; };
var errorFunc = function(err) { var errorFunc = function(err) {