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