DatasetControl keyMapper 설정 수정

main
이범준 3 months ago
parent 746c899280
commit 73ff73779d

@ -195,8 +195,8 @@ $(document).ready(function(){
var notFound = [""]; var notFound = [""];
var found = $P.findn("detailGridTbodyTemplate").innerHTML; var found = $P.findn("detailGridTbodyTemplate").innerHTML;
var replacer = (str, dataItem) => str var replacer = (str, dataItem) => str
.replace(/{onclick}/gi, "pageObject['${pageName}'].clickDetailGrid('" + dataItem.getValue("DATA_ID") + "');") .replace(/{onclick}/gi, "pageObject['${pageName}'].clickDetailGrid('{DATA-INDEX}');")
.replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblClickDetailGrid('" + dataItem.getValue("DATA_ID") + "');"); .replace(/{ondblclick}/gi, "pageObject['${pageName}'].dblClickDetailGrid('{DATA_ID}');");
var trs = empty ? notFound : DS.inStrings(found, replacer); var trs = empty ? notFound : DS.inStrings(found, replacer);
$P.$findn("detailTbody").html(trs.join()); $P.$findn("detailTbody").html(trs.join());
@ -569,8 +569,8 @@ $(document).ready(function(){
$P.$findn("statWrapper").animate({scrollTop : offset.top}, 400); $P.$findn("statWrapper").animate({scrollTop : offset.top}, 400);
} }
$P.clickDetailGrid = (key) => { $P.clickDetailGrid = (dataIndex) => {
$P.$findn("detailTbody").setCurrentRow(key); $P.$findn("detailTbody").setCurrentRow(dataIndex);
} }
$P.dblClickDetailGrid = (key) => { $P.dblClickDetailGrid = (key) => {

@ -15,7 +15,7 @@
</template> </template>
<template name="detailGridTbodyTemplate"> <template name="detailGridTbodyTemplate">
<tr data-key="{DATA_ID}"> <tr data-index="{DATA-INDEX}">
<td>{}</td> <td>{}</td>
<td>{}</td> <td>{}</td>
<td>{}</td> <td>{}</td>

@ -22,7 +22,7 @@
</template> </template>
<template name="detailGridTbodyTemplate"> <template name="detailGridTbodyTemplate">
<tr data-key="{DATA_ID}" onclick="{onclick}" ondblclick="{ondblclick}"> <tr data-index="{DATA-INDEX}" onclick="{onclick}" ondblclick="{ondblclick}">
<td>{SGG_NM}</td> <td>{SGG_NM}</td>
<td>{VHRNO}</td> <td>{VHRNO}</td>
<td>{CRDN_YMD_TM}</td> <td>{CRDN_YMD_TM}</td>

@ -15,7 +15,7 @@
</template> </template>
<template name="detailGridTbodyTemplate"> <template name="detailGridTbodyTemplate">
<tr data-key="{DATA_ID}"> <tr data-index="{DATA-INDEX}">
<td>{}</td> <td>{}</td>
<td>{}</td> <td>{}</td>
<td>{}</td> <td>{}</td>

@ -15,7 +15,7 @@
</template> </template>
<template name="detailGridTbodyTemplate"> <template name="detailGridTbodyTemplate">
<tr data-key="{DATA_ID}"> <tr data-index="{DATA-INDEX}">
<td>{}</td> <td>{}</td>
<td>{}</td> <td>{}</td>
<td>{}</td> <td>{}</td>

@ -15,7 +15,7 @@
</template> </template>
<template name="detailGridTbodyTemplate"> <template name="detailGridTbodyTemplate">
<tr data-key="{DATA_ID}"> <tr data-index="{DATA-INDEX}">
<td>{}</td> <td>{}</td>
<td>{}</td> <td>{}</td>
<td>{}</td> <td>{}</td>

@ -1,7 +1,8 @@
function newStatMainAlt(page, doctx = ""){ function newStatMainAlt(page, doctx = ""){
page.alt = new DatasetControl({ page.alt = new DatasetControl({
dataGetter : obj => Array.isArray(obj) ? obj : [], appendData:false, dataGetter : obj => Array.isArray(obj) ? obj : [],
keymapper : info => info ? info.DATA_ID : "", appendData:false,
keys : ["DATA_ID"],
urls : { }, urls : { },
formats : { formats : {
CVLCPT_PRCS_PRNMNT_DT : dateFormat, CVLCPT_PRCS_PRNMNT_DT : dateFormat,

Loading…
Cancel
Save