실무역량강화 ck에디터 적용

This commit is contained in:
hylee 2023-12-20 15:14:55 +09:00
parent 473791b65a
commit 32c230b11b
7 changed files with 665 additions and 695 deletions

View File

@ -309,7 +309,7 @@
<tr>
<th scope="row">상세교육내용</th>
<td>
<c:out value="${info.prcsCn }" />
<c:out value="${fn:replace(info.prcsCn , crlf , '<br/>')}" escapeXml="false" />
</td>
</tr>
<tr>

View File

@ -269,7 +269,7 @@
<tr>
<th scope="row">상세교육내용</th>
<td>
<textarea name="prcsCn" id="prcsCn" class="memo" disabled="disabled" class="inputLight" style="height: 200px;"><c:out value="${info.prcsCn }" /></textarea>
<c:out value="${fn:replace(info.prcsCn , crlf , '<br/>')}" escapeXml="false" />
</td>
</tr>
<tr>

View File

@ -116,7 +116,12 @@
<tr>
<th scope="row">과정설명</th>
<td>
<c:out value='${info.prcsCn}' />
<!-- <div id="bbs_cn"> -->
<c:out value="${fn:replace(info.prcsCn , crlf , '<br/>')}" escapeXml="false" />
<!-- </div> -->
<%-- <c:out value='${info.prcsCn}' /> --%>
</td>
</tr>
<tr>

View File

@ -235,8 +235,12 @@
<td onclick="fncGoDetail('<c:out value="${list.prcsOrd}"/>');" style="cursor:pointer;">
<c:out value='${list.prcsNm}'/>
</td>
<td onclick="fncGoDetail('<c:out value="${list.prcsOrd}"/>');" style="cursor:pointer;">
<c:out value='${list.prcsCn}'/>
<td onclick="fncGoDetail('<c:out value="${list.prcsOrd}"/>');" style="cursor:pointer;text-align: left;">
<!-- <div id="bbs_cn"> -->
<c:out value="${fn:replace(list.prcsCn , crlf , '<br/>')}" escapeXml="false" />
<!-- </div> -->
<%-- <c:out value='${list.prcsCn}'/> --%>
</td>
<td>
<c:out value='${list.frstRegistPnttm}'/>

View File

