발주기관 > 건설현장 조회 목록화면 tr 을 드래그하여 텍스트를 긁을때는 상세화면으로 이동하지 않도록 처리
parent
cd026187c1
commit
9145bd2f6a
|
|
@ -189,7 +189,8 @@ if (request.getSession().getAttribute("CLS") == null || "2".equals(request.getSe
|
|||
const constCompanyAdmin = obj.datas[idx].constCompanyAdmin == null ? '-' : obj.datas[idx].constCompanyAdmin;
|
||||
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 style="text-align: left; text-indent: 10px;">' + obj.datas[idx].constName + '</td>';
|
||||
content += '<td>' + obj.datas[idx].projectStateCodeName + '</td>';
|
||||
|
|
|
|||
|
|
@ -111,3 +111,20 @@ function toggleClass(element, className) {
|
|||
document.addEventListener("DOMContentLoaded", function(event) {
|
||||
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