|
|
@ -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)
|
|
|
@ -652,11 +659,15 @@ $.fn.setPaging = function(config) {
|
|
|
|
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);
|
|
|
|
});
|
|
|
|
});
|
|
|
|