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 @@ - -