From 758c1ad60bc50db5cc8a807e9e37e07166cf4dad Mon Sep 17 00:00:00 2001 From: nayoonju Date: Mon, 17 Jun 2024 03:18:06 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20js=20=ED=8F=B4=EB=8D=94=20=EC=A0=95?= =?UTF-8?q?=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- assets/js/{ => auth}/form-validation.js | 0 assets/js/{ => auth}/login.js | 0 assets/js/{ => auth}/signup.js | 0 assets/js/{ => auth}/signup2.js | 27 +------------------------ assets/js/password-toggle.js | 0 5 files changed, 1 insertion(+), 26 deletions(-) rename assets/js/{ => auth}/form-validation.js (100%) rename assets/js/{ => auth}/login.js (100%) rename assets/js/{ => auth}/signup.js (100%) rename assets/js/{ => auth}/signup2.js (80%) delete mode 100644 assets/js/password-toggle.js diff --git a/assets/js/form-validation.js b/assets/js/auth/form-validation.js similarity index 100% rename from assets/js/form-validation.js rename to assets/js/auth/form-validation.js diff --git a/assets/js/login.js b/assets/js/auth/login.js similarity index 100% rename from assets/js/login.js rename to assets/js/auth/login.js diff --git a/assets/js/signup.js b/assets/js/auth/signup.js similarity index 100% rename from assets/js/signup.js rename to assets/js/auth/signup.js diff --git a/assets/js/signup2.js b/assets/js/auth/signup2.js similarity index 80% rename from assets/js/signup2.js rename to assets/js/auth/signup2.js index 7d0274b19..be14cf41e 100644 --- a/assets/js/signup2.js +++ b/assets/js/auth/signup2.js @@ -2,8 +2,6 @@ const form = document.querySelector("form"); const inputList = form.querySelectorAll("input"); const submitBtn = form.querySelector("#submitBtn"); -submitBtn.disabled = true; - inputList.forEach((input) => { input.addEventListener("keyup", function () { checkInputs(input); @@ -98,31 +96,8 @@ form.addEventListener("submit", (e) => { } }); - - // 패스워드 토글기능 -let passwordToggleBtns = document.querySelectorAll('.password-toggle-button'); - -function passwordToggle(e) { - let button = e.currentTarget; - let passwordInput = button.parentElement.querySelector('input'); - let toggleIcon = document.createElement('i'); - toggleIcon.classList.add('icon'); - if (passwordInput.type == "password") { - passwordInput.type = "text"; - toggleIcon.classList.remove('ic_visible_on'); - toggleIcon.classList.add('ic_visible_off') - this.setAttribute("aria-label", "비밀번호 숨기기"); - } else { - passwordInput.type = "password"; - toggleIcon.classList.remove('ic_visible_off'); - toggleIcon.classList.add('ic_visible_on'); - this.setAttribute("aria-label", "비밀번호 보기"); - } - button.innerHTML = ''; - button.appendChild(toggleIcon); -} - +const passwordToggleBtns = document.querySelectorAll('.password-toggle-button'); passwordToggleBtns.forEach(btn => { btn.addEventListener('click', passwordToggle); }); \ No newline at end of file diff --git a/assets/js/password-toggle.js b/assets/js/password-toggle.js deleted file mode 100644 index e69de29bb..000000000