From 6dc60475561759f90c9ef25d9c2b661fef8bae24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B0=95=EC=84=9D=20=EC=B5=9C?= Date: Tue, 20 Sep 2022 15:05:16 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B3=B5=EC=A7=80=EC=82=AC=ED=95=AD=20?= =?UTF-8?q?=EC=88=98=EC=A0=95=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/resources/static/js/publicBoard/notice.js | 7 ++++++- src/main/resources/static/js/publicBoard/publicBoard.js | 5 +++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/resources/static/js/publicBoard/notice.js b/src/main/resources/static/js/publicBoard/notice.js index e8e84803..b1e16b51 100644 --- a/src/main/resources/static/js/publicBoard/notice.js +++ b/src/main/resources/static/js/publicBoard/notice.js @@ -11,5 +11,10 @@ $(document).on('click', '.planTr', function (){ }) $(document).on('click', '#saveBtn', function (){ - savePublicBoard("noticeEditForm") + savePublicBoard("noticeEditForm", "PLB001") +}) + +$(document).on('click', '#editBtn', function (){ + $("#viewModal").modal('hide') + getEditModal($("#viewModalPublicKey").val(), "PLB001") }) \ No newline at end of file diff --git a/src/main/resources/static/js/publicBoard/publicBoard.js b/src/main/resources/static/js/publicBoard/publicBoard.js index c776862c..82d585a8 100644 --- a/src/main/resources/static/js/publicBoard/publicBoard.js +++ b/src/main/resources/static/js/publicBoard/publicBoard.js @@ -64,6 +64,7 @@ $(document).on('click', '.deleteCommentBtn', function (){ } }) }) + function getEditModal(publicKey, publicType){ $.ajax({ url: '/publicBoard/editModal', @@ -121,7 +122,7 @@ function getViewModal(publicKey, publicType){ }); } -function savePublicBoard(formId){ +function savePublicBoard(formId, publicType){ if(contentCheck(formId)){ if(confirm("저장하시겠습니까?")){ contentFade("in"); @@ -143,7 +144,7 @@ function savePublicBoard(formId){ alert("저장되었습니다."); contentFade("out"); $("#editModal").modal('hide'); - getViewModal(result, 'PLB001'); + getViewModal(result, publicType); }, error : function(xhr, status) { alert("저장에 실패하였습니다.")