@ -8,6 +8,7 @@
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ taglib prefix="ve" uri="/WEB-INF/tlds/kcc_tld.tld"%>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<%@ taglib prefix="ckeditor" uri="http://ckeditor.com"%>
<%
/**
* @Class Name : fndthEduPrcsMngMdfy.jsp
@ -98,6 +99,7 @@
}
function fncSave(){
CKEDITOR.instances.prcsCn.updateElement();
var data = new FormData(document.getElementById("createForm"));
if(confirm("수정하시겠습니까?")){
@ -215,7 +217,16 @@
<tr>
<th scope="row">상세교육과정</th>
<td>
<textarea placeholder="과정설명을 입력해주세요." name="prcsCn" id="prcsCn" class="memo" onfocus="this.placeholder=''" onblur="this.placeholder='과정설명을 입력해주세요.'" class="inputLight" style="height: 200px;"><c:out value="${info.prcsCn }" /></textarea>
<%-- <textarea placeholder="과정설명을 입력해주세요." name="prcsCn" id="prcsCn" class="memo" onfocus="this.placeholder=''" onblur="this.placeholder='과정설명을 입력해주세요.'" class="inputLight" style="height: 200px;"><c:out value="${info.prcsCn }" /></textarea> --%>
<textarea id="prcsCn" name="prcsCn" title="<spring:message code="cop.nttCn" />" cols="500" rows="20">
<%-- <c:out value="${board.nttCn}" escapeXml="false" /> --%>
<c:out value="${info.prcsCn}" escapeXml="false" />
</textarea>
<ckeditor:replace replace="prcsCn" basePath="${pageContext.request.contextPath}/html/egovframework/com/cmm/utl/ckeditor/" />
<form:errors path="prcsCn" />
</td>
</tr>

View File

@ -9,6 +9,7 @@
<%@ taglib prefix="ve" uri="/WEB-INF/tlds/kcc_tld.tld"%>
<%@ taglib prefix="kc" uri="/WEB-INF/tlds/kcc_tld.tld"%>
<%@ taglib prefix="validator" uri="http://www.springmodules.org/tags/commons-validator" %>
<%@ taglib prefix="ckeditor" uri="http://ckeditor.com"%>
<%
/**
* @Class Name : fndthEduPrcsMngReg.jsp
@ -31,76 +32,13 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">
//세부과정 추가 버튼 클릭 시 세부과정 추가
function addPro() {
var addQuest = $(".addPro_wrap");
var questLen = addQuest.children("div").length;
questLen = Number(questLen+1);
var trHtml="";
trHtml += '<div class="tbody_one">';
trHtml += '<span><span class="span_num3">'+ questLen +'</span>.</span>';
trHtml += '<div>';
trHtml += '<input type="text" name="detailPrcsNm" id="detailPrcsNm"> ';
trHtml += '<button type="button" class="table_del3" onclick="delPro(this)"><img src="${pageContext.request.contextPath}/visitEdu/adm/publish/image/content/btn_del.png"></button>';
trHtml += '</div>';
trHtml += '</div>';
addQuest.append(trHtml);
}
//삭제 버튼 클릭 시 현재 div 삭제 후 지문 숫자 재선언
function delPro(item) {
var bodyThis = $(item).closest('.tbody_one');
var tb = $(item).closest('.addPro_wrap').find('.tbody_one');
var len = $(item).closest('.addPro_wrap').children('.tbody_one').length;
var idx = bodyThis.index();
if(len == 1){
alert("세부과정은 최소1개가 존재해야합니다.");
return false;
}else{
bodyThis.remove();
for(var i=0;i<len;i++){
if(idx>i){
tb.eq(i).find('.span_num3').text(i+1);
}else{
tb.eq(i).find('.span_num3').text(i);
}
}
}
}
function fncAddUser(){
var obj = $(".memList:first").clone(true);
obj.children('input').val('')
/*
var len = $(".memList").length;
$.each(obj.find("input"), function(idx, objInput){
objInput.name = objInput.name.replace(/\[.*\]/,'['+(len+1)+']');
console.log(objInput.name);
if(objInput.name.indexOf("memGrade") < 0){
objInput.value = '';
}
});
obj.find("button").attr("id", obj.find("button").attr("id").replace(/[0-9]/gi, len+2));
obj.find("tr:last > td").text("");
*/
$(".memList:last").after(obj);
}
function fncDelUser(obj){
if($(".memList").length <= 1){
alert("담당자은 최소1개가 존재해야합니다.");
}else{
$(obj).closest("td").remove();
}
}
function fncSave(){
CKEDITOR.instances.prcsCn.updateElement();
var data = new FormData(document.getElementById("createForm"));
var data = new FormData(document.getElementById("vEPrcsDetailVO"));
if(confirm("저장하시겠습니까?")){
var url = "${pageContext.request.contextPath}/kccadr/oprtn/fndthEnhanceTrn/fndthEduPrcsMngRegAjax.do";
console.log(data);
@ -143,7 +81,10 @@
<body>
<form:form id="listForm" name="listForm" commandName="vEPrcsDetailVO" method="post">
</form:form>
<form:form id="createForm" name="createForm" commandName="adjustDeptManageVO" method="post">
<%-- <form:form id="createForm" name="createForm" commandName="adjustDeptManageVO" method="post"> --%>
<form:form commandName="vEPrcsDetailVO" name="createForm" method="post" enctype="multipart/form-data">
<!-- cont -->
<div class="cont_wrap">
<div class="box">
@ -212,7 +153,15 @@
<tr>
<th scope="row">상세교육과정</th>
<td>
<textarea placeholder="과정설명을 입력해주세요." name="prcsCn" id="prcsCn" class="memo" onfocus="this.placeholder=''" onblur="this.placeholder='과정설명을 입력해주세요.'" class="inputLight" style="height: 200px;"></textarea>
<!-- <textarea placeholder="과정설명을 입력해주세요." name="prcsCn" id="prcsCn" class="memo" onfocus="this.placeholder=''" onblur="this.placeholder='과정설명을 입력해주세요.'" class="inputLight" style="height: 200px;"></textarea> -->
<%--
<form:textarea path="nttCn" class="textarea" cols="500" rows="20" />
<ckeditor:replace replace="nttCn" basePath="${pageContext.request.contextPath}/html/egovframework/com/cmm/utl/ckeditor/" />
<form:errors path="nttCn" />
--%>
<form:textarea path="prcsCn" class="textarea" cols="500" rows="20" />
<ckeditor:replace replace="prcsCn" basePath="${pageContext.request.contextPath}/html/egovframework/com/cmm/utl/ckeditor/" />
<form:errors path="prcsCn" />
</td>
</tr>

View File

@ -242,7 +242,8 @@
<tr>
<th scope="row">상세교육내용</th>
<td colspan="3">
<div style="white-space:pre;"><c:out value='${info.prcsCn}'/></div>
<c:out value="${fn:replace(info.prcsCn , crlf , '<br/>')}" escapeXml="false" />
<%-- <div style="white-space:pre;"><c:out value='${info.prcsCn}'/></div> --%>
</td>
</tr>
<tr>