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