소스 업데이트

master
mjkhan21 5 months ago
parent 1b54d23c7a
commit 9b18e84448

1
.gitignore vendored

@ -1,3 +1,4 @@
/.settings/ /.settings/
/.project /.project
/target/ /target/
/.classpath

@ -38,10 +38,9 @@ class ActionGroupControl {
if (!this.linked) return; if (!this.linked) return;
let row = item ? item.data : null; let row = item ? item.data : null;
if (row) { if (row)
this.actions.query.groupIDs = row.GRP_ID; this.getActions(row.GRP_ID, 1);
this.actions.load(); else
} else
this.actions.dataset.clear(); this.actions.dataset.clear();
}; };
this.groups.onSelectionChange = selected => this.onGroupSelect(selected); this.groups.onSelectionChange = selected => this.onGroupSelect(selected);

@ -107,7 +107,7 @@ var dialog = {
else { else {
var self = this; var self = this;
ajax.get({ ajax.get({
url:wctx.url("/resources/html/dialog.html"), url:wctx.url("/webjars/html/dialog.html"),
success:function(resp) { success:function(resp) {
self.template = resp; self.template = resp;
self.create(conf); self.create(conf);
@ -151,6 +151,7 @@ var dialog = {
if (conf.onOK) { if (conf.onOK) {
let footer = dlg.find(".modal-footer"); let footer = dlg.find(".modal-footer");
footer.removeClass("hidden");
footer.show(); footer.show();
footer.find("button").unbind("click").click(function() { footer.find("button").unbind("click").click(function() {
if (conf.getData) { if (conf.getData) {
@ -643,6 +644,12 @@ $.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));}; 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(){ return this.each(function(){
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), let tag = paginate(config),
container = $(this); container = $(this);
if (tag) if (tag)
@ -651,12 +658,16 @@ $.fn.setPaging = function(config) {
if (config.hideIfEmpty != false) if (config.hideIfEmpty != false)
container.hide(); container.hide();
} }
});
}
$.fn.setPagingInfo = function(config) {
return this.each(function(){
let list = config.list; let list = config.list;
let pagingInfo = list.empty ? "" : let pagingInfo = list.empty ? "" : 1
numberFormat.format(config.start + 1)
+ " ~ " + " ~ "
+ numberFormat.format(config.start + list.length) + numberFormat.format(list.length)
+ " / " + numberFormat.format(config.totalSize); + " / " + numberFormat.format(config.totalSize);
$("#"+ config.prefix + "PagingInfo").html(pagingInfo); $("#"+ config.prefix + "PagingInfo").html(pagingInfo);
}); });

@ -3,6 +3,9 @@ class CommonCodes {
codeList.forEach(item => this[item.code] = !asObject ? item.value : item); codeList.forEach(item => this[item.code] = !asObject ? item.value : item);
this.codes = () => codeList.map(item => item.code); this.codes = () => codeList.map(item => item.code);
this.list = () => codeList; this.list = () => codeList;
this.format = (code) => {
return this.value(code, "");
}
} }
_value(code, field) { _value(code, field) {

@ -21,6 +21,7 @@ class UserControl extends DatasetControl {
dialog.open({ dialog.open({
title:"사용자 선택", title:"사용자 선택",
content:resp, content:resp,
size:"xl",
getData:() => {return getSelectedUser();}, getData:() => {return getSelectedUser();},
onOK:(selected) => resolve(selected) onOK:(selected) => resolve(selected)
}); });

Loading…
Cancel
Save