From 5a5777a164d706b842bb547d7dbef01fde001f03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EC=84=9D=20=EC=B5=9C?= Date: Thu, 3 Mar 2022 13:11:58 +0900 Subject: [PATCH] =?UTF-8?q?=ED=9A=8C=EC=9B=90=20=EC=A0=95=EB=B3=B4=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=20=ED=8E=98=EC=9D=B4=EC=A7=80=20=EB=AA=A8?= =?UTF-8?q?=EB=8B=AC=EB=A1=9C=20=EB=B3=80=EA=B2=BD.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/mca/cmmn/web/AdminController.java | 2 +- .../webapp/WEB-INF/jsp/admin/userInfo.jsp | 151 ++++++++--------- .../webapp/WEB-INF/jsp/admin/userInfoView.jsp | 156 ++++++++---------- src/main/webapp/css/style.css | 4 + src/main/webapp/js/admin/userinfo.js | 102 ++++++++++-- src/main/webapp/js/admin/userinfoView.js | 54 ------ 6 files changed, 236 insertions(+), 233 deletions(-) delete mode 100644 src/main/webapp/js/admin/userinfoView.js diff --git a/src/main/java/com/mca/cmmn/web/AdminController.java b/src/main/java/com/mca/cmmn/web/AdminController.java index da72236..8644880 100644 --- a/src/main/java/com/mca/cmmn/web/AdminController.java +++ b/src/main/java/com/mca/cmmn/web/AdminController.java @@ -323,7 +323,7 @@ public class AdminController { UserVO userVO = userService.selectUserInfo(userid); model.addAttribute("userVO", userVO); - return "admin/userInfoView"; + return "admin/html/userInfoView"; } catch (Exception e) { // TODO: handle exception e.printStackTrace(); diff --git a/src/main/webapp/WEB-INF/jsp/admin/userInfo.jsp b/src/main/webapp/WEB-INF/jsp/admin/userInfo.jsp index 1a2709e..1413bb7 100644 --- a/src/main/webapp/WEB-INF/jsp/admin/userInfo.jsp +++ b/src/main/webapp/WEB-INF/jsp/admin/userInfo.jsp @@ -5,14 +5,7 @@ <%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> <%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> - - - - +
@@ -21,7 +14,7 @@

회원관리

-
+
-
- -
+
+ +
-
- -
-
- -
-
-
+
+ +
+
+ +
+
+
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
아이디이름소속전화번호이메일가입일상태권한
- - 관리자 - 사용자 - - - - - -
요청한 목록이 없습니다.
-
+
+ + + + + + + + + + + + + + + + + <%----%> + + + + + + + + + + + + + + +
아이디이름소속전화번호이메일가입일${userSearchVO.auth eq '99'?'상태':'권한'}
+ + 관리자 + 사용자 + + + + + +
요청한 목록이 없습니다.
+
+ + \ No newline at end of file diff --git a/src/main/webapp/WEB-INF/jsp/admin/userInfoView.jsp b/src/main/webapp/WEB-INF/jsp/admin/userInfoView.jsp index 6f39b09..1cb616d 100644 --- a/src/main/webapp/WEB-INF/jsp/admin/userInfoView.jsp +++ b/src/main/webapp/WEB-INF/jsp/admin/userInfoView.jsp @@ -4,91 +4,77 @@ <%@ taglib prefix="ui" uri="http://egovframework.gov/ctl/ui"%> <%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%> -
+ +
+ + - -
- - - -
-

 회원 정보 수정

-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
아이디${userVO.userid}
비밀번호 -

- -
비밀번호 확인 -
이름
소속기관
연락처
이메일 -
- -
-
권한 - - -
-
-

- -

-

- - - - - - - - - -

-
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
아이디${userVO.userid}
+

+ +
+
+
+ +
+
권한 + checked/> + + checked/> + +
+
+

+ + + + + + + + + +

+
+
+
+
diff --git a/src/main/webapp/css/style.css b/src/main/webapp/css/style.css index b39d17c..61dbd8b 100644 --- a/src/main/webapp/css/style.css +++ b/src/main/webapp/css/style.css @@ -718,4 +718,8 @@ a { background-color: #337ab7; color:#fff; +} + +.clickAbleObj:hover{ + cursor:pointer; } \ No newline at end of file diff --git a/src/main/webapp/js/admin/userinfo.js b/src/main/webapp/js/admin/userinfo.js index 24df25a..e9f7a48 100644 --- a/src/main/webapp/js/admin/userinfo.js +++ b/src/main/webapp/js/admin/userinfo.js @@ -1,26 +1,92 @@ +let userInfoModal; +$(function(){ + userInfoModal = new bootstrap.Modal(document.getElementById('userInfoModal')); +}) - function fn_link_page(pageNo) { - document.searchForm.pageIndex.value = pageNo; - document.searchForm.action = ""; - document.searchForm.submit(); +$(document).on('click', '.userInfoModalBtn', function (){ + const userid = $(this.parentNode).find(".useridTd")[0].innerText; + $.ajax({ + url: '/admin/userInfo/'+userid, + type: 'GET', + dataType:"html", + success: function(html){ + $("#userInfoModalBody").append(html); + userInfoModal.show(); + }, + error:function(){ + + } + }); +}) + +function fn_link_page(pageNo) { + document.searchForm.pageIndex.value = pageNo; + document.searchForm.action = ""; + document.searchForm.submit(); +} + +function confirmBtn(userid, auth){ + $("#userid").val(userid); + $("#auth").val(auth); + + var msg; + if(auth === "2"){ + msg = "승인"; + }else{ + msg = "삭제"; + } + + if(confirm(msg+" 처리 하시겠습니까?")){ + $("#updateFrm").submit(); + }else{ + return false; + } } - function confirmBtn(userid, auth){ - $("#userid").val(userid); - $("#auth").val(auth); - - var msg; - if(auth == 2){ - msg = "승인"; +$(function(){ + $("#changePw").click(function(){ + if($(this).is(":checked")){ + $("#password").attr("disabled", false); + $("#passwordCheck").attr("disabled", false); }else{ - msg = "삭제"; + $("#password").attr("disabled", true); + $("#passwordCheck").attr("disabled", true); } + }); +}); - if(confirm(msg+" 처리 하시겠습니까?")){ - $("#updateFrm").submit(); - }else{ - return false; - } - } +function update() { + const changePw = $("#changePw").is(":checked"); + const pw1 = $('#password'); + const pw2 = $('#passwordCheck'); + const name = $('#name'); + const company = $('#company'); + const tell = $('#phonenum'); + const email_1 = $('#email'); + if (changePw && pw1.val() === "") { + alert('비밀번호를 입력해주세요'); + pw1.focus(); + } else if (changePw && pw2.val() === "") { + alert('비밀번호를 입력해주세요'); + pw2.focus(); + } else if (changePw && (pw1.val() !== pw2.val())) { + alert('비밀번호가 일치하지 않습니다.'); + pw1.focus(); + } else if (name.val() === "") { + alert('이름을 입력해주세요'); + name.focus(); + } else if (company.val() === "") { + alert('소속기관을 입력해주세요'); + company.focus(); + } else if (tell.val() === "") { + alert('연락처를 입력해주세요'); + tell.focus(); + } else if (email_1.val() === "") { + alert('이메일을 입력해주세요'); + email_1.focus(); + } else { + $("#updateForm").submit(); + } +} diff --git a/src/main/webapp/js/admin/userinfoView.js b/src/main/webapp/js/admin/userinfoView.js deleted file mode 100644 index 1d17a85..0000000 --- a/src/main/webapp/js/admin/userinfoView.js +++ /dev/null @@ -1,54 +0,0 @@ - - $(function(){ - $("#changePw").click(function(){ - if($(this).is(":checked")){ - $("#password").attr("disabled", false); - $("#passwordCheck").attr("disabled", false); - }else{ - $("#password").attr("disabled", true); - $("#passwordCheck").attr("disabled", true); - } - }); -}); - - function update() { - var changePw = $("#changePw").is(":checked"); - var pw1 = $('#password').val(); - var pw2 = $('#passwordCheck').val(); - var name = $('#name').val(); - var company = $('#company').val(); - var tell = $('#phonenum').val(); - var email_1 = $('#email').val(); - - if (changePw && pw1 == "") { - alert('비밀번호를 입력해주세요'); - $('#password').focus(); - return; -} else if (changePw && pw2 == "") { - alert('비밀번호를 입력해주세요'); - $('#passwordCheck').focus(); - return; -} else if (changePw && (pw1 != pw2)) { - alert('비밀번호가 일치하지 않습니다.'); - $('#pass').focus(); - return; -} else if (name == "") { - alert('이름을 입력해주세요'); - $('#name').focus(); - return; -} else if (company == "") { - alert('소속기관을 입력해주세요'); - $('#company').focus(); - return; -} else if (tell == "") { - alert('연락처를 입력해주세요'); - $('#phone_num').focus(); - return; -} else if (email_1 == "") { - alert('이메일을 입력해주세요'); - $('#email').focus(); - return; -} else { - $("#updateForm").submit(); -} -}