페이징 처리 수정

main
이범준 3 months ago
parent cfcbb1047e
commit 562c4f92ca

@ -55,11 +55,8 @@
<div>
<div name="gridbuttonArea" class="container-page-btn">
<div class="d-flex flex-row justify-content-between">
<span is="paging-info" name="layoutPagingInfo"
class="dataTables_info"></span>
<ul name="layoutPaging"
class="pagination pagination-primary">
</ul>
<span is="paging-info" name="layoutPagingInfo" class="dataTables_info"></span>
<ul name="layoutPaging" class="pagination pagination-primary"></ul>
</div>
<span class="container-window-btn-right">
@ -142,15 +139,20 @@ $(document).ready(function(){
ctrl.dataset.onDatasetChange = (obj, option) => {
var t = $P.getGridTemplate();
var trs = Apply.fromDataset.getTbody(ctrl.dataset, t.found, t.notFound, t.replacer);
$P.renderLayoutList(obj["Total"], ctrl.dataset.length, trs, option);
$P.renderLayoutList(obj?.Paging?.totalSize, ctrl.dataset.length, trs, option);
Apply.fromDataset.paging(ctrl.dataset, obj, $P.findn("layoutPaging"), $P.findn("layoutPagingInfo"));
$P.pagingSupport.setPagingInfo(obj);
};
ctrl.dataset.onCurrentChange = (dataItem) => {
Apply.fromDataset.currentRow(ctrl.dataset, dataItem, $P.findn("layoutTbody"));
}
$P.pagingSupport = new FimsPagingSupport({
doq: $P,
linkContainer: "[name='layoutPaging']"
});
/**************************************************************************
* pageObject.function
**************************************************************************/

@ -161,18 +161,13 @@
<div name="gridbuttonArea" class="container-page-btn">
<div class="d-flex flex-row justify-content-between area-photoinspection">
<span is="paging-info" name="photoInspectionPagingInfo" class="dataTables_info">
</span>
<ul name="photoInspectionPaging"
class="pagination pagination-primary">
</ul>
<span is="paging-info" name="photoInspectionPagingInfo" class="dataTables_info"></span>
<ul name="photoInspectionPaging" class="pagination pagination-primary"></ul>
</div>
<div class="d-flex flex-row justify-content-between area-samevehicleinspection">
<span is="paging-info" name="sameVehicleInspectionMainPagingInfo" class="dataTables_info">
</span>
<ul name="sameVehicleInspectionMainPaging" class="pagination pagination-primary">
</ul>
<span is="paging-info" name="sameVehicleInspectionMainPagingInfo" class="dataTables_info"></span>
<ul name="sameVehicleInspectionMainPaging" class="pagination pagination-primary"></ul>
</div>
<span class="container-window-btn-right">
@ -415,11 +410,9 @@ $(document).ready(function(){
var t = $P.getGridTemplate("photoInspection");
var trs = Apply.fromDataset.getTbody(ctrl.dataset, t.found, t.notFound, t.replacer);
$P.renderInspectionDataList(obj["Total"], ctrl.dataset.length, trs, "photoInspection", option);
$P.renderInspectionDataList(obj?.Paging?.totalSize, ctrl.dataset.length, trs, "photoInspection", option);
Apply.fromDataset.paging(ctrl.dataset, obj,
$P.findn("photoInspectionPaging"), $P.findn("photoInspectionPagingInfo")
);
$P.pagingSupport0.setPagingInfo(obj);
};
ctrl.dataset.onCurrentChange = (dataItem) => {
@ -440,6 +433,11 @@ $(document).ready(function(){
$P.showPhoto(dataKey,nextDataKey,curDataVhrno,nextDataVhrno);
}
$P.pagingSupport0 = new FimsPagingSupport({
doq: $P,
linkContainer: "[name='photoInspectionPaging']"
});
//동일차량검사 datasetControl 인스턴스
var alt = newCrdn02010Alt($P);
alt.defaultFetchSize = FETCH_XS;
@ -450,11 +448,9 @@ $(document).ready(function(){
var t = $P.getGridTemplate("sameVehicleInspectionMain");
var trs = Apply.fromDataset.getTbody(alt.dataset, t.found, t.notFound, t.replacer);
$P.renderInspectionDataList(obj["Total"], alt.dataset.length, trs, "sameVehicleInspectionMain", option);
$P.renderInspectionDataList(obj?.Paging?.totalSize, alt.dataset.length, trs, "sameVehicleInspectionMain", option);
Apply.fromDataset.paging(alt.dataset, obj,
$P.findn("sameVehicleInspectionMainPaging"), $P.findn("sameVehicleInspectionMainPagingInfo")
);
$P.pagingSupport1.setPagingInfo(obj);
};
alt.dataset.onCurrentChange = (dataItem) => {
@ -466,6 +462,11 @@ $(document).ready(function(){
}
}
$P.pagingSupport1 = new FimsPagingSupport({
doq: $P,
linkContainer: "[name='sameVehicleInspectionMainPaging']"
});
var shift = newCrdn02010Shift($P);
shift.dataset.onDatasetChange = (obj, option) => {
@ -1038,8 +1039,8 @@ $(document).ready(function(){
$P.$findn("btnReset").on('click', () => $P.fnReset()); //초기화버튼
$P.$findn("btnPhotoInspection").on('click', () => {
$(".area-photoinspection").show();
$(".area-samevehicleinspection").hide();
$(".area-photoinspection").removeAttr("hidden");
$(".area-samevehicleinspection").attr("hidden","hidden");
$P.$findn('btnPhotoInspection').addClass("active");
$P.$findn('btnSameVehicleInspection').removeClass("active");
@ -1047,8 +1048,8 @@ $(document).ready(function(){
});
$P.$findn("btnSameVehicleInspection").on('click', () => {
$(".area-samevehicleinspection").show();
$(".area-photoinspection").hide();
$(".area-samevehicleinspection").removeAttr("hidden");
$(".area-photoinspection").attr("hidden","hidden");
$P.$findn("btnSameVehicleInspection").addClass("active");
$P.$findn("btnPhotoInspection").removeClass("active");

@ -46,11 +46,8 @@
<div>
<span class="container-page-btn">
<div class="d-flex flex-row justify-content-between">
<span is="paging-info" name="crdnPagingInfo"
class="dataTables_info"></span>
<ul name="crdnPaging"
class="pagination pagination-primary">
</ul>
<span is="paging-info" name="crdnPagingInfo" class="dataTables_info"></span>
<ul name="crdnPaging" class="pagination pagination-primary"></ul>
</div>
<span class="container-window-btn-right">
<button type="button" name="btnUpdateToConfirmData"
@ -147,15 +144,20 @@ $(document).ready(function(){
var t = $P.getGridTemplate();
var trs = Apply.fromDataset.getTbody(ctrl.dataset, t.found, t.notFound, t.replacer);
$P.renderCrdnList(obj["Total"], ctrl.dataset.length, trs, option);
$P.renderCrdnList(obj?.Paging?.totalSize, ctrl.dataset.length, trs, option);
Apply.fromDataset.paging(ctrl.dataset, obj, $P.findn("crdnPaging"), $P.findn("crdnPagingInfo"));
$P.pagingSupport.setPagingInfo(obj);
};
ctrl.dataset.onCurrentChange = (dataItem) => {
Apply.fromDataset.currentRow(ctrl.dataset, dataItem, $P.findn("crdnTbody"));
};
$P.pagingSupport = new FimsPagingSupport({
doq: $P,
linkContainer: "[name='crdnPaging']"
});
/**************************************************************************
* pageObject.function
**************************************************************************/

@ -42,11 +42,8 @@
<div>
<span class="container-page-btn">
<div class="d-flex flex-row justify-content-between">
<span is="paging-info" name="crdnPagingInfo"
class="dataTables_info"></span>
<ul name="crdnPaging"
class="pagination pagination-primary">
</ul>
<span is="paging-info" name="crdnPagingInfo" class="dataTables_info"></span>
<ul name="crdnPaging" class="pagination pagination-primary"></ul>
</div>
<span class="container-window-btn-right">
<button type="button" name="btnInsertByFile" class="btn btn-primary"
@ -135,16 +132,20 @@ $(document).ready(function(){
ctrl.dataset.onDatasetChange = (obj, option) => {
var t = $P.getGridTemplate();
var trs = Apply.fromDataset.getTbody(ctrl.dataset, t.found, t.notFound, t.replacer);
$P.renderCrdnList(obj["Total"], ctrl.dataset.length, trs, option);
Apply.fromDataset.paging(ctrl.dataset, obj, $P.findn("crdnPaging"), $P.findn("crdnPagingInfo"));
$P.renderCrdnList(obj?.Paging?.totalSize, ctrl.dataset.length, trs, option);
$P.pagingSupport.setPagingInfo(obj);
};
ctrl.dataset.onCurrentChange = (dataItem) => {
Apply.fromDataset.currentRow(ctrl.dataset, dataItem, $P.findn("crdnTbody"));
}
$P.pagingSupport = new FimsPagingSupport({
doq: $P,
linkContainer: "[name='crdnPaging']"
});
/**************************************************************************
* pageObject.function
**************************************************************************/

@ -47,11 +47,8 @@
<div>
<span class="container-page-btn">
<div class="d-flex flex-row justify-content-between">
<span is="paging-info" name="parsedInfoPagingInfo"
class="dataTables_info"></span>
<ul name="parsedInfoPaging"
class="pagination pagination-primary">
</ul>
<span is="paging-info" name="parsedInfoPagingInfo" class="dataTables_info"></span>
<ul name="parsedInfoPaging" class="pagination pagination-primary"></ul>
</div>
<span class="container-window-btn-right">
</span>
@ -181,9 +178,9 @@ $(document).ready(function(){
var t = $P.getGridTemplate();
var trs = Apply.fromDataset.getTbody(ctrl.dataset, t.found, t.notFound, t.replacer);
$P.renderParsedInfoList(obj["Total"], ctrl.dataset.length, trs);
$P.renderParsedInfoList(obj?.Paging?.totalSize, ctrl.dataset.length, trs);
Apply.fromDataset.paging(ctrl.dataset, obj, $P.findn("parsedInfoPaging"), $P.findn("parsedInfoPagingInfo"));
$P.pagingSupport.setPagingInfo(obj);
};
ctrl.dataset.onCurrentChange = (dataItem) => {
@ -212,6 +209,11 @@ $(document).ready(function(){
}
};
$P.pagingSupport = new FimsPagingSupport({
doq: $P,
linkContainer: "[name='parsedInfoPaging']"
});
/**************************************************************************
* pageObject.function
**************************************************************************/

@ -157,11 +157,8 @@
<div>
<div name="gridbuttonArea" class="container-page-btn">
<div class="d-flex flex-row justify-content-between">
<span is="paging-info" name="crdnPagingInfo"
class="dataTables_info" ></span>
<ul name="crdnPaging"
class="pagination pagination-primary">
</ul>
<span is="paging-info" name="crdnPagingInfo" class="dataTables_info" ></span>
<ul name="crdnPaging" class="pagination pagination-primary"></ul>
</div>
<span class="container-window-btn-right">
@ -317,10 +314,9 @@ $(document).ready(function(){
var t = $P.getGridTemplate();
var trs = Apply.fromDataset.getTbody(ctrl.dataset, t.found, t.notFound, t.replacer);
$P.renderCrdnList(obj["Total"], ctrl.dataset.length, trs, option);
$P.renderCrdnList(obj["Paging"]?.totalSize, ctrl.dataset.length, trs, option);
Apply.fromDataset.paging(ctrl.dataset, obj, $P.findn("crdnPaging"), $P.findn("crdnPagingInfo"));
$P.pagingSupport.setPagingInfo(obj);
};
ctrl.dataset.onCurrentChange = (dataItem) => {
@ -332,6 +328,11 @@ $(document).ready(function(){
Apply.fromDataset.gridButton(ctrl.dataset, $P.findn("btnSendCrdn"), selectedArr);
};
$P.pagingSupport = new FimsPagingSupport({
doq: $P,
linkContainer: "[name='crdnPaging']"
});
/**************************************************************************
* pageObject.function
**************************************************************************/

@ -42,11 +42,8 @@
<div>
<span class="container-page-btn">
<div class="d-flex flex-row justify-content-between">
<span is="paging-info" name="useTeamPagingInfo"
class="dataTables_info"></span>
<ul name="useTeamPaging"
class="pagination pagination-primary">
</ul>
<span is="paging-info" name="useTeamPagingInfo" class="dataTables_info"></span>
<ul name="useTeamPaging" class="pagination pagination-primary"></ul>
</div>
</span>
</div>
@ -263,9 +260,9 @@ $(document).ready(function(){
var t = $P.getGridTemplate("useTeam");
var trs = Apply.fromDataset.getTbody(ctrl.dataset, t.found, t.notFound, t.replacer);
$P.renderUseTeamList(obj["Total"], ctrl.dataset.length, trs);
Apply.fromDataset.paging(ctrl.dataset, obj, $P.findn("useTeamPaging"), $P.findn("useTeamPagingInfo"));
$P.renderUseTeamList(obj?.Paging?.totalSize, ctrl.dataset.length, trs);
$P.pagingSupport.setPagingInfo(obj);
};
ctrl.dataset.onCurrentChange = (dataItem) => {
@ -294,13 +291,18 @@ $(document).ready(function(){
}
$P.pagingSupport = new FimsPagingSupport({
doq: $P,
linkContainer: "[name='useTeamPaging']"
});
//삭제된 팀
var alt = newCrdn07010Alt($P);
alt.dataset.onDatasetChange = (obj, option) => {
var t = $P.getGridTemplate("delTeam");
var trs = Apply.fromDataset.getTbody(alt.dataset, t.found, t.notFound, t.replacer);
$P.renderDelTeamList(obj["Total"], alt.dataset.length, trs);
$P.renderDelTeamList(obj?.Paging?.totalSize, alt.dataset.length, trs);
};

@ -43,11 +43,8 @@
<div>
<span class="container-page-btn">
<div class="d-flex flex-row justify-content-between">
<span is="paging-info" name="exmptnVhclPagingInfo"
class="dataTables_info"></span>
<ul name="exmptnVhclPaging"
class="pagination pagination-primary">
</ul>
<span is="paging-info" name="exmptnVhclPagingInfo" class="dataTables_info"></span>
<ul name="exmptnVhclPaging" class="pagination pagination-primary"></ul>
</div>
<span class="container-window-btn-right">
<button type="button" name="btnCreate"
@ -147,15 +144,20 @@ $(document).ready(function(){
ctrl.dataset.onDatasetChange = (obj, option) => {
var t = $P.getGridTemplate();
var trs = Apply.fromDataset.getTbody(ctrl.dataset, t.found, t.notFound, t.replacer);
$P.renderExmptnVhclList(obj["Total"], ctrl.dataset.length, trs, option);
$P.renderExmptnVhclList(obj?.Paging?.totalSize, ctrl.dataset.length, trs, option);
Apply.fromDataset.paging(ctrl.dataset, obj, $P.findn("exmptnVhclPaging"), $P.findn("exmptnVhclPagingInfo"));
$P.pagingSupport.setPagingInfo(obj);
};
ctrl.dataset.onCurrentChange = (dataItem) => {
Apply.fromDataset.currentRow(ctrl.dataset, dataItem, $P.findn("exmptnVhclTbody"));
}
$P.pagingSupport = new FimsPagingSupport({
doq: $P,
linkContainer: "[name='exmptnVhclPaging']"
});
/**************************************************************************
* pageObject.function
**************************************************************************/

@ -111,11 +111,8 @@
<div>
<span class="container-page-btn">
<div class="d-flex flex-row justify-content-between">
<span is="paging-info" name="crdnPagingInfo"
class="dataTables_info"></span>
<ul name="crdnPaging"
class="pagination pagination-primary">
</ul>
<span is="paging-info" name="crdnPagingInfo" class="dataTables_info"></span>
<ul name="crdnPaging" class="pagination pagination-primary"></ul>
</div>
<span class="container-window-btn-right">
<button type="button" name="btnOpenCvlcptOrgnl" class="btn btn-primary"
@ -253,9 +250,9 @@ $(document).ready(function(){
var t = $P.getGridTemplate();
var trs = Apply.fromDataset.getTbody(ctrl.dataset, t.found, t.notFound, t.replacer);
$P.renderCrdnList(obj["Total"], ctrl.dataset.length, trs, option);
$P.renderCrdnList(obj?.Paging?.totalSize, ctrl.dataset.length, trs, option);
Apply.fromDataset.paging(ctrl.dataset, obj, $P.findn("crdnPaging"), $P.findn("crdnPagingInfo"));
$P.pagingSupport.setPagingInfo(obj);
};
ctrl.dataset.onCurrentChange = (dataItem) => {
@ -281,7 +278,12 @@ $(document).ready(function(){
}
}
}
$P.pagingSupport = new FimsPagingSupport({
doq: $P,
linkContainer: "[name='crdnPaging']"
});
/**************************************************************************
* pageObject.function
**************************************************************************/

@ -121,11 +121,8 @@
<div>
<span class="container-page-btn">
<div class="d-flex flex-row justify-content-between">
<span is="paging-info" name="crdnPagingInfo"
class="dataTables_info"></span>
<ul name="crdnPaging"
class="pagination pagination-primary">
</ul>
<span is="paging-info" name="crdnPagingInfo" class="dataTables_info"></span>
<ul name="crdnPaging" class="pagination pagination-primary"></ul>
</div>
<span name="gridbuttonArea" class="container-window-btn-right">
<button type="button" name="btnOpenCvlcptOrgnl"
@ -259,9 +256,9 @@ $(document).ready(function(){
var t = $P.getGridTemplate();
var trs = Apply.fromDataset.getTbody(ctrl.dataset, t.found, t.notFound, t.replacer);
$P.renderCrdnList(obj["Total"], ctrl.dataset.length, trs, option);
$P.renderCrdnList(obj?.Paging?.totalSize, ctrl.dataset.length, trs, option);
Apply.fromDataset.paging(ctrl.dataset, obj, $P.findn("crdnPaging"), $P.findn("crdnPagingInfo"));
$P.pagingSupport.setPagingInfo(obj);
};
ctrl.dataset.onCurrentChange = (dataItem) => {
@ -275,6 +272,11 @@ $(document).ready(function(){
Apply.fromDataset.gridButton(ctrl.dataset, $P.findn("btnExecuteDisabledTagInfoInquire"), selectedArr);
};
$P.pagingSupport = new FimsPagingSupport({
doq: $P,
linkContainer: "[name='crdnPaging']"
});
/**************************************************************************
* pageObject.function
**************************************************************************/

@ -111,11 +111,8 @@
<div>
<span class="container-page-btn">
<div class="d-flex flex-row justify-content-between">
<span is="paging-info" name="crdnPagingInfo"
class="dataTables_info"></span>
<ul name="crdnPaging"
class="pagination pagination-primary">
</ul>
<span is="paging-info" name="crdnPagingInfo" class="dataTables_info"></span>
<ul name="crdnPaging" class="pagination pagination-primary"></ul>
</div>
<span class="container-window-btn-right">
<button type="button" name="btnOpenCvlcptOrgnl"
@ -249,16 +246,20 @@ $(document).ready(function(){
var t = $P.getGridTemplate();
var trs = Apply.fromDataset.getTbody(ctrl.dataset, t.found, t.notFound, t.replacer);
$P.renderCrdnList(obj["Total"], ctrl.dataset.length, trs, option);
$P.renderCrdnList(obj?.Paging?.totalSize, ctrl.dataset.length, trs, option);
Apply.fromDataset.paging(ctrl.dataset, obj, $P.findn("crdnPaging"), $P.findn("crdnPagingInfo"));
$P.pagingSupport.setPagingInfo(obj);
};
ctrl.dataset.onCurrentChange = (dataItem) => {
Apply.fromDataset.currentRow(ctrl.dataset, dataItem, $P.findn("crdnTbody"));
}
$P.pagingSupport = new FimsPagingSupport({
doq: $P,
linkContainer: "[name='crdnPaging']"
});
/**************************************************************************
* pageObject.function
**************************************************************************/

@ -53,11 +53,8 @@
<div>
<span class="container-page-btn">
<div class="d-flex flex-row justify-content-between">
<span is="paging-info" name="dmndPagingInfo"
class="dataTables_info"></span>
<ul name="dmndPaging"
class="pagination pagination-primary">
</ul>
<span is="paging-info" name="dmndPagingInfo" class="dataTables_info"></span>
<ul name="dmndPaging" class="pagination pagination-primary"></ul>
</div>
<span class="container-window-btn-right">
<button type="button" name="btnOpenDmndPop"
@ -186,15 +183,20 @@ $(document).ready(function(){
ctrl.dataset.onDatasetChange = (obj, option) => {
var t = $P.getGridTemplate();
var trs = Apply.fromDataset.getTbody(ctrl.dataset, t.found, t.notFound, t.replacer);
$P.renderDmndList(obj["Total"], ctrl.dataset.length, trs, option);
$P.renderDmndList(obj?.Paging?.totalSize, ctrl.dataset.length, trs, option);
Apply.fromDataset.paging(ctrl.dataset, obj, $P.findn("dmndPaging"), $P.findn("dmndPagingInfo"));
$P.pagingSupport.setPagingInfo(obj);
};
ctrl.dataset.onCurrentChange = (dataItem) => {
Apply.fromDataset.currentRow(ctrl.dataset, dataItem, $P.findn("dmndTbody"));
}
$P.pagingSupport = new FimsPagingSupport({
doq: $P,
linkContainer: "[name='dmndPaging']"
});
/**************************************************************************
* pageObject.function
**************************************************************************/

@ -34,10 +34,8 @@
<div>
<div name="gridbuttonArea" class="container-page-btn">
<div class="d-flex flex-row justify-content-between">
<span is="paing-info" name="ntcPagingInfo" class="dataTables_info">
</span>
<ul name="ntcPaging" class="pagination pagination-primary">
</ul>
<span is="paing-info" name="ntcPagingInfo" class="dataTables_info"></span>
<ul name="ntcPaging" class="pagination pagination-primary"></ul>
</div>
<span class="container-window-btn-right">
@ -133,9 +131,9 @@ $(document).ready(function(){
ctrl.dataset.onDatasetChange = (obj, option) => {
var t = $P.getGridTemplate();
var trs = Apply.fromDataset.getTbody(ctrl.dataset, t.found, t.notFound, t.replacer);
$P.renderNtcList(obj["Total"], ctrl.dataset.length, trs, option);
$P.renderNtcList(obj?.Paging?.totalSize, ctrl.dataset.length, trs, option);
Apply.fromDataset.paging(ctrl.dataset, obj, $P.findn("ntcPaging"), $P.findn("ntcPagingInfo"));
$P.pagingSupport.setPagingInfo(obj);
};
ctrl.dataset.onCurrentChange = (dataItem) => {
@ -146,6 +144,11 @@ $(document).ready(function(){
};
$P.pagingSupport = new FimsPagingSupport({
doq: $P,
linkContainer: "[name='ntcPaging']"
});
/**************************************************************************
* pageObject.function
**************************************************************************/

@ -165,9 +165,9 @@ $(document).ready(function(){
ctrl.dataset.onDatasetChange = (obj, option) => {
var t = $P.getGridTemplate();
var trs = Apply.fromDataset.getTbody(ctrl.dataset, t.found, t.notFound, t.replacer);
$P.renderDeptList(obj["Total"], ctrl.dataset.length, trs, option);
$P.renderDeptList(obj?.Paging?.totalSize, ctrl.dataset.length, trs, option);
Apply.fromDataset.paging(ctrl.dataset, obj, $P.findn("deptPaging"), $P.findn("deptPagingInfo"));
$P.pagingSupport.setPagingInfo(obj);
};
ctrl.dataset.onCurrentChange = (dataItem) => {
@ -179,6 +179,11 @@ $(document).ready(function(){
};
$P.pagingSupport = new FimsPagingSupport({
doq: $P,
linkContainer: "[name='deptPaging']"
});
/**************************************************************************
* pageObject.function
**************************************************************************/

@ -2,6 +2,9 @@ if(window.help !== undefined){
help.prototype.list.push("FimsSupport 클래스 : FIMS프로젝트 내에서 공통적으로 사용할 수 있는 기능 지원");
}
/**************************************************************************
* FimsSupport
**************************************************************************/
class FimsSupport {
static help(){
@ -507,4 +510,68 @@ const BOOTSTRAP_COLS = [
"col-lg-1","col-lg-2","col-lg-3","col-lg-4","col-lg-5","col-lg-6","col-lg-7","col-lg-8","col-lg-9","col-lg-10","col-lg-11","col-lg-12",
"col-xl-1","col-xl-2","col-xl-3","col-xl-4","col-xl-5","col-xl-6","col-xl-7","col-xl-8","col-xl-9","col-xl-10","col-xl-11","col-xl-12",
"col-xxl-1","col-xxl-2","col-xxl-3","col-xxl-4","col-xxl-5","col-xxl-6","col-xxl-7","col-xxl-8","col-xxl-9","col-xxl-10","col-xxl-11","col-xxl-12"
];
];
/**************************************************************************
* FimsPagingSupport
**************************************************************************/
class FimsPagingSupport extends PagingSupport {
constructor(conf) {
if(conf.ctrl == null){
conf.ctrl = new DatasetControl({});
}
super(conf);
//this.selector = conf.selector || null;
//this.ctrl = conf.ctrl;
//this.dataset = this.ctrl?.dataset;
//this._doq = conf.ctrl?.doq;
//this.prefix = conf.ctrl?.prefix;
//this.sizeOffset = conf.sizeOffset || 0;
//this.linkContainer = conf.linkContainer;
//this.func = conf.func;
//this.statusContainer = conf.statusContainer;
//this.statusContent = conf.statusContent;
if(conf.doq != null){
this._doq = conf.doq;
}
}
setPagingInfo(option) {
let pagination = {};
let List;
let Paging;
if(this.prefix == null || this.prefix == ""){
let c = this.linkContainer;
pagination.prefix = c.substr(7, c.length-15);
List = "List";
Paging = "Paging";
} else {
pagination.prefix = this.prefix;
List = pagination.prefix+"List";
Paging = pagination.prefix+"Paging";
}
let dl = 0;
if(option && option[List]) {
dl = option[List].length;
}
let s = 0;
let ts = 0;
if(option && option[Paging] && option[Paging].start) {
s = option[Paging].start;
}
if(option && option[Paging] && option[Paging].totalSize) {
ts = option[Paging].totalSize;
}
pagination.totalSize = ts;
pagination.dataLength = s + dl;
$(this.doq.selector(this.linkContainer)).setPagingInfo(pagination);
}
}
Loading…
Cancel
Save