From 1259a13131464dace65660d922a83d78cc7b171f Mon Sep 17 00:00:00 2001 From: hylee Date: Wed, 17 Apr 2024 16:45:16 +0900 Subject: [PATCH] =?UTF-8?q?=EC=8B=A4=EB=AC=B4=EC=97=AD=EB=9F=89=EA=B0=95?= =?UTF-8?q?=ED=99=94=20>=20=EC=A0=84=EC=B2=B4=EA=B3=BC=EC=A0=95=20>=20?= =?UTF-8?q?=EB=AA=A8=EB=B0=94=EC=9D=BC=20=EB=A6=AC=EC=8A=A4=ED=8A=B8=20?= =?UTF-8?q?=ED=99=94=EB=A9=B4=20=EC=A0=81=EC=9A=A9=EC=99=84=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ve/aplct/fndtnEnhanceTrn/eduAplctList.jsp | 180 +++++++++++++++++- 1 file changed, 175 insertions(+), 5 deletions(-) diff --git a/src/main/webapp/WEB-INF/jsp/web/ve/aplct/fndtnEnhanceTrn/eduAplctList.jsp b/src/main/webapp/WEB-INF/jsp/web/ve/aplct/fndtnEnhanceTrn/eduAplctList.jsp index 27780760..58b0edd0 100644 --- a/src/main/webapp/WEB-INF/jsp/web/ve/aplct/fndtnEnhanceTrn/eduAplctList.jsp +++ b/src/main/webapp/WEB-INF/jsp/web/ve/aplct/fndtnEnhanceTrn/eduAplctList.jsp @@ -121,10 +121,97 @@ $(document).ready(function(){ } // 텍스트가 "접수중"인지 확인 -// if ($thisCell.text().trim() !== "접수중") { -// $applyButton.prop('disabled', true); // 버튼 비활성화 -// } - //alert($applyStts.text().trim()); + if ($thisCell.text().trim() === "접수중") { + + //신청상태 + if ($applyStts.text().trim() === "요청") { + //취소 + $applyButton.prop('disabled', false); // 버튼 비활성화 + $applyButton.text('취소'); + $applyButton.attr('title','취소 창 열림'); + $applyButton.attr('onclick', "fn_cancel('" + $($thisCell).closest('tr').data('value') + "');"); + + }else{ + $applyButton.prop('disabled', false); // 버튼 비활성화 + } + + } + if ($thisCell.text().trim() === "접수전") { + $applyButton.prop('disabled', false); // 버튼 비활성화 + $applyButton.text('찜하기'); + $applyButton.attr('title','찜하기 창 열림'); + $applyButton.attr('onclick', "fn_ggim('" + $($thisCell).closest('tr').data('value') + "');"); + } + if ($thisCell.text().trim() === "찜하기") { + + var $currentRow = $thisCell.closest('tr'); + + var strtPnttm = new Date($currentRow.find("td:eq(2)").text().split("~")[0].trim()); + var endPnttm = new Date($currentRow.find("td:eq(2)").text().split("~")[1].trim()); + var currentDate = new Date(); + + // 시간, 분, 초 초기화 + strtPnttm.setHours(0, 0, 0, 0); + endPnttm.setHours(0, 0, 0, 0); + currentDate.setHours(0, 0, 0, 0); + + var ddlnCdText = ''; + + if (currentDate >= strtPnttm && currentDate <= endPnttm && $thisCell.text().trim() === "찜하기") { + $applyButton.prop('disabled', false); // 버튼 비활성화 + } + + + } + + /* 24.01.22 웹접근성 검사를 위하여 disabled 사용제외 */ + if($applyButton.prop('disabled')){ + $applyButton.removeAttr('onclick'); + $applyButton.prop('disabled', false); + $applyButton.css('background-color', '#888'); + /*24.01.23 웹접근성 검사를 위하여 title 추가*/ + $applyButton.attr('title','비활성화됨'); + $applyButton.removeAttr('data-tooltip'); + + } + }); + + // 리스트 상태값 확인 + $(".ddlnCdSttsM").each(function() { + var $thisCell = $(this); + var $applyButton = $thisCell.closest('ul').find(".aplctBtnM button"); + var $applyStts = $thisCell.closest('ul').find(".aplctSttsM"); + + + + // 텍스트가 비어있는지 확인 + if ($thisCell.text().trim() === "") { + var $currentRow = $thisCell.closest('ul'); + + var strtPnttm = new Date($currentRow.find("li:eq(2)").text().split("~")[0].trim()); + var endPnttm = new Date($currentRow.find("li:eq(2)").text().split("~")[1].trim()); + var currentDate = new Date(); + + // 시간, 분, 초 초기화 + strtPnttm.setHours(0, 0, 0, 0); + endPnttm.setHours(0, 0, 0, 0); + currentDate.setHours(0, 0, 0, 0); + + var ddlnCdText = ''; + + if (currentDate < strtPnttm) { + ddlnCdText = "접수전"; + } else if (currentDate >= strtPnttm && currentDate <= endPnttm) { + ddlnCdText = "접수중"; + } else if (currentDate > endPnttm) { + ddlnCdText = "접수종료"; + } + + $thisCell.text(ddlnCdText); + + } + + // 텍스트가 "접수중"인지 확인 if ($thisCell.text().trim() === "접수중") { //신청상태 @@ -499,7 +586,10 @@ $(document).ready(function(){ <%-- --%> - + @@ -516,6 +606,86 @@ $(document).ready(function(){ + + + + + +
+ +
    +
  • + 교육구분 + +
  • +
  • ');"> + 과정명 + + + +
  • +
  • + 신청기간 + ~ +
  • +
  • + 교육일자 + + ~ + +
  • +
  • + 신청자/정원 + + / + +
  • + +
  • + 상태 + + <%-- + + + + + + + --%> + +
  • +
  • + 상태 + + + + + + + + + + + +
  • +
  • + 교육신청 + +
  • +
    +
+
+
+ + + + +