From 48248a4386fc550a527866aacb76aa985a2e53dd Mon Sep 17 00:00:00 2001 From: "DESKTOP-T0O5CDB\\DESK-555BD" Date: Wed, 19 Feb 2025 16:08:15 -0700 Subject: [PATCH] use generic enter key callback to handle key presses. --- Views/Login/ForgotPassword.cshtml | 2 +- Views/Login/Index.cshtml | 2 +- Views/Login/OpenIDRegistration.cshtml | 2 +- Views/Login/Registration.cshtml | 2 +- Views/Login/ResetPassword.cshtml | 2 +- wwwroot/js/login.js | 6 ------ wwwroot/js/shared.js | 6 ++++++ 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Views/Login/ForgotPassword.cshtml b/Views/Login/ForgotPassword.cshtml index aa73ae4..611af7d 100644 --- a/Views/Login/ForgotPassword.cshtml +++ b/Views/Login/ForgotPassword.cshtml @@ -16,7 +16,7 @@
- +
diff --git a/Views/Login/Index.cshtml b/Views/Login/Index.cshtml index 0ae0483..c9ba39d 100644 --- a/Views/Login/Index.cshtml +++ b/Views/Login/Index.cshtml @@ -24,7 +24,7 @@
- +
diff --git a/Views/Login/OpenIDRegistration.cshtml b/Views/Login/OpenIDRegistration.cshtml index 17dd7b6..710fad7 100644 --- a/Views/Login/OpenIDRegistration.cshtml +++ b/Views/Login/OpenIDRegistration.cshtml @@ -34,7 +34,7 @@
- +
diff --git a/Views/Login/Registration.cshtml b/Views/Login/Registration.cshtml index 14a0055..4d3d7f3 100644 --- a/Views/Login/Registration.cshtml +++ b/Views/Login/Registration.cshtml @@ -39,7 +39,7 @@
- +
diff --git a/Views/Login/ResetPassword.cshtml b/Views/Login/ResetPassword.cshtml index a07b7b4..4480df3 100644 --- a/Views/Login/ResetPassword.cshtml +++ b/Views/Login/ResetPassword.cshtml @@ -25,7 +25,7 @@
- +
diff --git a/wwwroot/js/login.js b/wwwroot/js/login.js index d7c8dd6..aa0c534 100644 --- a/wwwroot/js/login.js +++ b/wwwroot/js/login.js @@ -55,12 +55,6 @@ function performPasswordReset() { }); } -function handlePasswordKeyPress(event) { - if (event.keyCode == 13) { - performLogin(); - } -} - function remoteLogin() { $.get('/Login/GetRemoteLoginLink', function (data) { if (data) { diff --git a/wwwroot/js/shared.js b/wwwroot/js/shared.js index b6cb569..767159f 100644 --- a/wwwroot/js/shared.js +++ b/wwwroot/js/shared.js @@ -1535,4 +1535,10 @@ function handleTableColumnDragEnd(tabName) { if (isDragging) { isDragging = false; } +} + +function callBackOnEnter(event, callBack) { + if (event.keyCode == 13) { + callBack(); + } } \ No newline at end of file