From 57a6e547fa6dada85d16881b56d6bfc494716487 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EC=84=9D=20=EC=B5=9C?= Date: Tue, 2 May 2023 10:00:56 +0900 Subject: [PATCH] =?UTF-8?q?=EB=8C=80=EC=8B=9C=EB=B3=B4=EB=93=9C=20?= =?UTF-8?q?=EA=B3=B5=EC=9A=A9=EA=B2=8C=EC=8B=9C=ED=8C=90=20=EC=88=98?= =?UTF-8?q?=EC=A0=95,=20=EC=82=AD=EC=A0=9C=20=EB=B2=84=ED=8A=BC=20?= =?UTF-8?q?=EC=A0=9C=EA=B1=B0.=20=EB=8C=80=EC=8B=9C=EB=B3=B4=EB=93=9C=20?= =?UTF-8?q?=EB=A7=81=ED=81=AC=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/publicBoard/PublicBoardController.java | 1 + .../resources/static/js/publicBoard/notice.js | 2 +- .../static/js/publicBoard/publicBoard.js | 4 ++-- .../resources/static/js/publicBoard/reference.js | 2 +- .../resources/templates/login/dashboard.html | 16 ++++++++++------ .../publicBoard/notice/noticeViewModal.html | 2 +- .../reference/referenceViewModal.html | 2 +- 7 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/dbnt/faisp/main/publicBoard/PublicBoardController.java b/src/main/java/com/dbnt/faisp/main/publicBoard/PublicBoardController.java index fe0d0f1e..06260958 100644 --- a/src/main/java/com/dbnt/faisp/main/publicBoard/PublicBoardController.java +++ b/src/main/java/com/dbnt/faisp/main/publicBoard/PublicBoardController.java @@ -139,6 +139,7 @@ public class PublicBoardController { mav = new ModelAndView("publicBoard/qna/qnaViewModal"); break; } + mav.addObject("modalType", publicBoard.getModalType()); publicBoard = publicBoardService.selectPublicBoard(publicBoard.getPublicKey()); mav.addObject("userSeq", loginUser.getUserSeq()); mav.addObject("userRole", loginUser.getUserRole()); diff --git a/src/main/resources/static/js/publicBoard/notice.js b/src/main/resources/static/js/publicBoard/notice.js index d55463f2..6deb1071 100644 --- a/src/main/resources/static/js/publicBoard/notice.js +++ b/src/main/resources/static/js/publicBoard/notice.js @@ -14,7 +14,7 @@ $(document).on('click', '#addNoticeBtn', function (){ $(document).on('click', '.noticeTr', function (){ $(".trChkBox").prop("checked", false); $(this).find(".trChkBox").prop("checked", true); - getViewModal(Number($(this).find(".publicKey").val()), "PLB001"); + getViewModal(Number($(this).find(".publicKey").val()), "PLB001", $(this).attr("data-modaltype")); }) $(document).on('click', '#saveBtn', function (){ diff --git a/src/main/resources/static/js/publicBoard/publicBoard.js b/src/main/resources/static/js/publicBoard/publicBoard.js index 87ef4ef1..d6addc90 100644 --- a/src/main/resources/static/js/publicBoard/publicBoard.js +++ b/src/main/resources/static/js/publicBoard/publicBoard.js @@ -120,10 +120,10 @@ function getEditModal(publicKey, publicType){ }); } -function getViewModal(publicKey, publicType){ +function getViewModal(publicKey, publicType, modalType){ $.ajax({ url: '/publicBoard/viewModal', - data: {publicKey: publicKey, publicType: publicType}, + data: {publicKey: publicKey, publicType: publicType, modalType: modalType}, type: 'GET', dataType:"html", success: function(html){ diff --git a/src/main/resources/static/js/publicBoard/reference.js b/src/main/resources/static/js/publicBoard/reference.js index 41ac0fa2..22ef301b 100644 --- a/src/main/resources/static/js/publicBoard/reference.js +++ b/src/main/resources/static/js/publicBoard/reference.js @@ -14,7 +14,7 @@ $(document).on('click', '#saveBtn', function (){ $(document).on('click', '.referenceTr', function (){ $(".trChkBox").prop("checked", false); $(this).find(".trChkBox").prop("checked", true); - getViewModal(Number($(this).find(".publicKey").val()), "PLB003"); + getViewModal(Number($(this).find(".publicKey").val()), "PLB003", $(this).attr('data-modaltype')); }) $(document).on('click', '#editBtn', function (){ diff --git a/src/main/resources/templates/login/dashboard.html b/src/main/resources/templates/login/dashboard.html index 41f4d884..f19a120c 100644 --- a/src/main/resources/templates/login/dashboard.html +++ b/src/main/resources/templates/login/dashboard.html @@ -186,7 +186,8 @@ - + + @@ -196,6 +197,7 @@ + @@ -230,7 +232,8 @@ - + + @@ -240,6 +243,7 @@ + @@ -253,10 +257,10 @@
diff --git a/src/main/resources/templates/publicBoard/notice/noticeViewModal.html b/src/main/resources/templates/publicBoard/notice/noticeViewModal.html index ef7ac087..fd874e52 100644 --- a/src/main/resources/templates/publicBoard/notice/noticeViewModal.html +++ b/src/main/resources/templates/publicBoard/notice/noticeViewModal.html @@ -161,7 +161,7 @@ - -