소스 정리

main
이범준 3 months ago
parent b182516f99
commit 3cd9bf9438

@ -204,7 +204,7 @@ $(document).ready(function(){
Apply.toDataset.set(ctrl.dataset, resp);
ctrl.dataset.onDatasetChange(resp, {reloaded : true});
let todoCurrent = Apply.fromDataset.getTodoCurrent(ctrl.dataset, ctrl.beforeCurrent, "CRDN_ID_LIST");
let todoCurrent = Apply.fromDataset.getTodoCurrent(ctrl.dataset, ctrl.beforeCurrent, "CRDN_ID");
ctrl.beforeCurrent = null;
if(todoCurrent != null){
ctrl.dataset.setCurrent(todoCurrent.index, true);

@ -339,8 +339,8 @@ $(document).ready(function(){
$P.refreshCrdnList = () => {
ctrl.beforeCurrent = {
key : ctrl.dataset.getCurrent()["CRDN_ID"],
index : ctrl.dataset.getCurrent()["ROW_NUM"] - 1
primaryKey : ctrl.dataset.getCurrent()["CRDN_ID"],
arrayIndex : ctrl.dataset.getCurrent()["ROW_NUM"] - 1
};
Apply.fromDatasetControl.reload(ctrl).then((resp)=>{
@ -348,27 +348,10 @@ $(document).ready(function(){
Apply.toDataset.set(ctrl.dataset, resp);
ctrl.dataset.onDatasetChange(resp, {reloaded : true});
if(ctrl.beforeCurrent != null){
var beforeCurrentKey = ctrl.beforeCurrent.key;
var beforeCurrentIndex = ctrl.beforeCurrent.index;
let todoCurrent = Apply.fromDataset.getTodoCurrent(ctrl.dataset, ctrl.beforeCurrent, "CRDN_ID");
ctrl.beforeCurrent = null;
if(!ctrl.dataset.empty){
var info = ctrl.dataset.getData(beforeCurrentKey);
if(info != null){
ctrl.dataset.setCurrent(beforeCurrentKey,true);
} else {
if(beforeCurrentIndex > (ctrl.dataset.length - 1)){
info = ctrl.dataset.getDataset()[ctrl.dataset.length - 1];
} else {
info = ctrl.dataset.getDataset()[beforeCurrentIndex];
}
ctrl.dataset.setCurrent(info["CRDN_ID"],true);
}
}
if(todoCurrent != null){
ctrl.dataset.setCurrent(todoCurrent.index, true);
}
$(".parentGrid").each(function(){

@ -250,7 +250,6 @@ $(document).ready(function(){
var ctrl = newCvlc02010Control($P);
ctrl.defaultFetchSize = FETCH_XS;
ctrl.query = { pageNum : 1, fetchSize : ctrl.defaultFetchSize };
ctrl.beforeCurrent = null;
ctrl.dataset.onDatasetChange = (obj, option) => {

@ -307,34 +307,18 @@ $(document).ready(function(){
$P.refreshCrdnList = () => {
ctrl.beforeCurrent = {
key : ctrl.dataset.getCurrent()["CRDN_ID"],
index : ctrl.dataset.getCurrent()["ROW_NUM"] - 1
primaryKey : ctrl.dataset.getCurrent()["CRDN_ID"],
arrayIndex : ctrl.dataset.getCurrent()["ROW_NUM"] - 1
};
Apply.fromDatasetControl.reload(ctrl).then((resp)=>{
Apply.toDataset.set(ctrl.dataset, resp);
ctrl.dataset.onDatasetChange(resp, {reloaded : true});
if(ctrl.beforeCurrent != null){
var beforeCurrentKey = ctrl.beforeCurrent.key;
var beforeCurrentIndex = ctrl.beforeCurrent.index;
let todoCurrent = Apply.fromDataset.getTodoCurrent(ctrl.dataset, ctrl.beforeCurrent, "CRDN_ID");
ctrl.beforeCurrent = null;
if(!ctrl.dataset.empty){
var info = ctrl.dataset.getData(beforeCurrentKey);
if(info != null){
ctrl.dataset.setCurrent(beforeCurrentKey,true);
} else {
if(beforeCurrentIndex > (ctrl.dataset.length - 1)){
info = ctrl.dataset.getDataset()[ctrl.dataset.length - 1];
} else {
info = ctrl.dataset.getDataset()[beforeCurrentIndex];
}
ctrl.dataset.setCurrent(info["CRDN_ID"],true);
}
}
if(todoCurrent != null){
ctrl.dataset.setCurrent(todoCurrent.index, true);
}
});

@ -235,8 +235,8 @@ $(document).ready(function(){
if(!ctrl.dataset.empty){
ctrl.beforeCurrent = {
key : ctrl.dataset.getCurrent()["INDIV_ID"],
index : ctrl.dataset.getCurrent()["ROW_NUM"] - 1
primaryKey : ctrl.dataset.getCurrent()["INDIV_ID"],
arrayIndex : ctrl.dataset.getCurrent()["ROW_NUM"] - 1
};
}
@ -244,27 +244,10 @@ $(document).ready(function(){
Apply.toDataset.set(ctrl.dataset, resp);
ctrl.dataset.onDatasetChange(resp, {reloaded : true});
if(ctrl.beforeCurrent != null){
var beforeCurrentKey = ctrl.beforeCurrent.key;
var beforeCurrentIndex = ctrl.beforeCurrent.index;
let todoCurrent = Apply.fromDataset.getTodoCurrent(ctrl.dataset, ctrl.beforeCurrent, "INDIV_ID");
ctrl.beforeCurrent = null;
if(!ctrl.dataset.empty){
var info = ctrl.dataset.getData(beforeCurrentKey);
if(info != null){
ctrl.dataset.setCurrent(beforeCurrentKey,true);
} else {
if(beforeCurrentIndex > (ctrl.dataset.length - 1)){
info = ctrl.dataset.getDataset()[ctrl.dataset.length - 1];
} else {
info = ctrl.dataset.getDataset()[beforeCurrentIndex];
}
ctrl.dataset.setCurrent(info["INDIV_ID"],true);
}
}
if(todoCurrent != null){
ctrl.dataset.setCurrent(todoCurrent.index, true);
}
});

Loading…
Cancel
Save