@@ -456,9 +524,37 @@
//버전 클릭할 때 동작하는 함수
//1. 상세보기 데이터 바인딩
//2. 편집하기 데이터 바인딩
- function versionClick(nodeId){
- console.log("->" + nodeId);
+ function versionClick(c_id){
+ $.ajax({
+ url: "/auth-user/api/arms/pdversion/getVersion.do", // 클라이언트가 HTTP 요청을 보낼 서버의 URL 주소
+ data: { c_id: c_id }, // HTTP 요청과 함께 서버로 보낼 데이터
+ method: "GET", // HTTP 요청 메소드(GET, POST 등)
+ dataType: "json" // 서버에서 보내줄 데이터의 타입
+ })
+ // HTTP 요청이 성공하면 요청한 데이터가 done() 메소드로 전달됨.
+ .done(function(json) {
+ console.log( " -> " + json[0].c_contents);
+ $('#pdServiceName').text($('.list-group-item').text());
+ $('#pdServiceVersion').text(json[0].c_title);
+ $('#versionStartDate').text(json[0].c_start_date);
+ $('#versionEndDate').text(json[0].c_end_date);
+ $('#versionContents').html(json[0].c_contents);
+ $('#input_pdserviceName').val($('.list-group-item').text());
+ $('#input_pdserviceVersion').val(json[0].c_title);
+ $('#input_pdservice_start_date').val(json[0].c_start_date);
+ $('#input_pdservice_end_date').val(json[0].c_end_date);
+ CKEDITOR.instances.input_pdservice_editor.setData(json[0].c_contents);
+ })
+ // HTTP 요청이 실패하면 오류와 상태에 관한 정보가 fail() 메소드로 전달됨.
+ .fail(function(xhr, status, errorThrown) {
+ console.log(xhr + status + errorThrown);
+ })
+ //
+ .always(function(xhr, status) {
+ $("#text").html("요청이 완료되었습니다!");
+ console.log(xhr + status);
+ });
}
// 초기 개발 및 확인 용도
@@ -484,7 +580,7 @@
data += `
Index: arms/js/pdServiceVersion.js
===================================================================
diff -u -rcd0cbab369b070ba606dd34ce646cfdab48f01bc -r993915e7c123829858474ac8d2e9d87775fc5e46
--- arms/js/pdServiceVersion.js (.../pdServiceVersion.js) (revision cd0cbab369b070ba606dd34ce646cfdab48f01bc)
+++ arms/js/pdServiceVersion.js (.../pdServiceVersion.js) (revision 993915e7c123829858474ac8d2e9d87775fc5e46)
@@ -60,7 +60,7 @@
}
// --- 에디터 설정 --- //
-//CKEDITOR.replace("editor");
+CKEDITOR.replace("input_pdservice_editor");
CKEDITOR.replace("modal-editor");
// --- 팝업 띄울때 사이즈 조정 -- //