From 86984d78e3962257b4975b0bdb6c1389da0efce9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EC=84=B1=EC=A7=84?= Date: Tue, 20 Sep 2022 03:07:41 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Add=20lecture=20plan=20lookup=20?= =?UTF-8?q?button=20on=20lecture-home=20(#94)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routes/lecture-home.js | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/routes/lecture-home.js b/src/routes/lecture-home.js index 1cdd245..d76d13e 100644 --- a/src/routes/lecture-home.js +++ b/src/routes/lecture-home.js @@ -19,7 +19,7 @@ const addBoard = async() => { "searchCondition": "ALL", "searchKeyword": "", "currentPage": 0, - }) + }); const data = response.data; const totalPages = data.page.totalPages; const latestWrite = data.list.length > 0 ? new Date(data.list[0].registDt) : new Date(0, 0, 0); @@ -49,10 +49,25 @@ const addBoard = async() => {
  • 강의 묻고답하기${ isNew ? ` ` : "" } ${boardCount}
  • - `) + `); } }; +// 강의계획서 조회 버튼 추가 +const addLecturePlan = async() => { + const redirectLectureHandler = async() => { + const selectedSubj = $("input[name='selectedSubj']").val(); + window.open('https://klas.kw.ac.kr/std/cps/atnlc/popup/LectrePlanStdView.do?selectSubj=' + selectedSubj, '', 'width=1000, height=800, scrollbars=yes, title=강의계획서 조회'); + }; + const lectureElem = $(`강의계획서 조회`); + // set style + lectureElem.css({ + "margin-left": "15px", + }); + lectureElem.click(redirectLectureHandler); + $(".subtitle").append(lectureElem); +}; + export default () => { // 인증 팝업 무시 @@ -126,6 +141,6 @@ export default () => { }); + addLecturePlan(); setTimeout(addBoard, 500); - }; \ No newline at end of file