페이징 수정

main
mjkhan21 6 months ago
parent 527f43c258
commit b305bed7fd

@ -48,11 +48,12 @@ DELETE FROM TB_ACTION_GRP
WHERE GRP_ID IN (<foreach collection="groupIDs" item="groupID" separator=",">#{groupID}</foreach>)</delete>
<select id="getActionList" parameterType="map" resultType="dataobject">/* 그룹별 기능 가져오기(actionGroupMapper.getActionList) */
<include refid="utility.paging-prefix" />
SELECT *
FROM TB_GRP_ACTION
<if test="groupIDs != null">WHERE GRP_ID IN (<foreach collection="groupIDs" item="groupID" separator=",">#{groupID}</foreach>)</if>
ORDER BY GRP_ID, ACTION
</select>
<include refid="utility.orderBy" />
<include refid="utility.paging-suffix" /></select>
<insert id="addActions" parameterType="map">/* 그룹별 기능 추가(actionGroupMapper.addActions) */
INSERT INTO TB_GRP_ACTION (GRP_ID, ACTION, REG_DT, RGTR)

@ -67,7 +67,7 @@ ${infoPrefix}Control.onActionListChange = obj => {
start:obj.actionStart,
totalSize:obj.actionTotal,
fetchSize:obj.actionFetch,
func:"${infoPrefix}Control.actions.load({index})"
func:"${infoPrefix}Control.getActions({index})"
});
};

@ -38,10 +38,9 @@ class ActionGroupControl {
if (!this.linked) return;
let row = item ? item.data : null;
if (row) {
this.actions.query.groupIDs = row.GRP_ID;
this.actions.load();
} else
if (row)
this.getActions(row.GRP_ID, 1);
else
this.actions.dataset.clear();
};
this.groups.onSelectionChange = selected => this.onGroupSelect(selected);
@ -81,6 +80,11 @@ class ActionGroupControl {
onActionSelect(selected) {}
getActions(groupID, pageNum) {
this.actions.query.groupIDs = groupID;
this.actions.load(pageNum);
}
async addActions() {
let actions = await selectURL(true);
actions = actions.filter(a => "/" == a || a.endsWith(".do"));

@ -633,11 +633,10 @@ $.fn.setPaging = function(config) {
config.last = function(index, label) {return '<li onclick="{func}" class="page-item last"><a class="page-link"><i class="tf-icon bx bx-chevrons-right"></i></a></li>'.replace(/{func}/, config.func.replace(/{index}/, label));};
return this.each(function(){
let list = config.list;
let pagingInfo = list.empty ? "" : 1
+ " ~ "
+ numberFormat.format(list.length)
+ " / " + numberFormat.format(config.totalSize);
let list = config.list,
start = list.empty ? 0 : config.start + 1,
end = list.empty ? 0 : config.start + list.length,
pagingInfo = list.empty ? "" : start + " ~ " + numberFormat.format(end) + " / " + numberFormat.format(config.totalSize);
$("#"+ config.prefix + "PagingInfo").html(pagingInfo);
let tag = paginate(config),

Loading…
Cancel
Save