|
|
@ -190,7 +190,7 @@ $(document).ready(function(){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
$P.dmndControl.defaultFetchSize = FETCH_XS;
|
|
|
|
$P.dmndControl.defaultFetchSize = FETCH_XS;
|
|
|
|
$P.dmndControl.untilPageNum = 0;
|
|
|
|
|
|
|
|
$P.dmndControl.beforeCurrent = null;
|
|
|
|
$P.dmndControl.beforeCurrent = null;
|
|
|
|
|
|
|
|
|
|
|
|
/**************************************************************************
|
|
|
|
/**************************************************************************
|
|
|
@ -199,7 +199,7 @@ $(document).ready(function(){
|
|
|
|
$P.dmndControl.dataset.onDatasetChange = (obj, option) => {
|
|
|
|
$P.dmndControl.dataset.onDatasetChange = (obj, option) => {
|
|
|
|
var t = $P.getGridTemplate();
|
|
|
|
var t = $P.getGridTemplate();
|
|
|
|
var trs = Apply.fromDataset.getTbody($P.dmndControl.dataset, t.found, t.notFound, t.replacer);
|
|
|
|
var trs = Apply.fromDataset.getTbody($P.dmndControl.dataset, t.found, t.notFound, t.replacer);
|
|
|
|
$P.renderDmndList(obj["Total"], $P.dmndControl.dataset.length, trs);
|
|
|
|
$P.renderDmndList(obj["Total"], $P.dmndControl.dataset.length, trs, option);
|
|
|
|
|
|
|
|
|
|
|
|
Apply.fromDataset.paging($P.dmndControl.dataset, obj, "dmndPaging--${pageName}");
|
|
|
|
Apply.fromDataset.paging($P.dmndControl.dataset, obj, "dmndPaging--${pageName}");
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -243,8 +243,6 @@ $(document).ready(function(){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.refreshDmndList = () => {
|
|
|
|
$P.refreshDmndList = () => {
|
|
|
|
$P.dmndControl.untilPageNum = $P.dmndControl.query.pageNum;
|
|
|
|
|
|
|
|
$P.dmndControl.query.fetchSize = $P.dmndControl.defaultFetchSize * $P.dmndControl.query.pageNum;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(!$P.dmndControl.dataset.empty){
|
|
|
|
if(!$P.dmndControl.dataset.empty){
|
|
|
|
$P.dmndControl.beforeCurrent = {
|
|
|
|
$P.dmndControl.beforeCurrent = {
|
|
|
@ -253,15 +251,9 @@ $(document).ready(function(){
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Apply.fromDatasetControl.load($P.dmndControl, 1).then((resp)=>{
|
|
|
|
Apply.fromDatasetControl.reload($P.dmndControl).then((resp)=>{
|
|
|
|
Apply.toDataset.set($P.dmndControl.dataset, resp);
|
|
|
|
Apply.toDataset.set($P.dmndControl.dataset, resp);
|
|
|
|
$P.dmndControl.dataset.onDatasetChange(resp);
|
|
|
|
$P.dmndControl.dataset.onDatasetChange(resp, {reloaded : true});
|
|
|
|
|
|
|
|
|
|
|
|
if($P.dmndControl.untilPageNum != 0){
|
|
|
|
|
|
|
|
$P.dmndControl.query.fetchSize = $P.dmndControl.defaultFetchSize;
|
|
|
|
|
|
|
|
$P.dmndControl.query.pageNum = $P.dmndControl.untilPageNum;
|
|
|
|
|
|
|
|
$P.dmndControl.untilPageNum = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if($P.dmndControl.beforeCurrent != null){
|
|
|
|
if($P.dmndControl.beforeCurrent != null){
|
|
|
|
var beforeCurrentKey = $P.dmndControl.beforeCurrent.key;
|
|
|
|
var beforeCurrentKey = $P.dmndControl.beforeCurrent.key;
|
|
|
@ -302,18 +294,15 @@ $(document).ready(function(){
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.renderDmndList = (total, listLength, trs) => {
|
|
|
|
$P.renderDmndList = (total, listLength, trs, option) => {
|
|
|
|
|
|
|
|
|
|
|
|
let noMore = (listLength >= total);
|
|
|
|
let noMore = (listLength >= total);
|
|
|
|
var initScroll = ($P.dmndControl.query.pageNum < 2) && ($P.dmndControl.untilPageNum == 0);
|
|
|
|
var initScroll = ($P.dmndControl.query.pageNum < 2);
|
|
|
|
|
|
|
|
if(option != null && option.reloaded){
|
|
|
|
$("#table-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore);
|
|
|
|
initScroll = false;
|
|
|
|
|
|
|
|
|
|
|
|
if($P.dmndControl.untilPageNum != 0){
|
|
|
|
|
|
|
|
$P.dmndControl.query.fetchSize = $P.dmndControl.defaultFetchSize;
|
|
|
|
|
|
|
|
$P.dmndControl.query.pageNum = $P.dmndControl.untilPageNum;
|
|
|
|
|
|
|
|
$P.dmndControl.untilPageNum = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$("#table-responsive--${pageName}")[0].changeContent(trs, initScroll, noMore);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
$P.clickDmndList = (dataKey) => {
|
|
|
|
$P.clickDmndList = (dataKey) => {
|
|
|
|