Index: arms/js/detail.js =================================================================== diff -u -ra5def849353f9bddb52f19bacaf225625e60b175 -r9456f7602f2a8a20da3139cbc349388e6d2e1f9e --- arms/js/detail.js (.../detail.js) (revision a5def849353f9bddb52f19bacaf225625e60b175) +++ arms/js/detail.js (.../detail.js) (revision 9456f7602f2a8a20da3139cbc349388e6d2e1f9e) @@ -73,10 +73,6 @@ save_post_btn_click(); - init_versionList(); - - bindDataVersionTab(); - }) .catch(function (errorMessage) { console.error(errorMessage); @@ -159,7 +155,9 @@ if (!visibilityStatus[element] && checkVisible(element)) { if(element === "#version") { - getVersionDetailViewTab(); + bindDataVersionTab(); + + init_versionList(); } else if (element === "#allreq") { build_ReqData_By_PdService(); @@ -168,7 +166,7 @@ fileLoadByPdService(); } else if (element === "#question") { - getReqCommentList(); + // getReqCommentList(); } visibilityStatus[element] = true; @@ -283,14 +281,26 @@ } // ------------------ 버전 상세보기 ------------------ // +function versionDetailViewTabClick() { + $("#get_version_list").click(function () { + bindDataVersionTab(); + + init_versionList(); + }); +} + function bindDataVersionTab() { + console.log("Version Detail View Tab ::::"); + if (callAPI("versionAPI")) { + return; + } var urlParams = new URL(location.href).searchParams; var selectedPdService = urlParams.get('pdService'); // ajax 처리 후 데이터 바인딩 console.log("dataLoad :: getSelectedID → " + selectedPdService); - $.ajax("/auth-user/api/arms/pdService/getNode.do?c_id=" + selectedPdService).done(function (json) { + $.ajax("/auth-user/api/arms/pdService/getNodeWithVersionOrderByCidDesc.do?c_id=" + selectedPdService).done(function (json) { console.log("dataLoad :: success → ", json); $("#version-product-name").html(json.c_title); @@ -361,115 +371,6 @@ }); } -function versionDetailViewTabClick() { - $("#get_version_list").click(function () { - getVersionDetailViewTab(); - }); -} - -function getVersionDetailViewTab() { - console.log("Version Detail View Tab ::::"); - if (callAPI("versionAPI")) { - return; - } - - var urlParams = new URL(location.href).searchParams; - var selectedPdService = urlParams.get('pdService'); - - $.ajax({ - url: "/auth-user/api/arms/pdService/getVersionList.do" + - "?c_id=" + selectedPdService, - type: "GET", - contentType: "application/json;charset=UTF-8", - dataType: "json", - progress: true, - statusCode: { - 200: function (data) { - ////////////////////////////////////////////////////////// - console.log(data.response); - // $("#detailversion_contents").html(data.response[0].c_title); - - /* for (var k in data.response) { - var obj = data.response[k]; - alert(obj.c_title); - /!* 가져와지는 건 확인.... *!/ - // var $opt = $("