From 7cfa70e4afd43c8d5936987184a1fcffef16911a Mon Sep 17 00:00:00 2001 From: mjkhan21 Date: Mon, 12 Jun 2023 15:59:03 +0900 Subject: [PATCH] =?UTF-8?q?=EC=82=AC=EC=9A=A9=EC=9E=90=20=EA=B3=84?= =?UTF-8?q?=EC=A0=95=20=EC=BF=A0=ED=82=A4=20=EC=A0=80=EC=9E=A5=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/webapp/WEB-INF/jsp/login.jsp | 6 ++++-- src/main/webapp/resources/js/base/base.js | 12 ++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/main/webapp/WEB-INF/jsp/login.jsp b/src/main/webapp/WEB-INF/jsp/login.jsp index 9053d67..d115064 100644 --- a/src/main/webapp/WEB-INF/jsp/login.jsp +++ b/src/main/webapp/WEB-INF/jsp/login.jsp @@ -92,7 +92,7 @@
- +
@@ -129,7 +129,7 @@ function login() { password:$("#password").val(), institute:"default" }; - json.post({ + ajax.post({ url:wctx.url("/login.do"), data:params, success:function(resp) { @@ -150,6 +150,8 @@ function login() { $(function(){ $("#formAuthentication input").onEnterPress(login); + if ($("#userId").val()) + $("#password").focus(); }); diff --git a/src/main/webapp/resources/js/base/base.js b/src/main/webapp/resources/js/base/base.js index 4604ed5..e687158 100644 --- a/src/main/webapp/resources/js/base/base.js +++ b/src/main/webapp/resources/js/base/base.js @@ -302,13 +302,17 @@ $.fn.onEnterPress = function(handler) { } function labelFor(input) { - var selector = "label[for='{id}']", - key = "string" == typeof(input) ? input - : $(input).attr("id") || $(input).attr("name"); + let selector = "label[for='{id}']", + str = "string" == typeof(input), + obj = $(input), + key = str ? input + : obj.attr("id") || obj.attr("name"); if (!key) return ""; selector = selector.replace(/{id}/gi, key); - return $(selector).text(); + return $(selector).text() + || obj.attr("title") + || obj.attr("placeholder"); } function validationFailureHandler() {