Index: arms/detail.html =================================================================== diff -u -r25ae9aa8e282fcdaad3419f7d7d49a0f0e310054 -rcc1c003a16ba6fe74e45f299ce0ffb04979f895d --- arms/detail.html (.../detail.html) (revision 25ae9aa8e282fcdaad3419f7d7d49a0f0e310054) +++ arms/detail.html (.../detail.html) (revision cc1c003a16ba6fe74e45f299ce0ffb04979f895d) @@ -642,6 +642,12 @@ style="padding-top: 5px; overflow: hidden; height:712px" class="border"> + + + Index: arms/html/armsDetailExceptTemplate/assets/css/detail.css =================================================================== diff -u -r25ae9aa8e282fcdaad3419f7d7d49a0f0e310054 -rcc1c003a16ba6fe74e45f299ce0ffb04979f895d --- arms/html/armsDetailExceptTemplate/assets/css/detail.css (.../detail.css) (revision 25ae9aa8e282fcdaad3419f7d7d49a0f0e310054) +++ arms/html/armsDetailExceptTemplate/assets/css/detail.css (.../detail.css) (revision cc1c003a16ba6fe74e45f299ce0ffb04979f895d) @@ -48,7 +48,7 @@ } } - +/* 트리 색상 변경 */ .jstree-lightblue4 .jstree-hovered { color: #ffffff; background-color: rgba(255, 106, 0, 0.60) !important; border-color: rgba(0, 0, 0, 0.15); padding:0 2px 0 1px; } .jstree-lightblue4 .jstree-clicked { color: #ffffff; background-color: #ffee58!important; border-color: rgba(0, 0, 0, 0.15); padding:0 2px 0 1px; } .about .content ul li:last-child { @@ -523,7 +523,6 @@ } /* 게시글 생성 부분 */ - .box { position: relative; border-radius: 3px; @@ -1075,6 +1074,7 @@ font-size: 11px; color: #f8f8f8; } + /*-------------------------------------------------------------- # 요구사항 상세 --------------------------------------------------------------*/ @@ -1354,4 +1354,109 @@ .version-scroll .slimScrollDiv { height: auto !important; +} + +/* 요구사항 전체 목록 테스트 부분 */ +.dd { + position: relative; + display: block; + margin: 0; + padding: 5px; + max-width: 600px; + list-style: none; + font-size: 13px; + line-height: 20px; + height: 720px; + overflow: hidden; +} + +.dd-list { + display: block; + position: relative; + margin: 0; + padding: 0; + list-style: none; +} + +.dd-list .dd-list { + padding-left: 30px; +} + +.dd-item, .dd-empty, .dd-placeholder { + display: block; + position: relative; + margin: 0; + padding: 0; + min-height: 20px; + font-size: 13px; + line-height: 20px; +} + +.dd-handle { + display: block; + min-height: 30px; + margin: 5px 0; + padding: 5px 10px; + color: #666; + text-decoration: none; + background: #fff; + -webkit-box-shadow: 0 -1px 1px rgba(103,103,103,0.4), 0 1px 1px rgba(103,103,103,0.4); + -moz-box-shadow: 0 -1px 1px rgba(103,103,103,0.4),0 1px 1px rgba(103,103,103,0.4); + box-shadow: 0 -1px 1px rgba(103,103,103,0.4), 0 1px 1px rgba(103,103,103,0.4); + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + cursor: pointer; +} + +.dd-item>button { + display: block; + position: relative; + cursor: pointer; + float: left; + width: 25px; + height: 20px; + margin: 5px 0; + padding: 0; + text-indent: 100%; + white-space: nowrap; + overflow: hidden; + border: 0; + background: transparent; + font-size: 12px; + line-height: 1; + text-align: center; + font-weight: bold; + color: #666; +} + +.dd-item>button:before { + content: '+'; + display: block; + position: absolute; + width: 100%; + text-align: center; + text-indent: 0; +} + +.dd-item>button[data-action="collapse"]:before { + content: '-' +} + +.dd-handle:hover, +.dd-handle:focus { + background-color:#0563bb; + color: white; +} + +.fa-clipboard:before { + content: "\f0ea"; +} + +.fa-files-o:before { + content: "\f0c5"; +} + +.fa-file-text-o:before { + content: "\f0f6"; } \ No newline at end of file Index: arms/js/detail.js =================================================================== diff -u -r9059f02548aba9a6874f56b971b22f4e6fc60587 -rcc1c003a16ba6fe74e45f299ce0ffb04979f895d --- arms/js/detail.js (.../detail.js) (revision 9059f02548aba9a6874f56b971b22f4e6fc60587) +++ arms/js/detail.js (.../detail.js) (revision cc1c003a16ba6fe74e45f299ce0ffb04979f895d) @@ -13,6 +13,8 @@ }; var totalReqCommentCount; +/* 요구사항 전체목록 전역변수 */ +var reqTreeList; var prefix = "./img/winTypeFileIcons/"; var iconsMap = { @@ -143,6 +145,9 @@ // QnA 글 작성 시 확장 req_comment_message_size_change(); + + // 요구사항 전체목록 호출 메소드 + // req_list_load(); }) .catch(function (errorMessage) { console.error(errorMessage); @@ -207,6 +212,10 @@ } else if (element === "#allreq") { build_ReqData_By_PdService(); + + // 요구사항 전체목록 호출 후 전역변수에서 바인딩작업 + // set_req_list_view(); + // set_req_list_button(); } else if (element === "#files") { fileLoadByPdService(); @@ -513,6 +522,10 @@ function allReqListViewTabClick() { $("#get_req_list").click(function () { build_ReqData_By_PdService(); + + // 요구사항 전체목록 호출 후 전역변수에서 바인딩작업 + // set_req_list_view(); + // set_req_list_button(); }); } @@ -1387,3 +1400,159 @@ this.style.height = (this.scrollHeight) + 'px'; }); } + +// 요구사항 전체목록 디자인 변경 관련한 메소드들 +async function req_list_load() { + var urlParams = new URL(location.href).searchParams; + var selectedPdService = urlParams.get('pdService'); + var tableName = "T_ARMS_REQADD_" + selectedPdService; + + try { + // AJAX 요청을 Promise 형태로 변환 + const response = await $.ajax({ + url: "/auth-user/api/arms/reqAdd/" + tableName + "/getMonitor.do", + type: "GET", + contentType: "application/json;charset=UTF-8", + dataType: "json", + progress: true + }); + + // 결과 c_left 기반 정렬 + response.sort(function(a, b) { + return a.c_left - b.c_left; + }); + + // 전역 변수에 데이터 저장 + reqTreeList = response; + + } catch (error) { + console.error("AJAX 요청 실패:", error); + } +} + +function set_req_list_view() { + $(".dd-list").empty(); + $(".dd").slimscroll({ + height: "720px" + }); + + reqTreeList.sort(function(a, b) { + return a.c_left - b.c_left; + }); + var data = reqTreeList; + + console.log (data); + + var firstBranchChecker = true; + $.each(data, function (key, value) { + console.log("key : " + key + "\nvalue : " + value); + if (value.c_contents == null || value.c_contents == "null") { + value.c_contents = ""; + } + + console.log(value.c_id + "=" + value.c_type + "=" + value.c_title + "//" + value.c_parentid); + + var iconHtml; + if (value.c_type == "root" || value.c_type == "drive") { + iconHtml = ""; + } else if (value.c_type == "folder") { + iconHtml = ""; + } else { + iconHtml = ""; + } + + if (value.c_type == "root") { + console.log("ROOT 노드는 처리하지 않습니다."); + } else if (value.c_type == "drive" || value.c_type == "folder") { + if (firstBranchChecker) { + $(".dd-list").append( + "
  • " + + "
    " + + iconHtml + + " " + + value.c_title + + "
    " + + "
  • " + ); + firstBranchChecker = false; + } else { + $("#T_ARMS_REQ_" + value.c_parentid).append( + "
      " + + "
    1. " + + "
      " + + iconHtml + + " " + + value.c_title + + "
      " + + "
    2. " + + "
    " + ); + } + } else { + $("#T_ARMS_REQ_" + value.c_parentid).append( + "
      " + + "
    1. " + + "
      " + + iconHtml + + " " + + value.c_title + + "
      " + + "
    2. " + + "
    " + ); + } + + + }); + + $('.dd-handle').on('click', function() { + var dataId = $(this).closest('.dd-list').data('id'); + console.log(dataId); // 콘솔에 data-id 값 출력 + }); +} + +function set_req_list_button() { + $('.dd-item').each(function() { + if ($(this).children('ol').length > 0) { + $(this).prepend('' + + ''); + } + }); + + collapse_or_expand_button_click(); +} + +function collapse_or_expand_button_click() { + $('.collapseBtn').on('click', collapse_button_click_event); + $('.expandBtn').on('click', expand_button_click_event); + +} + +function collapse_button_click_event(e){ + var parentDiv = $(this).closest('.dd-list'); + parentDiv.find('.dd-list').css('display', 'none'); + parentDiv.find('.collapseBtn').css('display', 'none'); + parentDiv.find('.expandBtn').css('display', 'block'); +} + +function expand_button_click_event(e){ + var parentDiv = $(this).closest('.dd-list'); + parentDiv.find('.dd-list').css('display', 'block'); + parentDiv.find('.collapseBtn').css('display', 'block'); + parentDiv.find('.expandBtn').css('display', 'none'); +}