Index: arms/js/detail.js =================================================================== diff -u -r9bfcefb093d2d5534a680dd2435c31a5ba024047 -re6e12437d164831eb360b9d40a029057f4778399 --- arms/js/detail.js (.../detail.js) (revision 9bfcefb093d2d5534a680dd2435c31a5ba024047) +++ arms/js/detail.js (.../detail.js) (revision e6e12437d164831eb360b9d40a029057f4778399) @@ -7,11 +7,13 @@ var selectedJiraServer; var selectedJiraProject; var selectedJsTreeId; // 요구사항 아이디 -var calledAPIs = {}; function execDocReady() { var pluginGroups = [ - ["../reference/lightblue4/docs/lib/widgster/widgster.js", "../reference/light-blue/lib/vendor/jquery.ui.widget.js"] + [ + "../reference/lightblue4/docs/lib/widgster/widgster.js", + "../reference/light-blue/lib/vendor/jquery.ui.widget.js" + ] // 추가적인 플러그인 그룹들을 이곳에 추가하면 됩니다. ]; @@ -21,23 +23,27 @@ $(".widget").widgster(); setSideMenu("sidebar_menu_product", "sidebar_menu_detail"); getDetailViewTab(); + + // --- 에디터 설정 --- // + var waitCKEDITOR = setInterval(function () { + try { + if (window.CKEDITOR) { + if (window.CKEDITOR.status === "loaded") { + CKEDITOR.replace("detailview_req_contents", { skin: "office2013" }); + clearInterval(waitCKEDITOR); + } + } + } catch (err) { + console.log("CKEDITOR 로드가 완료되지 않아서 초기화 재시도 중..."); + } + }, 313 /*milli*/); }) .catch(function (errorMessage) { console.error(errorMessage); console.error("플러그인 로드 중 오류 발생"); }); } -// ------------------ api 호출 여부 확인(여러번 발생시키지 않기 위하여) ------------------ // -function callAPI(apiName) { - if (calledAPIs[apiName]) { - console.log("This API has already been called: " + apiName); - return true; - } - - return false; -} - function setUrlParams() { urlParams = new URL(location.href).searchParams; selectedPdService = urlParams.get("pdService"); @@ -48,9 +54,6 @@ } function getDetailViewTab() { - if (callAPI("detailAPI")) { - return; - } console.log("Detail Tab ::::"); var tableName = "T_ARMS_REQADD_"; @@ -85,7 +88,6 @@ bindDataDetailTab(data); ////////////////////////////////////////////////////////// jSuccess("요구사항 조회가 완료 되었습니다."); - calledAPIs["detailAPI"] = true; } }, beforeSend: function () {}, @@ -100,6 +102,7 @@ console.log(ajaxData); //제품(서비스) 데이터 바인딩 var selectedPdServiceText = ajaxData.pdService_c_title; + let contents = ajaxData.reqAdd_c_req_contents; if (isEmpty(selectedPdServiceText)) { $("#detailview_req_pdservice_name").val(""); @@ -146,6 +149,7 @@ $("#detailview_req_reviewer05").val(ajaxData.reqAdd_c_req_reviewer05); } - $("#detailview_req_contents").html(ajaxData.reqAdd_c_req_contents); - $("#req_detail_contents").html(ajaxData.reqAdd_c_req_contents); + CKEDITOR.instances.detailview_req_contents.setData(contents); + CKEDITOR.instances.detailview_req_contents.setReadOnly(true); + } Index: arms/js/detail_per_version.js =================================================================== diff -u -r151846f2c5a394347f6999658cf42075990a34b1 -re6e12437d164831eb360b9d40a029057f4778399 --- arms/js/detail_per_version.js (.../detail_per_version.js) (revision 151846f2c5a394347f6999658cf42075990a34b1) +++ arms/js/detail_per_version.js (.../detail_per_version.js) (revision e6e12437d164831eb360b9d40a029057f4778399) @@ -24,6 +24,20 @@ setSideMenu("sidebar_menu_product", "sidebar_menu_per_version"); init_versionList(); dataLoad(); + + // --- 에디터 설정 --- // + var waitCKEDITOR = setInterval(function () { + try { + if (window.CKEDITOR) { + if (window.CKEDITOR.status === "loaded") { + CKEDITOR.replace("version_contents", { skin: "office2013" }); + clearInterval(waitCKEDITOR); + } + } + } catch (err) { + console.log("CKEDITOR 로드가 완료되지 않아서 초기화 재시도 중..."); + } + }, 313 /*milli*/); }) .catch(function () { console.error("플러그인 로드 중 오류 발생"); @@ -146,8 +160,10 @@ $("#select_Version").val(json.c_title); $("#version_start_date").val(json.c_pds_version_start_date); $("#version_end_date").val(json.c_pds_version_end_date); - $("#version_contents").html(json.c_pds_version_contents); + CKEDITOR.instances.version_contents.setData(json.c_pds_version_contents); + CKEDITOR.instances.version_contents.setReadOnly(true); + // sender 데이터 바인딩 및 선택 색상 표기 $("#select_Version").text(json.c_title); $(".list-item1 .chat-message-body").css({ "border-left": "" }); Index: arms/js/detail_total_pdservice.js =================================================================== diff -u -r2fea2df524d487ec3221e520404e4a52aec1eb62 -re6e12437d164831eb360b9d40a029057f4778399 --- arms/js/detail_total_pdservice.js (.../detail_total_pdservice.js) (revision 2fea2df524d487ec3221e520404e4a52aec1eb62) +++ arms/js/detail_total_pdservice.js (.../detail_total_pdservice.js) (revision e6e12437d164831eb360b9d40a029057f4778399) @@ -7,7 +7,6 @@ var selectedJiraServer; var selectedJiraProject; var selectedJsTreeId; // 요구사항 아이디 -var calledAPIs = {}; /* 요구사항 전체목록 전역변수 */ var getFiles = []; @@ -90,15 +89,6 @@ }); } -function callAPI(apiName) { - if (calledAPIs[apiName]) { - console.log("This API has already been called: " + apiName); - return true; - } - - return false; -} - function setUrlParams() { urlParams = new URL(location.href).searchParams; selectedPdService = urlParams.get("pdService"); @@ -124,7 +114,6 @@ dataType: "json" }).done(function (result) { console.log(result.files); - calledAPIs["fileAPI"] = true; bindFileList(result); Index: arms/js/detail_total_reqadd.js =================================================================== diff -u -r04fda4daeb5fdaa792a56e6a0cfcd97884a8a977 -re6e12437d164831eb360b9d40a029057f4778399 --- arms/js/detail_total_reqadd.js (.../detail_total_reqadd.js) (revision 04fda4daeb5fdaa792a56e6a0cfcd97884a8a977) +++ arms/js/detail_total_reqadd.js (.../detail_total_reqadd.js) (revision e6e12437d164831eb360b9d40a029057f4778399) @@ -29,6 +29,20 @@ setSideMenu("sidebar_menu_product", "sidebar_menu_total_reqadd"); build_ReqData_By_PdService(); + + // --- 에디터 설정 --- // + var waitCKEDITOR = setInterval(function () { + try { + if (window.CKEDITOR) { + if (window.CKEDITOR.status === "loaded") { + CKEDITOR.replace("detailview_req_contents", { skin: "office2013" }); + clearInterval(waitCKEDITOR); + } + } + } catch (err) { + console.log("CKEDITOR 로드가 완료되지 않아서 초기화 재시도 중..."); + } + }, 313 /*milli*/); }) .catch(function () { console.error("플러그인 로드 중 오류 발생"); @@ -145,5 +159,6 @@ } else { $("#detailview_req_reviewer05").val(ajaxData.c_req_reviewer05); } - $("#detailview_req_contents").html(ajaxData.c_req_contents); + CKEDITOR.instances.detailview_req_contents.setData(ajaxData.c_req_contents); + CKEDITOR.instances.detailview_req_contents.setReadOnly(true); }