|
|
@ -314,9 +314,6 @@
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
|
|
|
// 저장 callback
|
|
|
|
// 저장 callback
|
|
|
|
${pageName}Control.onSave = (resp) => {
|
|
|
|
${pageName}Control.onSave = (resp) => {
|
|
|
|
if (resp.saved)
|
|
|
|
if (resp.saved)
|
|
|
@ -334,6 +331,27 @@
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
|
|
|
|
*
|
|
|
|
|
|
|
|
**************************************************************************/
|
|
|
|
|
|
|
|
// DataTables에 click, dbclick 이벤트
|
|
|
|
|
|
|
|
renderList${pageName} = () => {
|
|
|
|
|
|
|
|
let ${infoPrefix}List = ${pageName}Control.dataset;
|
|
|
|
|
|
|
|
let empty = ${infoPrefix}List.empty;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let trs = empty ?
|
|
|
|
|
|
|
|
[document.getElementById("${infoPrefix}NotFound--${pageName}").innerHTML] : <%-- from template#${infoPrefix}NotFound --%>
|
|
|
|
|
|
|
|
${infoPrefix}List.inStrings(
|
|
|
|
|
|
|
|
document.getElementById("${infoPrefix}Row--${pageName}").innerHTML, <%-- from template#${infoPrefix}Row --%>
|
|
|
|
|
|
|
|
(str, dataItem) => str
|
|
|
|
|
|
|
|
.replace(/{onclick}/gi, "${pageName}Control.setCurrent('" + dataItem.getValue("RE_REG_ID") + "');")
|
|
|
|
|
|
|
|
.replace(/{ondblclick}/gi, "${pageName}Control.getTotalInfo('" + dataItem.getValue("CRDN_ID") + "');")
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#tbody--${pageName}").html(trs.join());
|
|
|
|
|
|
|
|
$("th input[type='checkbox']").prop("checked", false);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
/**************************************************************************
|
|
|
|
* 초기 셋팅
|
|
|
|
* 초기 셋팅
|
|
|
|
**************************************************************************/
|
|
|
|
**************************************************************************/
|
|
|
@ -363,33 +381,24 @@
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// DataTables 스크롤 이벤트
|
|
|
|
// DataTables 스크롤 이벤트
|
|
|
|
$("#table-responsive--${pageName}").scroll(function() {
|
|
|
|
$("#table-responsive--${pageName}").scroll(function(obj) {
|
|
|
|
let el = $(this);
|
|
|
|
let el = $(this);
|
|
|
|
|
|
|
|
|
|
|
|
if (el.scrollTop() == 0) return;
|
|
|
|
if (el.scrollTop() == 0) {
|
|
|
|
|
|
|
|
return;
|
|
|
|
if ((el[0].scrollHeight - el.scrollTop() + VERTICAL_SCROLL_HEIGHT) <= el.outerHeight()) {
|
|
|
|
|
|
|
|
fnBtnSearchList${pageName}(${pageName}Control.query.pageNum + 1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// DataTables에 click, dbclick 이벤트
|
|
|
|
let itemsCnt = ${pageName}Control.dataset._items.length;
|
|
|
|
function renderList${pageName}() {
|
|
|
|
let totCnt = ${pageName}Control.dataset.getCurrent("item").data.TOT_CNT;
|
|
|
|
let ${infoPrefix}List = ${pageName}Control.dataset;
|
|
|
|
|
|
|
|
let empty = ${infoPrefix}List.empty;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let trs = empty ?
|
|
|
|
if (itemsCnt >= totCnt) {
|
|
|
|
[document.getElementById("${infoPrefix}NotFound--${pageName}").innerHTML] : <%-- from template#${infoPrefix}NotFound --%>
|
|
|
|
return;
|
|
|
|
${infoPrefix}List.inStrings(
|
|
|
|
}
|
|
|
|
document.getElementById("${infoPrefix}Row--${pageName}").innerHTML, <%-- from template#${infoPrefix}Row --%>
|
|
|
|
|
|
|
|
(str, dataItem) => str
|
|
|
|
|
|
|
|
.replace(/{onclick}/gi, "${pageName}Control.setCurrent('" + dataItem.getValue("RE_REG_ID") + "');")
|
|
|
|
|
|
|
|
.replace(/{ondblclick}/gi, "${pageName}Control.getTotalInfo('" + dataItem.getValue("CRDN_ID") + "');")
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#tbody--${pageName}").html(trs.join());
|
|
|
|
if ((el[0].scrollHeight - el.scrollTop() + VERTICAL_SCROLL_HEIGHT) <= el.outerHeight()) {
|
|
|
|
$("th input[type='checkbox']").prop("checked", false);
|
|
|
|
${pageName}Control.load(${pageName}Control.query.pageNum + 1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
/**************************************************************************
|
|
|
|