Index: arms/html/reqAdd/content-container.html =================================================================== diff -u -rdc736dcdf068e4f153396b998ac5938d8096ef08 -r19c27aab0f0cc4453a8ea607fe6cbd44e969e8b0 --- arms/html/reqAdd/content-container.html (.../content-container.html) (revision dc736dcdf068e4f153396b998ac5938d8096ef08) +++ arms/html/reqAdd/content-container.html (.../content-container.html) (revision 19c27aab0f0cc4453a8ea607fe6cbd44e969e8b0) @@ -2317,9 +2317,14 @@ a{ color :white; } - tr:hover { - background-color: rgba(50, 50, 50, 0.65); + + .reqItems:hover { + background-color: rgba(0, 0, 0, 0.15) !important; } + + .req-select>li:hover { + background-color: #e5603b; + } } \ No newline at end of file Index: arms/js/reqAddTable.js =================================================================== diff -u -rdc736dcdf068e4f153396b998ac5938d8096ef08 -r19c27aab0f0cc4453a8ea607fe6cbd44e969e8b0 --- arms/js/reqAddTable.js (.../reqAddTable.js) (revision dc736dcdf068e4f153396b998ac5938d8096ef08) +++ arms/js/reqAddTable.js (.../reqAddTable.js) (revision 19c27aab0f0cc4453a8ea607fe6cbd44e969e8b0) @@ -481,6 +481,10 @@ buttons.forEach((button) => { button.classList.remove('active'); }); + const keys = Object.keys(folderDepth); + keys.forEach(key => { + this.unmergeRoot(key,el); + }); }); } @@ -525,10 +529,10 @@ this.mergeRowsByClassName(key); }); } else { - this.removeElement(data); keys.forEach(key => { this.unmergeRowsByClassName(key,this.getElement(e.target, "TR")); }); + this.removeElement(data); } }); @@ -583,6 +587,7 @@ makePivotRow(rows, tag) { return rows.reduce((acc, cur) => { const $tr = this.makeElement("tr"); + $tr.className ="reqItems"; $tr.setAttribute("data-id", cur.id ?? ""); $tr.setAttribute("data-version", cur._version ?? ""); $tr.setAttribute("data-assignee", cur._assignee ?? ""); @@ -613,7 +618,7 @@ if (cur.colSpan) { $tr.classList.add("highlight"); if(cur.node ==="leaf"){ - $tr.style.backgroundColor ="rgba(50, 50, 50,0.8)"; + $tr.style.backgroundColor ="#4a4a4a"; } if (pivotType === "version"){ @@ -651,6 +656,7 @@ makeRow(rows, tag) { return rows.reduce((acc, cur) => { const $tr = this.makeElement("tr"); + $tr.className ="reqItems"; $tr.setAttribute("data-id", cur.id); $tr.setAttribute("data-version", cur._version ?? ""); Object.keys(ContentType[pivotType]).forEach((key) => { @@ -720,13 +726,13 @@ } mappingStateIcon(key){ if(key ==="열림"){ - return ' 열림'; + return ' 열림'; }else if(key ==="진행중"){ - return ' 진행중'; + return ' 진행중'; }else if(key ==="해결됨"){ - return ' 해결됨'; + return ' 해결됨'; }else if(key ==="닫힘"){ - return ' 닫힘'; + return ' 닫힘'; } } mappingPriorityIcon(key){ @@ -735,7 +741,7 @@ }else if(key ==="높음"){ return ' 높음'; }else if(key ==="중간"){ - return ' 중간'; + return ' 중간'; }else if(key ==="낮음"){ return ' 낮음'; }else if(key ==="매우 낮음"){ @@ -748,7 +754,7 @@ }else if(key ==="어려움"){ return ' 어려움'; }else if(key ==="보통"){ - return ' 보통'; + return ' 보통'; }else if(key ==="쉬움"){ return ' 쉬움'; }else if(key ==="매우 쉬움"){ @@ -865,19 +871,23 @@ return Object.entries(options).reduce((acc, [name, value]) => { const $li = this.makeElement("li"); const label = name.replace("_", " "); + let dropdownIconData =""; $li.className = text.trim() === label ? "active" : ""; $li.innerHTML = `${label}`; $li.addEventListener("click", (e) => { if(keyname === "_status"){ editContents.statusId = value; + dropdownIconData = this.mappingStateIcon(e.target.textContent); }else if(keyname === "_priority"){ editContents.priorityId = value; + dropdownIconData = this.mappingPriorityIcon(e.target.textContent); }else if(keyname === "_difficulty"){ editContents.difficultyId = value; + dropdownIconData = this.mappingDifficultyIcon(e.target.textContent); } this.updateData($li.parentElement.parentElement.parentElement.dataset.id,editContents); - $li.parentElement.previousElementSibling.innerHTML = `${e.target.textContent} `; + $li.parentElement.previousElementSibling.innerHTML = `${dropdownIconData} `; document.getElementById(uuid).remove(); }); @@ -992,6 +1002,29 @@ }); }); } + unmergeRoot(className,element) { + console.log(className);console.log(element); + const tables = document.querySelectorAll('.reqTable'); + + const dataVersion = element.getAttribute('data-version'); + const dataAssignee = element.getAttribute('data-assignee'); + + tables.forEach((table) => { + Array.from(table.querySelectorAll('tbody tr')).forEach((row) => { + const rowDataVersion = row.getAttribute('data-version'); + const rowDataAssignee = row.getAttribute('data-assignee'); + const cell = row.querySelector(`.${className}`); + if (rowDataVersion === dataVersion || rowDataAssignee === dataAssignee) { + const cell = row.querySelector(`.${className}`); + if (cell) { + cell.style.display = ''; + cell.style.backgroundColor = ''; + cell.rowSpan = 1; + } + } + }); + }); + } mergeRowsByClassName(className) { const tables = document.querySelectorAll('.reqTable');