Compare commits
No commits in common. "828bc3234cec8a0ca1a7659cef0bda99720ec1fc" and "cd026187c14c1c084b9f5d7b46a1507899cc087c" have entirely different histories.
828bc3234c
...
cd026187c1
|
|
@ -189,8 +189,7 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe
|
||||||
const constCompanyAdmin = obj.datas[idx].constCompanyAdmin == null ? '-' : obj.datas[idx].constCompanyAdmin;
|
const constCompanyAdmin = obj.datas[idx].constCompanyAdmin == null ? '-' : obj.datas[idx].constCompanyAdmin;
|
||||||
const constCompanyTel = obj.datas[idx].constCompanyTel == null ? '-' : obj.datas[idx].constCompanyTel;
|
const constCompanyTel = obj.datas[idx].constCompanyTel == null ? '-' : obj.datas[idx].constCompanyTel;
|
||||||
|
|
||||||
// content += '<tr onclick="location.href=\'modify.do?CID=' + obj.datas[idx].cid + '\';" data-cid="' + obj.datas[idx].cid + '">';
|
content += '<tr onclick="location.href=\'modify.do?CID=' + obj.datas[idx].cid + '\';" data-cid="' + obj.datas[idx].cid + '">';
|
||||||
content += '<tr onmousedown="handleMouseDown()" onmousemove="handleMouseMove()" onmouseup="handleRowClick(' + obj.datas[idx].cid + ')" data-cid="' + obj.datas[idx].cid + '">';
|
|
||||||
content += '<td>' + (obj.count - idx - (nCount * (nPage - 1))) + '</td>';
|
content += '<td>' + (obj.count - idx - (nCount * (nPage - 1))) + '</td>';
|
||||||
content += '<td style="text-align: left; text-indent: 10px;">' + obj.datas[idx].constName + '</td>';
|
content += '<td style="text-align: left; text-indent: 10px;">' + obj.datas[idx].constName + '</td>';
|
||||||
content += '<td>' + obj.datas[idx].projectStateCodeName + '</td>';
|
content += '<td>' + obj.datas[idx].projectStateCodeName + '</td>';
|
||||||
|
|
@ -215,21 +214,21 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe
|
||||||
let totalIndicator = Math.ceil(obj.count / nCount); // 총 페이지인디케이터 번호
|
let totalIndicator = Math.ceil(obj.count / nCount); // 총 페이지인디케이터 번호
|
||||||
let pagingEleHTML = "<ul>"
|
let pagingEleHTML = "<ul>"
|
||||||
if (!((firstIndicator - 1) < 1)) {
|
if (!((firstIndicator - 1) < 1)) {
|
||||||
pagingEleHTML = pagingEleHTML + '<li data-npage="' + (firstIndicator - 1) + '" class="page-button"><a href="javascript:void()"><img src="/com/img/common/icon/ico_chevron.svg" alt="Chevron-prev" class="page-prev"></a></li>';
|
pagingEleHTML = pagingEleHTML + '<li data-npage="' + (firstIndicator - 1) + '" class="page-button"><a href="#"><img src="/com/img/common/icon/ico_chevron.svg" alt="Chevron-prev" class="page-prev"></a></li>';
|
||||||
}
|
}
|
||||||
|
|
||||||
for( let i = firstIndicator; i<lastIndicator+1; i++ ) {
|
for( let i = firstIndicator; i<lastIndicator+1; i++ ) {
|
||||||
if (i <= totalIndicator) {
|
if (i <= totalIndicator) {
|
||||||
if( i === nPage ) {
|
if( i === nPage ) {
|
||||||
pagingEleHTML += `<li data-npage="` + i + `" class="page-button is-active"><a href="javascript:void()">` + i + `</a></li>`;
|
pagingEleHTML += `<li data-npage="` + i + `" class="page-button is-active"><a href="#">` + i + `</a></li>`;
|
||||||
} else {
|
} else {
|
||||||
pagingEleHTML += `<li data-npage="` + i + `" class="page-button" ><a href="javascript:void()">` + i + `</a></li>`;
|
pagingEleHTML += `<li data-npage="` + i + `" class="page-button" ><a href="#">` + i + `</a></li>`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (lastIndicator < totalIndicator) {
|
if (lastIndicator < totalIndicator) {
|
||||||
pagingEleHTML += `<li data-npage="` + (lastIndicator+1) +`" class="page-button"><a href="javascript:void()"><img src="/com/img/common/icon/ico_chevron.svg" alt="Chevron-next" class="page-next"></a></li>`;
|
pagingEleHTML += `<li data-npage="` + (lastIndicator+1) +`" class="page-button"><a href="#"><img src="/com/img/common/icon/ico_chevron.svg" alt="Chevron-next" class="page-next"></a></li>`;
|
||||||
}
|
}
|
||||||
pagingEleHTML += "</ul>";
|
pagingEleHTML += "</ul>";
|
||||||
pagingEle.innerHTML = pagingEleHTML;
|
pagingEle.innerHTML = pagingEleHTML;
|
||||||
|
|
|
||||||
|
|
@ -111,20 +111,3 @@ function toggleClass(element, className) {
|
||||||
document.addEventListener("DOMContentLoaded", function(event) {
|
document.addEventListener("DOMContentLoaded", function(event) {
|
||||||
departments();
|
departments();
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
|
||||||
* 발주기관 목록화면 tr 드래그 시 상세화면 이동 방지처리
|
|
||||||
* 드래그 이벤트와 클릭이벤트를 구분하여 감지한다.
|
|
||||||
*/
|
|
||||||
let isDragging = false;
|
|
||||||
function handleMouseDown() {
|
|
||||||
isDragging = false;
|
|
||||||
}
|
|
||||||
function handleMouseMove() {
|
|
||||||
isDragging = true;
|
|
||||||
}
|
|
||||||
function handleRowClick(CID) {
|
|
||||||
if (!isDragging) {
|
|
||||||
window.location.href = 'modify.do?CID=' + CID;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue